From 2094b786853efd45809f02c3cbf5187f1a47b873 Mon Sep 17 00:00:00 2001 From: Tim Sullivan Date: Tue, 26 Nov 2024 17:03:49 -0700 Subject: [PATCH] =?UTF-8?q?[Spaces]=20Remove=20=E2=80=9Cidentifier?= =?UTF-8?q?=E2=80=9D=20column=20from=20Spaces=20listing=20(#201290)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Addresses: https://github.com/elastic/kibana-team/issues/1241?reload=1#top Closes: https://github.com/elastic/kibana/issues/195590 ### Changes 1. Remove the "identifier" column from the Spaces grid listing 1. Add a readonly text field to the Space edit form to allow users to see the identifier 2. Remove granular width adjustments from the "Description" and "Solution view" columns to avoid header titles from showing ellipses ### Screenshots **Spaces listing, before:** image **Spaces listing, after:** image **Spaces edit form, before** image **Spaces edit form, after** image (cherry picked from commit 7a2edb4811dad4aec91a7a195cd1e51cd5b49a32) --- .../customize_space.test.tsx.snap | 1 + .../customize_space/customize_space.tsx | 49 +++++++++---------- .../spaces_grid/spaces_grid_page.tsx | 20 ++------ .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 6 files changed, 28 insertions(+), 45 deletions(-) diff --git a/x-pack/plugins/spaces/public/management/components/customize_space/__snapshots__/customize_space.test.tsx.snap b/x-pack/plugins/spaces/public/management/components/customize_space/__snapshots__/customize_space.test.tsx.snap index fe9692a971d3f..78cbe099ac92a 100644 --- a/x-pack/plugins/spaces/public/management/components/customize_space/__snapshots__/customize_space.test.tsx.snap +++ b/x-pack/plugins/spaces/public/management/components/customize_space/__snapshots__/customize_space.test.tsx.snap @@ -82,6 +82,7 @@ exports[`renders correctly 1`] = ` > { /> - {editingExistingSpace ? null : ( - - } - helpText={ - - } - {...this.props.validator.validateURLIdentifier(this.props.space)} - fullWidth - > - - - )} + } + helpText={ + + } + {...this.props.validator.validateURLIdentifier(this.props.space)} + fullWidth + > + + ); diff --git a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx index f11f80ab20a1c..906b806c91fa5 100644 --- a/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx +++ b/x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.tsx @@ -34,7 +34,7 @@ import { reactRouterNavigate } from '@kbn/kibana-react-plugin/public'; import { addSpaceIdToPath, type Space } from '../../../common'; import { isReservedSpace } from '../../../common'; -import { DEFAULT_SPACE_ID, ENTER_SPACE_PATH } from '../../../common/constants'; +import { ENTER_SPACE_PATH } from '../../../common/constants'; import { getSpacesFeatureDescription } from '../../constants'; import { getSpaceAvatarComponent } from '../../space_avatar'; import { SpaceSolutionBadge } from '../../space_solution_badge'; @@ -316,24 +316,9 @@ export class SpacesGridPage extends Component { }), sortable: true, truncateText: true, - width: '40%', }, ]; - config.push({ - field: 'id', - name: i18n.translate('xpack.spaces.management.spacesGridPage.identifierColumnName', { - defaultMessage: 'Identifier', - }), - sortable: true, - render(id: string) { - if (id === DEFAULT_SPACE_ID) { - return ''; - } - return id; - }, - }); - if (this.props.allowSolutionVisibility) { config.push({ field: 'solution', @@ -344,7 +329,7 @@ export class SpacesGridPage extends Component { render: (solution: Space['solution'], record: Space) => ( ), - width: '10%', + width: '18%', }); } @@ -430,6 +415,7 @@ export class SpacesGridPage extends Component { 'data-test-subj': (rowRecord) => `${rowRecord.id}-deleteSpace`, }, ], + width: '18%', }); return config; diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 5f6c9203803dd..a55585e9436a9 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -44793,7 +44793,6 @@ "xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "Modifier {spaceName}.", "xpack.spaces.management.spacesGridPage.editSpaceActionName": "Modifier", "xpack.spaces.management.spacesGridPage.errorTitle": "Erreur lors du chargement des espaces", - "xpack.spaces.management.spacesGridPage.identifierColumnName": "Identificateur", "xpack.spaces.management.spacesGridPage.loadingTitle": "chargement…", "xpack.spaces.management.spacesGridPage.searchPlaceholder": "Recherche", "xpack.spaces.management.spacesGridPage.solutionColumnName": "Afficher la solution", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 065e3c1bdd6cb..eda65ae0092a5 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -44642,7 +44642,6 @@ "xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "{spaceName} を編集。", "xpack.spaces.management.spacesGridPage.editSpaceActionName": "編集", "xpack.spaces.management.spacesGridPage.errorTitle": "スペースの読み込みエラー", - "xpack.spaces.management.spacesGridPage.identifierColumnName": "識別子", "xpack.spaces.management.spacesGridPage.loadingTitle": "読み込み中…", "xpack.spaces.management.spacesGridPage.searchPlaceholder": "検索", "xpack.spaces.management.spacesGridPage.solutionColumnName": "ソリューションビュー", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 04822b6a4519a..8f6a8ece8996d 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -44740,7 +44740,6 @@ "xpack.spaces.management.spacesGridPage.editSpaceActionDescription": "编辑 {spaceName}。", "xpack.spaces.management.spacesGridPage.editSpaceActionName": "编辑", "xpack.spaces.management.spacesGridPage.errorTitle": "加载工作区时出错", - "xpack.spaces.management.spacesGridPage.identifierColumnName": "标识符", "xpack.spaces.management.spacesGridPage.loadingTitle": "正在加载……", "xpack.spaces.management.spacesGridPage.searchPlaceholder": "搜索", "xpack.spaces.management.spacesGridPage.solutionColumnName": "解决方案视图",