diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_menu.test.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_menu.test.tsx index 839983c9c6b32..d5c6377d20942 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar_menu.test.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_bar_menu.test.tsx @@ -230,7 +230,7 @@ describe('Querybar Menu component', () => { expect(languageSwitcher.length).toBeTruthy(); }); - it('should render the save query quick buttons', async () => { + it('should render the save query quick button', async () => { const newProps = { ...props, openQueryBarMenu: true, @@ -254,10 +254,6 @@ describe('Querybar Menu component', () => { '[data-test-subj="saved-query-management-save-changes-button"]' ); expect(saveChangesButton.length).toBeTruthy(); - const saveChangesAsNewButton = component.find( - '[data-test-subj="saved-query-management-save-as-new-button"]' - ); - expect(saveChangesAsNewButton.length).toBeTruthy(); }); it('should render all filter panel options by default', async () => { diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx index a9342a65ea74f..9ba28c72c47e3 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_bar_menu.tsx @@ -32,7 +32,11 @@ import { export const strings = { getFilterSetButtonLabel: () => i18n.translate('unifiedSearch.filter.options.filterSetButtonLabel', { - defaultMessage: 'Saved query menu', + defaultMessage: 'Query menu', + }), + getSavedQueryPopoverSaveChangesButtonText: () => + i18n.translate('unifiedSearch.search.searchBar.savedQueryPopoverSaveChangesButtonText', { + defaultMessage: 'Update query', }), }; @@ -171,7 +175,10 @@ function QueryBarMenuComponent({ ); case 'saveForm': return ( - {saveFormComponent}]} /> + {saveFormComponent}]} + /> ); case 'saveAsNewForm': return ( diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_menu_panels.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_menu_panels.tsx index 20f155db53832..d7c8bd8b64a45 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar_menu_panels.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_bar_menu_panels.tsx @@ -63,7 +63,7 @@ export const strings = { }), getLoadOtherFilterSetLabel: () => i18n.translate('unifiedSearch.filter.options.loadOtherFilterSetLabel', { - defaultMessage: 'Load a different query', + defaultMessage: 'Load query', }), getLoadCurrentFilterSetLabel: () => i18n.translate('unifiedSearch.filter.options.loadCurrentFilterSetLabel', { @@ -71,7 +71,7 @@ export const strings = { }), getSaveAsNewFilterSetLabel: () => i18n.translate('unifiedSearch.filter.options.saveAsNewFilterSetLabel', { - defaultMessage: 'Save as new', + defaultMessage: 'Save query', }), getSaveFilterSetLabel: () => i18n.translate('unifiedSearch.filter.options.saveFilterSetLabel', { @@ -88,7 +88,7 @@ export const strings = { }), getSavedQueryPopoverSaveChangesButtonText: () => i18n.translate('unifiedSearch.search.searchBar.savedQueryPopoverSaveChangesButtonText', { - defaultMessage: 'Save changes', + defaultMessage: 'Update query', }), getSavedQueryPopoverSaveAsNewButtonAriaLabel: () => i18n.translate('unifiedSearch.search.searchBar.savedQueryPopoverSaveAsNewButtonAriaLabel', { @@ -100,7 +100,7 @@ export const strings = { }), getSaveCurrentFilterSetLabel: () => i18n.translate('unifiedSearch.filter.options.saveCurrentFilterSetLabel', { - defaultMessage: 'Save current query', + defaultMessage: 'Save as new', }), getApplyAllFiltersButtonLabel: () => i18n.translate('unifiedSearch.filter.options.applyAllFiltersButtonLabel', { @@ -238,10 +238,6 @@ export function QueryBarMenuPanels({ }; }; - const handleSaveAsNew = useCallback(() => { - setRenderedComponent('saveAsNewForm'); - }, [setRenderedComponent]); - const handleSave = useCallback(() => { setRenderedComponent('saveForm'); }, [setRenderedComponent]); @@ -413,38 +409,17 @@ export function QueryBarMenuPanels({ {savedQuery && savedQueryHasChanged && Boolean(showSaveQuery) && hasFiltersOrQuery && ( - - - - {strings.getSavedQueryPopoverSaveChangesButtonText()} - - - - - {strings.getSavedQueryPopoverSaveAsNewButtonText()} - - - + {strings.getSavedQueryPopoverSaveChangesButtonText()} + )} diff --git a/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.test.tsx b/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.test.tsx index 01837e26bb892..c891174986510 100644 --- a/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.test.tsx +++ b/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.test.tsx @@ -136,7 +136,7 @@ describe('Saved query management list component', () => { .find('[data-test-subj="saved-query-management-apply-changes-button"]') .first() .text() - ).toBe('Apply query'); + ).toBe('Load query'); const newProps = { ...props, diff --git a/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx b/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx index daaf523abf68b..5ebb89bd88afc 100644 --- a/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx +++ b/src/plugins/unified_search/public/saved_query_management/saved_query_management_list.tsx @@ -309,22 +309,7 @@ export function SavedQueryManagementList({ )} - - {canEditSavedObjects && ( - - - Manage - - - )} + - {hasFiltersOrQuery - ? i18n.translate( - 'unifiedSearch.search.searchBar.savedQueryPopoverReplaceFilterSetLabel', - { - defaultMessage: 'Load query', - } - ) - : i18n.translate( - 'unifiedSearch.search.searchBar.savedQueryPopoverApplyFilterSetLabel', - { - defaultMessage: 'Apply query', - } - )} + {i18n.translate( + 'unifiedSearch.search.searchBar.savedQueryPopoverApplyFilterSetLabel', + { + defaultMessage: 'Load query', + } + )} + {canEditSavedObjects && ( + + + {i18n.translate('unifiedSearch.search.searchBar.savedQueryPopoverManageLabel', { + defaultMessage: 'Manage saved objects', + })} + + + )} {showDeletionConfirmationModal && toBeDeletedSavedQuery && ( diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 8d8b020e45426..9a22d99e53702 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -5812,7 +5812,6 @@ "unifiedSearch.search.searchBar.savedQueryPopoverApplyFilterSetLabel": "Appliquer la requête enregistrée", "unifiedSearch.search.searchBar.savedQueryPopoverConfirmDeletionCancelButtonText": "Annuler", "unifiedSearch.search.searchBar.savedQueryPopoverConfirmDeletionConfirmButtonText": "Supprimer", - "unifiedSearch.search.searchBar.savedQueryPopoverReplaceFilterSetLabel": "Remplacer par la requête enregistrée sélectionnée", "unifiedSearch.search.searchBar.savedQueryPopoverSaveAsNewButtonAriaLabel": "Enregistrer en tant que nouvelle requête enregistrée", "unifiedSearch.search.searchBar.savedQueryPopoverSaveAsNewButtonText": "Enregistrer en tant que nouvelle", "unifiedSearch.search.searchBar.savedQueryPopoverSaveChangesButtonText": "Enregistrer les modifications", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 66dac0e4831d3..083d8d827afcf 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -5813,7 +5813,6 @@ "unifiedSearch.search.searchBar.savedQueryPopoverApplyFilterSetLabel": "保存されたクエリの適用", "unifiedSearch.search.searchBar.savedQueryPopoverConfirmDeletionCancelButtonText": "キャンセル", "unifiedSearch.search.searchBar.savedQueryPopoverConfirmDeletionConfirmButtonText": "削除", - "unifiedSearch.search.searchBar.savedQueryPopoverReplaceFilterSetLabel": "選択した保存されたクエリで置換", "unifiedSearch.search.searchBar.savedQueryPopoverSaveAsNewButtonAriaLabel": "新規保存クエリを保存", "unifiedSearch.search.searchBar.savedQueryPopoverSaveAsNewButtonText": "新規保存", "unifiedSearch.search.searchBar.savedQueryPopoverSaveChangesButtonText": "変更を保存", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6543233c2fbee..c4d28406b874f 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -5813,7 +5813,6 @@ "unifiedSearch.search.searchBar.savedQueryPopoverApplyFilterSetLabel": "应用已保存查询", "unifiedSearch.search.searchBar.savedQueryPopoverConfirmDeletionCancelButtonText": "取消", "unifiedSearch.search.searchBar.savedQueryPopoverConfirmDeletionConfirmButtonText": "删除", - "unifiedSearch.search.searchBar.savedQueryPopoverReplaceFilterSetLabel": "替换为选定已保存查询", "unifiedSearch.search.searchBar.savedQueryPopoverSaveAsNewButtonAriaLabel": "另存为新的已保存查询", "unifiedSearch.search.searchBar.savedQueryPopoverSaveAsNewButtonText": "另存为新的", "unifiedSearch.search.searchBar.savedQueryPopoverSaveChangesButtonText": "保存更改",