From 41fa8b2408f8d41be6ee1dc93787bf749aec94fd Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Mon, 10 May 2021 10:09:53 -0400 Subject: [PATCH 1/4] address copy feedback --- .../kibana_deprecations.tsx | 3 +- .../resolve_deprecation_modal.tsx | 2 +- .../kibana_deprecations/steps_modal.tsx | 44 +++++++------------ .../application/components/shared/health.tsx | 4 +- .../shared/search_bar/group_by_filter.tsx | 4 +- .../shared/search_bar/level_filter.tsx | 8 +--- 6 files changed, 23 insertions(+), 42 deletions(-) diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx index bb8a7366beb4e..a9608109728ba 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/kibana_deprecations.tsx @@ -33,7 +33,8 @@ const i18nTexts = { defaultMessage: 'Kibana', }), pageDescription: i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.pageDescription', { - defaultMessage: 'Some Kibana issues may require your attention. Resolve them before upgrading.', + defaultMessage: + 'Review the issues listed here and make the necessary changes before upgrading. Critical issues must be resolved before you upgrade.', }), docLinkText: i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.docLinkText', { defaultMessage: 'Documentation', diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/resolve_deprecation_modal.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/resolve_deprecation_modal.tsx index dd78c3513f973..f94512fac5630 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/resolve_deprecation_modal.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/resolve_deprecation_modal.tsx @@ -23,7 +23,7 @@ const i18nTexts = { i18n.translate( 'xpack.upgradeAssistant.kibanaDeprecations.resolveConfirmationModal.modalTitle', { - defaultMessage: "Resolve '{domainId}'?", + defaultMessage: "Resolve deprecation in '{domainId}'?", values: { domainId, }, diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx index 7646fcba6ad3c..ad66549149e23 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx @@ -38,7 +38,7 @@ interface Props { const i18nTexts = { getModalTitle: (domainId: string) => i18n.translate('xpack.upgradeAssistant.kibanaDeprecations.stepsModal.modalTitle', { - defaultMessage: "Fix '{domainId}'", + defaultMessage: "Resolve deprecation in '{domainId}'", values: { domainId, }, @@ -50,12 +50,6 @@ const i18nTexts = { step, }, }), - modalDescription: i18n.translate( - 'xpack.upgradeAssistant.kibanaDeprecations.stepsModal.modalDescription', - { - defaultMessage: 'Follow the steps below to address this deprecation.', - } - ), docLinkLabel: i18n.translate( 'xpack.upgradeAssistant.kibanaDeprecations.stepsModal.docLinkLabel', { @@ -84,28 +78,20 @@ export const StepsModal: FunctionComponent = ({ closeModal, modalContent - <> - -

{i18nTexts.modalDescription}

-
- - - - { - return { - title: i18nTexts.getStepTitle(index + 1), - children: ( - -

{step}

-
- ), - }; - })} - /> - + { + return { + title: i18nTexts.getStepTitle(index + 1), + children: ( + +

{step}

+
+ ), + }; + })} + />
diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/health.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/shared/health.tsx index 362b2af684e27..9bf35668ac88a 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/health.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/health.tsx @@ -16,10 +16,10 @@ import { COLOR_MAP, REVERSE_LEVEL_MAP } from '../constants'; const LocalizedLevels: { [level: string]: string } = { warning: i18n.translate('xpack.upgradeAssistant.checkupTab.deprecations.warningLabel', { - defaultMessage: 'warning', + defaultMessage: 'Warning', }), critical: i18n.translate('xpack.upgradeAssistant.checkupTab.deprecations.criticalLabel', { - defaultMessage: 'critical', + defaultMessage: 'Critical', }), }; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/group_by_filter.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/group_by_filter.tsx index d6a3cab9ba160..c37ae47793b95 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/group_by_filter.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/group_by_filter.tsx @@ -14,10 +14,10 @@ import { GroupByOption } from '../../types'; const LocalizedOptions: { [option: string]: string } = { message: i18n.translate('xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel', { - defaultMessage: 'by issue', + defaultMessage: 'By issue', }), index: i18n.translate('xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel', { - defaultMessage: 'by index', + defaultMessage: 'By index', }), }; diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/level_filter.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/level_filter.tsx index 108087e2ae992..59bfaa595b0a6 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/level_filter.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/level_filter.tsx @@ -13,15 +13,9 @@ import { i18n } from '@kbn/i18n'; import { LevelFilterOption } from '../../types'; const LocalizedOptions: { [option: string]: string } = { - warning: i18n.translate( - 'xpack.upgradeAssistant.checkupTab.controls.filterBar.warningButtonLabel', - { - defaultMessage: 'warning', - } - ), critical: i18n.translate( 'xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel', - { defaultMessage: 'critical' } + { defaultMessage: 'Critical' } ), }; interface DeprecationLevelProps { From 6490fbee4fe04e65f5bafb16f6dfeba25d15b8f5 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Mon, 10 May 2021 10:13:19 -0400 Subject: [PATCH 2/4] update i18n --- x-pack/plugins/translations/translations/ja-JP.json | 1 - x-pack/plugins/translations/translations/zh-CN.json | 1 - 2 files changed, 2 deletions(-) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index c432809355e0f..9db2c32abf4a1 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -23961,7 +23961,6 @@ "xpack.upgradeAssistant.checkupTab.changeFiltersShowMoreLabel": "より多く表示させるにはフィルターを変更します。", "xpack.upgradeAssistant.checkupTab.confirmationModal.removeButtonLabel": "削除", "xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel": "致命的", - "xpack.upgradeAssistant.checkupTab.controls.filterBar.warningButtonLabel": "警告", "xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel": "インデックス別", "xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel": "問題別", "xpack.upgradeAssistant.checkupTab.deprecations.criticalActionTooltip": "アップグレード前にこの問題を解決してください。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 46117f739f985..779e1178b48de 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -24333,7 +24333,6 @@ "xpack.upgradeAssistant.checkupTab.changeFiltersShowMoreLabel": "更改筛选以显示更多内容。", "xpack.upgradeAssistant.checkupTab.confirmationModal.removeButtonLabel": "移除", "xpack.upgradeAssistant.checkupTab.controls.filterBar.criticalButtonLabel": "紧急", - "xpack.upgradeAssistant.checkupTab.controls.filterBar.warningButtonLabel": "警告", "xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIndexLabel": "按索引", "xpack.upgradeAssistant.checkupTab.controls.groupByBar.byIssueLabel": "按问题", "xpack.upgradeAssistant.checkupTab.deprecations.criticalActionTooltip": "请解决此问题后再升级。", From 4396fdb4859d55d5e07520af721d39b924393bcb Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Mon, 10 May 2021 11:03:34 -0400 Subject: [PATCH 3/4] remove unused import --- .../application/components/kibana_deprecations/steps_modal.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx index ad66549149e23..98027d4f46aac 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/kibana_deprecations/steps_modal.tsx @@ -11,7 +11,6 @@ import { i18n } from '@kbn/i18n'; import { EuiText, EuiSteps, - EuiSpacer, EuiButton, EuiModal, EuiModalBody, From 624fbbf0e86a6a5c49fa9d180f8d7d2efbb86113 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Mon, 10 May 2021 12:20:57 -0400 Subject: [PATCH 4/4] update tests --- .../search_bar/__snapshots__/group_by_filter.test.tsx.snap | 4 ++-- .../search_bar/__snapshots__/level_filter.test.tsx.snap | 2 +- .../upgrade_assistant/tests_client_integration/kibana.test.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/group_by_filter.test.tsx.snap b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/group_by_filter.test.tsx.snap index 64def47db1350..5a8619e1e687b 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/group_by_filter.test.tsx.snap +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/group_by_filter.test.tsx.snap @@ -10,14 +10,14 @@ exports[`GroupByFilter renders 1`] = ` key="message" onClick={[Function]} > - by issue + By issue - by index + By index diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/level_filter.test.tsx.snap b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/level_filter.test.tsx.snap index 4865c5fa8eb55..551e212f23dd7 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/level_filter.test.tsx.snap +++ b/x-pack/plugins/upgrade_assistant/public/application/components/shared/search_bar/__snapshots__/level_filter.test.tsx.snap @@ -12,7 +12,7 @@ exports[`DeprecationLevelFilter renders 1`] = ` numFilters={1} onClick={[Function]} > - critical + Critical diff --git a/x-pack/plugins/upgrade_assistant/tests_client_integration/kibana.test.ts b/x-pack/plugins/upgrade_assistant/tests_client_integration/kibana.test.ts index fef0fedf4cce6..867440ae0d911 100644 --- a/x-pack/plugins/upgrade_assistant/tests_client_integration/kibana.test.ts +++ b/x-pack/plugins/upgrade_assistant/tests_client_integration/kibana.test.ts @@ -79,7 +79,7 @@ describe('Kibana deprecations', () => { let modal = document.body.querySelector('[data-test-subj="stepsModal"]'); expect(modal).not.toBe(null); - expect(modal!.textContent).toContain(`Fix '${deprecation.domainId}'`); + expect(modal!.textContent).toContain(`Resolve deprecation in '${deprecation.domainId}'`); const steps: NodeListOf | null = modal!.querySelectorAll( '[data-test-subj="fixDeprecationSteps"] .euiStep' @@ -127,7 +127,7 @@ describe('Kibana deprecations', () => { let modal = document.body.querySelector('[data-test-subj="resolveModal"]'); expect(modal).not.toBe(null); - expect(modal!.textContent).toContain(`Resolve '${deprecation.domainId}'`); + expect(modal!.textContent).toContain(`Resolve deprecation in '${deprecation.domainId}'`); const confirmButton: HTMLButtonElement | null = modal!.querySelector( '[data-test-subj="confirmModalConfirmButton"]'