Skip to content

Commit

Permalink
[8.x] [Spaces] Remove “identifier” column from Spaces listing (#201290)…
Browse files Browse the repository at this point in the history
… (#203164)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Spaces] Remove “identifier” column from Spaces listing
(#201290)](#201290)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tim
Sullivan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-27T00:03:49Z","message":"[Spaces]
Remove “identifier” column from Spaces listing (#201290)\n\n##
Summary\r\n\r\nAddresses:\r\nhttps://github.com/elastic/kibana-team/issues/1241?reload=1#top\r\nCloses:
https://github.com/elastic/kibana/issues/195590\r\n\r\n### Changes\r\n1.
Remove the \"identifier\" column from the Spaces grid listing\r\n1. Add
a readonly text field to the Space edit form to allow users to\r\nsee
the identifier\r\n2. Remove granular width adjustments from the
\"Description\" and\r\n\"Solution view\" columns to avoid header titles
from showing ellipses\r\n\r\n### Screenshots\r\n**Spaces listing,
before:**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/7bc5a8d1-d9c2-4e03-af9b-1bf9025f2d70\">\r\n\r\n**Spaces
listing, after:**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/6f69b2cf-c381-43be-a6fd-e294f58b3f15\">\r\n\r\n**Spaces
edit form, before**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a622695f-400c-436c-9cbd-c110d83d3a53\">\r\n\r\n**Spaces
edit form, after**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d5f2fd3f-ec4b-49c8-aece-a5b10dec37b2\">","sha":"7a2edb4811dad4aec91a7a195cd1e51cd5b49a32","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Security","release_note:skip","backport
missing","v9.0.0","Team:SharedUX","backport:prev-minor"],"number":201290,"url":"https://github.com/elastic/kibana/pull/201290","mergeCommit":{"message":"[Spaces]
Remove “identifier” column from Spaces listing (#201290)\n\n##
Summary\r\n\r\nAddresses:\r\nhttps://github.com/elastic/kibana-team/issues/1241?reload=1#top\r\nCloses:
https://github.com/elastic/kibana/issues/195590\r\n\r\n### Changes\r\n1.
Remove the \"identifier\" column from the Spaces grid listing\r\n1. Add
a readonly text field to the Space edit form to allow users to\r\nsee
the identifier\r\n2. Remove granular width adjustments from the
\"Description\" and\r\n\"Solution view\" columns to avoid header titles
from showing ellipses\r\n\r\n### Screenshots\r\n**Spaces listing,
before:**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/7bc5a8d1-d9c2-4e03-af9b-1bf9025f2d70\">\r\n\r\n**Spaces
listing, after:**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/6f69b2cf-c381-43be-a6fd-e294f58b3f15\">\r\n\r\n**Spaces
edit form, before**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a622695f-400c-436c-9cbd-c110d83d3a53\">\r\n\r\n**Spaces
edit form, after**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d5f2fd3f-ec4b-49c8-aece-a5b10dec37b2\">","sha":"7a2edb4811dad4aec91a7a195cd1e51cd5b49a32"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201290","number":201290,"mergeCommit":{"message":"[Spaces]
Remove “identifier” column from Spaces listing (#201290)\n\n##
Summary\r\n\r\nAddresses:\r\nhttps://github.com/elastic/kibana-team/issues/1241?reload=1#top\r\nCloses:
https://github.com/elastic/kibana/issues/195590\r\n\r\n### Changes\r\n1.
Remove the \"identifier\" column from the Spaces grid listing\r\n1. Add
a readonly text field to the Space edit form to allow users to\r\nsee
the identifier\r\n2. Remove granular width adjustments from the
\"Description\" and\r\n\"Solution view\" columns to avoid header titles
from showing ellipses\r\n\r\n### Screenshots\r\n**Spaces listing,
before:**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/7bc5a8d1-d9c2-4e03-af9b-1bf9025f2d70\">\r\n\r\n**Spaces
listing, after:**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/6f69b2cf-c381-43be-a6fd-e294f58b3f15\">\r\n\r\n**Spaces
edit form, before**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a622695f-400c-436c-9cbd-c110d83d3a53\">\r\n\r\n**Spaces
edit form, after**\r\n<img width=\"2102\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d5f2fd3f-ec4b-49c8-aece-a5b10dec37b2\">","sha":"7a2edb4811dad4aec91a7a195cd1e51cd5b49a32"}}]}]
BACKPORT-->
  • Loading branch information
tsullivan authored Dec 9, 2024
1 parent 4d8e8d9 commit bb08df0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 45 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,31 @@ export class CustomizeSpace extends Component<Props, State> {
/>
</EuiFormRow>

{editingExistingSpace ? null : (
<EuiFormRow
label={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.urlIdentifierTitle"
defaultMessage="URL identifier"
/>
}
helpText={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.kibanaURLForSpaceIdentifierDescription"
defaultMessage="You can't change the URL identifier once created."
/>
}
{...this.props.validator.validateURLIdentifier(this.props.space)}
fullWidth
>
<EuiFieldText
data-test-subj="spaceURLDisplay"
value={this.props.space.id ?? ''}
onChange={this.onSpaceIdentifierChange}
isInvalid={this.props.validator.validateURLIdentifier(this.props.space).isInvalid}
fullWidth
<EuiFormRow
label={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.urlIdentifierTitle"
defaultMessage="URL identifier"
/>
</EuiFormRow>
)}
}
helpText={
<FormattedMessage
id="xpack.spaces.management.spaceIdentifier.kibanaURLForSpaceIdentifierDescription"
defaultMessage="You can't change the URL identifier once created."
/>
}
{...this.props.validator.validateURLIdentifier(this.props.space)}
fullWidth
>
<EuiFieldText
data-test-subj="spaceURLDisplay"
value={this.props.space.id ?? ''}
onChange={this.onSpaceIdentifierChange}
isInvalid={this.props.validator.validateURLIdentifier(this.props.space).isInvalid}
disabled={editingExistingSpace}
fullWidth
/>
</EuiFormRow>
</EuiDescribedFormGroup>
</SectionPanel>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -316,24 +316,9 @@ export class SpacesGridPage extends Component<Props, State> {
}),
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',
Expand All @@ -344,7 +329,7 @@ export class SpacesGridPage extends Component<Props, State> {
render: (solution: Space['solution'], record: Space) => (
<SpaceSolutionBadge solution={solution} data-test-subj={`${record.id}-solution`} />
),
width: '10%',
width: '18%',
});
}

Expand Down Expand Up @@ -430,6 +415,7 @@ export class SpacesGridPage extends Component<Props, State> {
'data-test-subj': (rowRecord) => `${rowRecord.id}-deleteSpace`,
},
],
width: '18%',
});

return config;
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -44781,7 +44781,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",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -44630,7 +44630,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": "ソリューションビュー",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -44728,7 +44728,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": "解决方案视图",
Expand Down

0 comments on commit bb08df0

Please sign in to comment.