From 2654a612c596ea4a537063f7115e8825bfd931c1 Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Fri, 26 Apr 2024 17:39:19 +0200 Subject: [PATCH] [ES|QL] Small changes before GA (#181653) ## Summary Closes https://github.com/elastic/kibana/issues/181551 Changes the icon / button bg when the user has changed the query but not submitted. image It also slightly changes the advanced setting description. image --- packages/kbn-text-based-editor/src/editor_footer.tsx | 12 ++++++++++-- .../src/text_based_languages_editor.tsx | 2 ++ .../prompt/no_data_views/impl/src/actions.tsx | 4 ++-- src/plugins/discover/server/ui_settings.ts | 6 +++--- .../public/dataview_picker/change_dataview.tsx | 2 +- .../components/data_source_selector/constants.tsx | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/packages/kbn-text-based-editor/src/editor_footer.tsx b/packages/kbn-text-based-editor/src/editor_footer.tsx index 27a92b504c70..88524bbeb437 100644 --- a/packages/kbn-text-based-editor/src/editor_footer.tsx +++ b/packages/kbn-text-based-editor/src/editor_footer.tsx @@ -118,6 +118,7 @@ interface EditorFooterProps { hideQueryHistory?: boolean; refetchHistoryItems?: boolean; isInCompactMode?: boolean; + queryHasChanged?: boolean; } export const EditorFooter = memo(function EditorFooter({ @@ -142,6 +143,7 @@ export const EditorFooter = memo(function EditorFooter({ hideQueryHistory, refetchHistoryItems, isInCompactMode, + queryHasChanged, }: EditorFooterProps) { const { euiTheme } = useEuiTheme(); const [isErrorPopoverOpen, setIsErrorPopoverOpen] = useState(false); @@ -329,9 +331,15 @@ export const EditorFooter = memo(function EditorFooter({ > )} @@ -1065,6 +1066,7 @@ export const TextBasedLanguagesEditor = memo(function TextBasedLanguagesEditor({ containerWidth={editorWidth} hideQueryHistory={hideHistoryComponent} refetchHistoryItems={refetchHistoryItems} + queryHasChanged={code !== codeWhenSubmitted} /> )} {isCodeEditorExpanded && ( diff --git a/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx b/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx index d71b460e26a3..5d6d4311ae05 100644 --- a/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx +++ b/packages/shared-ux/prompt/no_data_views/impl/src/actions.tsx @@ -49,7 +49,7 @@ export const NoDataButtonLink = ({ @@ -65,7 +65,7 @@ export const NoDataButtonLink = ({ diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index 096869d18ca5..f09d96f150a9 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -317,12 +317,12 @@ export const getUiSettings: ( value: true, description: i18n.translate('discover.advancedSettings.enableESQLDescription', { defaultMessage: - 'This setting enables ES|QL in Discover. If you have feedback on this experience please reach out to us on {link}', + 'This setting enables ES|QL in Kibana. By switching it off you will hide the ES|QL user interface from various applications. However, users will be able to access existing ES|QL saved searches, visualizations, etc. If you have feedback on this experience please reach out to us on {link}', values: { link: - `` + + `` + i18n.translate('discover.advancedSettings.enableESQL.discussLinkText', { - defaultMessage: 'discuss.elastic.co/c/elastic-stack/kibana', + defaultMessage: 'https://ela.st/esql-feedback', }) + '', }, diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx index e9d8058ff142..4afa5f84997e 100644 --- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx +++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx @@ -358,7 +358,7 @@ export function ChangeDataView({ }} > {i18n.translate('unifiedSearch.query.queryBar.textBasedLanguagesTryLabel', { - defaultMessage: 'Try ES|QL', + defaultMessage: 'Language: ES|QL', })} diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx index 834fdc9182fc..dad1944e6b66 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx +++ b/x-pack/plugins/observability_solution/logs_explorer/public/components/data_source_selector/constants.tsx @@ -88,7 +88,7 @@ export const noDataRetryLabel = i18n.translate( ); export const tryEsql = i18n.translate('xpack.logsExplorer.dataSourceSelector.TryEsql', { - defaultMessage: 'Try ES|QL', + defaultMessage: 'Language: ES|QL', }); export const technicalPreview = i18n.translate('xpack.logsExplorer.TechPreview', {