From 7a2edb4811dad4aec91a7a195cd1e51cd5b49a32 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 --- .../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 10bbde47a106f..1a92aa7ba5517 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'; @@ -317,24 +317,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', @@ -345,7 +330,7 @@ export class SpacesGridPage extends Component { render: (solution: Space['solution'], record: Space) => ( ), - width: '10%', + width: '18%', }); } @@ -431,6 +416,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 9866bea029a98..430bfe16916f3 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -44873,7 +44873,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 08befe63cfa0a..c2f25cdf5c403 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -44837,7 +44837,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 e357618355f9b..4c34286ca50be 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -44147,7 +44147,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": "解决方案视图",