From 8ec92f75cfb41aeb4cca0c5af9c329bea7ef227e Mon Sep 17 00:00:00 2001 From: nreese Date: Thu, 10 Aug 2023 13:26:20 -0600 Subject: [PATCH 1/4] remove unused controls callout strings --- .../public/control_group/control_group_strings.ts | 13 ------------- x-pack/plugins/translations/translations/fr-FR.json | 3 --- x-pack/plugins/translations/translations/ja-JP.json | 3 --- x-pack/plugins/translations/translations/zh-CN.json | 3 --- 4 files changed, 22 deletions(-) diff --git a/src/plugins/controls/public/control_group/control_group_strings.ts b/src/plugins/controls/public/control_group/control_group_strings.ts index fa66f1e593e48..69760e1c3c080 100644 --- a/src/plugins/controls/public/control_group/control_group_strings.ts +++ b/src/plugins/controls/public/control_group/control_group_strings.ts @@ -10,15 +10,6 @@ import { i18n } from '@kbn/i18n'; export const ControlGroupStrings = { emptyState: { - getBadge: () => - i18n.translate('controls.controlGroup.emptyState.badgeText', { - defaultMessage: 'New', - }), - getCallToAction: () => - i18n.translate('controls.controlGroup.emptyState.callToAction', { - defaultMessage: - 'Filtering your data just got better with Controls, letting you display only the data you want to explore.', - }), getAddControlButtonTitle: () => i18n.translate('controls.controlGroup.emptyState.addControlButtonTitle', { defaultMessage: 'Add control', @@ -27,10 +18,6 @@ export const ControlGroupStrings = { i18n.translate('controls.controlGroup.emptyState.twoLineLoadingTitle', { defaultMessage: '...', }), - getDismissButton: () => - i18n.translate('controls.controlGroup.emptyState.dismissButton', { - defaultMessage: 'Dismiss', - }), }, manageControl: { getFlyoutCreateTitle: () => diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index dcd9d175820be..0a248d1a0e989 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -412,9 +412,6 @@ "controls.rangeSlider.errors.dataViewNotFound": "Impossible de localiser la vue de données : {dataViewId}", "controls.rangeSlider.errors.fieldNotFound": "Impossible de localiser le champ : {fieldName}", "controls.controlGroup.emptyState.addControlButtonTitle": "Ajouter un contrôle", - "controls.controlGroup.emptyState.badgeText": "Nouveauté", - "controls.controlGroup.emptyState.callToAction": "Le filtrage des données s'est amélioré grâce aux contrôles, qui vous permettent d'afficher uniquement les données que vous souhaitez explorer.", - "controls.controlGroup.emptyState.dismissButton": "Rejeter", "controls.controlGroup.emptyState.twoLineLoadingTitle": "...", "controls.controlGroup.floatingActions.clearTitle": "Effacer", "controls.controlGroup.floatingActions.editTitle": "Modifier", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index f49042924be5d..4291d4088cb0e 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -412,9 +412,6 @@ "controls.rangeSlider.errors.dataViewNotFound": "データビューが見つかりませんでした:{dataViewId}", "controls.rangeSlider.errors.fieldNotFound": "フィールドが見つかりませんでした:{fieldName}", "controls.controlGroup.emptyState.addControlButtonTitle": "コントロールを追加", - "controls.controlGroup.emptyState.badgeText": "新規", - "controls.controlGroup.emptyState.callToAction": "データのフィルタリングはコントロールによって効果的になりました。探索するデータのみを表示できます。", - "controls.controlGroup.emptyState.dismissButton": "閉じる", "controls.controlGroup.emptyState.twoLineLoadingTitle": "...", "controls.controlGroup.floatingActions.clearTitle": "クリア", "controls.controlGroup.floatingActions.editTitle": "編集", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 1556ea23a7cc3..e8cb5d13587bb 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -412,9 +412,6 @@ "controls.rangeSlider.errors.dataViewNotFound": "找不到数据视图:{dataViewId}", "controls.rangeSlider.errors.fieldNotFound": "找不到字段:{fieldName}", "controls.controlGroup.emptyState.addControlButtonTitle": "添加控件", - "controls.controlGroup.emptyState.badgeText": "新建", - "controls.controlGroup.emptyState.callToAction": "使用控件可以更有效地筛选数据,允许您仅显示要浏览的数据。", - "controls.controlGroup.emptyState.dismissButton": "关闭", "controls.controlGroup.emptyState.twoLineLoadingTitle": "...", "controls.controlGroup.floatingActions.clearTitle": "清除", "controls.controlGroup.floatingActions.editTitle": "编辑", From b9447fb73bce878ac3592540527cba0ebefcd6a3 Mon Sep 17 00:00:00 2001 From: nreese Date: Thu, 10 Aug 2023 13:37:39 -0600 Subject: [PATCH 2/4] remove empty strings --- .../component/control_frame_component.tsx | 2 +- .../public/control_group/control_group_strings.ts | 10 ---------- x-pack/plugins/translations/translations/fr-FR.json | 2 -- x-pack/plugins/translations/translations/ja-JP.json | 2 -- x-pack/plugins/translations/translations/zh-CN.json | 2 -- 5 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/plugins/controls/public/control_group/component/control_frame_component.tsx b/src/plugins/controls/public/control_group/component/control_frame_component.tsx index 6cb9a9b0cb970..d3f28bbe7795e 100644 --- a/src/plugins/controls/public/control_group/component/control_frame_component.tsx +++ b/src/plugins/controls/public/control_group/component/control_frame_component.tsx @@ -137,7 +137,7 @@ export const ControlFrame = ({ fullWidth label={ usingTwoLineLayout - ? title || ControlGroupStrings.emptyState.getTwoLineLoadingTitle() + ? title || '' : undefined } > diff --git a/src/plugins/controls/public/control_group/control_group_strings.ts b/src/plugins/controls/public/control_group/control_group_strings.ts index 69760e1c3c080..6de3797b2e9c4 100644 --- a/src/plugins/controls/public/control_group/control_group_strings.ts +++ b/src/plugins/controls/public/control_group/control_group_strings.ts @@ -9,16 +9,6 @@ import { i18n } from '@kbn/i18n'; export const ControlGroupStrings = { - emptyState: { - getAddControlButtonTitle: () => - i18n.translate('controls.controlGroup.emptyState.addControlButtonTitle', { - defaultMessage: 'Add control', - }), - getTwoLineLoadingTitle: () => - i18n.translate('controls.controlGroup.emptyState.twoLineLoadingTitle', { - defaultMessage: '...', - }), - }, manageControl: { getFlyoutCreateTitle: () => i18n.translate('controls.controlGroup.manageControl.createFlyoutTitle', { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 0a248d1a0e989..f0b0a4126e7c6 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -411,8 +411,6 @@ "controls.optionsList.popover.suggestionsAriaLabel": "{optionCount, plural, one {option disponible} many {options disponibles} other {options disponibles}} pour {fieldName}", "controls.rangeSlider.errors.dataViewNotFound": "Impossible de localiser la vue de données : {dataViewId}", "controls.rangeSlider.errors.fieldNotFound": "Impossible de localiser le champ : {fieldName}", - "controls.controlGroup.emptyState.addControlButtonTitle": "Ajouter un contrôle", - "controls.controlGroup.emptyState.twoLineLoadingTitle": "...", "controls.controlGroup.floatingActions.clearTitle": "Effacer", "controls.controlGroup.floatingActions.editTitle": "Modifier", "controls.controlGroup.floatingActions.removeTitle": "Supprimer", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 4291d4088cb0e..9877e14b47648 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -411,8 +411,6 @@ "controls.optionsList.popover.suggestionsAriaLabel": "{fieldName}の{optionCount, plural, other {オプション}}があります", "controls.rangeSlider.errors.dataViewNotFound": "データビューが見つかりませんでした:{dataViewId}", "controls.rangeSlider.errors.fieldNotFound": "フィールドが見つかりませんでした:{fieldName}", - "controls.controlGroup.emptyState.addControlButtonTitle": "コントロールを追加", - "controls.controlGroup.emptyState.twoLineLoadingTitle": "...", "controls.controlGroup.floatingActions.clearTitle": "クリア", "controls.controlGroup.floatingActions.editTitle": "編集", "controls.controlGroup.floatingActions.removeTitle": "削除", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index e8cb5d13587bb..587e5ad957842 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -411,8 +411,6 @@ "controls.optionsList.popover.suggestionsAriaLabel": "{fieldName} 的可用{optionCount, plural, other {选项}}", "controls.rangeSlider.errors.dataViewNotFound": "找不到数据视图:{dataViewId}", "controls.rangeSlider.errors.fieldNotFound": "找不到字段:{fieldName}", - "controls.controlGroup.emptyState.addControlButtonTitle": "添加控件", - "controls.controlGroup.emptyState.twoLineLoadingTitle": "...", "controls.controlGroup.floatingActions.clearTitle": "清除", "controls.controlGroup.floatingActions.editTitle": "编辑", "controls.controlGroup.floatingActions.removeTitle": "删除", From 2f71b0445e948a7f920a6e04291778c2d17cc62a Mon Sep 17 00:00:00 2001 From: nreese Date: Thu, 10 Aug 2023 13:39:26 -0600 Subject: [PATCH 3/4] add dot --- .../public/control_group/component/control_frame_component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/controls/public/control_group/component/control_frame_component.tsx b/src/plugins/controls/public/control_group/component/control_frame_component.tsx index d3f28bbe7795e..a6ea9fac40ed5 100644 --- a/src/plugins/controls/public/control_group/component/control_frame_component.tsx +++ b/src/plugins/controls/public/control_group/component/control_frame_component.tsx @@ -137,7 +137,7 @@ export const ControlFrame = ({ fullWidth label={ usingTwoLineLayout - ? title || '' + ? title || '...' : undefined } > From 5cb88715baf2943c4200cd52cbde8ea95d673d0a Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 10 Aug 2023 19:50:37 +0000 Subject: [PATCH 4/4] [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' --- .../control_group/component/control_frame_component.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/plugins/controls/public/control_group/component/control_frame_component.tsx b/src/plugins/controls/public/control_group/component/control_frame_component.tsx index a6ea9fac40ed5..babf862a05c9e 100644 --- a/src/plugins/controls/public/control_group/component/control_frame_component.tsx +++ b/src/plugins/controls/public/control_group/component/control_frame_component.tsx @@ -23,7 +23,6 @@ import { controlGroupSelector, useControlGroupContainer, } from '../embeddable/control_group_container'; -import { ControlGroupStrings } from '../control_group_strings'; import { useChildEmbeddable } from '../../hooks/use_child_embeddable'; import { ControlError } from './control_error_component'; @@ -135,11 +134,7 @@ export const ControlFrame = ({ {form}