-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enterprise Search][Search Application] Update engines to be search application #155299
Conversation
change selected indices to accept string new create search application routes Fix: all errors
e9a0808
to
c51cf9c
Compare
f38ffa3
to
58a14c3
Compare
|
||
export const EnginesList: React.FC = () => { | ||
export const EnginesList: React.FC<ListProps> = ({ isCreateEngineFlyoutOpen }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this new prop ListProps
, When create search app flyout is open ( instantiated from indices page ) doesn't redirect to engine list page after successfully creating search application.
Adding this optional isCreateEngineFlyoutOpen
helped with that.
This was the best solution I could come up with. So looking for better alternative if any!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the right solution to control the flyout being open via URL instead of using state.
onClick={openEngineCreate} | ||
to={ENGINE_CREATION_PATH} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced EuiButton
to EuiButtonTo
in create search application buttons to help with redirecting route to /new
route path
@@ -56,16 +55,8 @@ export const BUILD_SEARCH_EXPERIENCE_STEP: EuiContainedStepProps = { | |||
<p> | |||
<FormattedMessage | |||
id="xpack.enterpriseSearch.content.newIndex.steps.buildSearchExperience.content" | |||
defaultMessage="After building your connector, your content is ready. Build your first search experience with {elasticsearchLink}, or explore the search experience tools provided by {appSearchLink}. We recommend that you create a {searchEngineLink} for the best balance of flexible power and turnkey simplicity." | |||
defaultMessage="After building your connector, your content is ready to create a {searchApplicationLink} with {elasticsearchLink}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@julianrosado FYI I think this page will not exist when new redesign PR is merged. Added these changes in this PR, just in case
|
||
return ( | ||
<EuiFlyout onClose={onClose} size="m"> | ||
<EuiFlyoutHeader> | ||
<EuiTitle size="m"> | ||
<h3> | ||
{i18n.translate('xpack.enterpriseSearch.content.engines.createEngine.headerTitle', { | ||
defaultMessage: 'Create an engine', | ||
defaultMessage: 'Create an Search Application', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage: 'Create an Search Application', | |
defaultMessage: 'Create a Search Application', |
@@ -81,7 +92,7 @@ export const CreateEngineFlyout = ({ onClose }: CreateEngineFlyoutProps) => { | |||
<p> | |||
<FormattedMessage | |||
id="xpack.enterpriseSearch.content.engines.createEngine.headerSubTitle" | |||
defaultMessage="An engine allows your users to query data in your indices. Explore our {enginesDocsLink} to learn more!" | |||
defaultMessage="An Search Application allows your users to query data in your indices. Explore our {enginesDocsLink} to learn more!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage="An Search Application allows your users to query data in your indices. Explore our {enginesDocsLink} to learn more!" | |
defaultMessage="A Search Application allows your users to query data in your indices. Explore our {enginesDocsLink} to learn more!" |
|
||
export const EnginesList: React.FC = () => { | ||
export const EnginesList: React.FC<ListProps> = ({ isCreateEngineFlyoutOpen }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the right solution to control the flyout being open via URL instead of using state.
@@ -139,6 +148,9 @@ export const EnginesList: React.FC = () => { | |||
if (!isGated) { | |||
setIsFirstRequest(); | |||
} | |||
if (!!isCreateEngineFlyoutOpen) { | |||
openEngineCreate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be needed. We should just be able to render the Flyout with isOpen
if isCreateEngineFlyoutOpen
We should be able to remove openEngineCreate
and the state in the logic completely.
We would also remove closeEngineCreate
and just navigate to the list URL or to the engine on create being completed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll work on removing the state in the logic completely
searchEngineLink: ( | ||
<EuiLinkTo to={`${APP_SEARCH_URL}/engines/new`} shouldNotCreateHref> | ||
searchApplicationLink: ( | ||
<EuiLink onClick={() => KibanaLogic.values.navigateToUrl(ENGINES_PATH)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could continue to use to
if we do ${ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL}${ENGINES_PATH}
defaultMessage: 'Search Applications', | ||
}), | ||
]} | ||
pageHeader={{ | ||
description: ( | ||
<FormattedMessage | ||
id="xpack.enterpriseSearch.content.engines.description" | ||
id="xpack.enterpriseSearch.content.searchApplications.description" | ||
defaultMessage="Search Applications allow you to query indexed data with a complete set of relevance, analytics and personalization tools. To learn more about how engines work in Enterprise search {documentationUrl}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage="Search Applications allow you to query indexed data with a complete set of relevance, analytics and personalization tools. To learn more about how engines work in Enterprise search {documentationUrl}" | |
defaultMessage="Search Applications allow you to query indexed data with a complete set of relevance, analytics and personalization tools. To learn more about how Search Applications work in Enterprise search {documentationUrl}" |
{ | ||
defaultMessage: 'Locate an engine via name or by its included indices.', | ||
defaultMessage: | ||
'Locate an search application via name or by its included indices.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Locate an search application via name or by its included indices.', | |
'Find a search application by name or by an index it includes.', |
{i18n.translate( | ||
'xpack.enterpriseSearch.content.index.searchApplication.createSearchApplication', | ||
{ | ||
defaultMessage: 'Create an Search Application', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage: 'Create an Search Application', | |
defaultMessage: 'Create a Search Application', |
</EuiButtonTo> | ||
</div> | ||
} | ||
> | ||
<EuiPopoverTitle> | ||
<FormattedMessage | ||
id="xpack.enterpriseSearch.content.engines.createEngineDisabledPopover.title" | ||
id="xpack.enterpriseSearch.content.searchApplications.createEngineDisabledPopover.title" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: Should I continue including these translation changes in this PR ?
NAV_TITLE: i18n.translate('xpack.enterpriseSearch.engines.navTitle', { | ||
defaultMessage: 'Engines', | ||
NAV_TITLE: i18n.translate('xpack.enterpriseSearch.applications.navTitle', { | ||
defaultMessage: 'Applications', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the breadcrumb to Applications
…to search-app-rename
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
}); | ||
}, | ||
engineCreated: () => { | ||
actions.fetchEngines(); | ||
actions.closeEngineCreate(); | ||
KibanaLogic.values.navigateToUrl(ENGINES_PATH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed in this PR but we should check with Product and see if we should navigate to the Search Application (Preview) on create.
IMO that would be better UX. since if you have a lot of applications it might be annoying to find the new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Agree with you 💯
Summary
demo.mov
Checklist
Delete any items that are not applicable to this PR.