Skip to content

Commit 7fea362

Browse files
kibanamachineAlexGPlaykertal
authored
[8.19] [Discover] Add Actions header to unified data table (#214366) (#220824) (#222323)
# Backport This will backport the following commits from `main` to `8.19`: - [[Discover] Add Actions header to unified data table (#214366) (#220824)](#220824) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alejandro García Parrondo","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-06-03T10:06:52Z","message":"[Discover] Add Actions header to unified data table (#214366) (#220824)\n\n## Summary\n\nFor accesibility reasons we need to label all the headers. At this point\nin time the actions from the unified data table have an empty header,\nfor that we are grouping them in a column and labeling them as\n\"Actions\".\n\n| Scenario | Before | After (only icon) |\n|----------|--------|-----------------|\n| 1 icon | <img width=\"1035\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2884904b-42ce-432f-9cf7-90140c349ca2\"\n/> | <img width=\"1036\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/84947522-0426-4317-a642-1fb6cab27306\"\n/> |\n| Multiple icons | <img width=\"558\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/fe4be017-116d-4586-888d-0e81b0b0395e\"\n/> | <img width=\"557\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/58ea3261-703e-4d17-906c-29ee5a40569f\"\n/> |\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Matthias Wilhelm <[email protected]>","sha":"b4b49acb68b7460d970cec0c54990231ffd2e63c","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.1.0","v8.19.0"],"title":"[Discover] Add Actions header to unified data table (#214366)","number":220824,"url":"https://github.com/elastic/kibana/pull/220824","mergeCommit":{"message":"[Discover] Add Actions header to unified data table (#214366) (#220824)\n\n## Summary\n\nFor accesibility reasons we need to label all the headers. At this point\nin time the actions from the unified data table have an empty header,\nfor that we are grouping them in a column and labeling them as\n\"Actions\".\n\n| Scenario | Before | After (only icon) |\n|----------|--------|-----------------|\n| 1 icon | <img width=\"1035\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2884904b-42ce-432f-9cf7-90140c349ca2\"\n/> | <img width=\"1036\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/84947522-0426-4317-a642-1fb6cab27306\"\n/> |\n| Multiple icons | <img width=\"558\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/fe4be017-116d-4586-888d-0e81b0b0395e\"\n/> | <img width=\"557\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/58ea3261-703e-4d17-906c-29ee5a40569f\"\n/> |\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Matthias Wilhelm <[email protected]>","sha":"b4b49acb68b7460d970cec0c54990231ffd2e63c"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220824","number":220824,"mergeCommit":{"message":"[Discover] Add Actions header to unified data table (#214366) (#220824)\n\n## Summary\n\nFor accesibility reasons we need to label all the headers. At this point\nin time the actions from the unified data table have an empty header,\nfor that we are grouping them in a column and labeling them as\n\"Actions\".\n\n| Scenario | Before | After (only icon) |\n|----------|--------|-----------------|\n| 1 icon | <img width=\"1035\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2884904b-42ce-432f-9cf7-90140c349ca2\"\n/> | <img width=\"1036\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/84947522-0426-4317-a642-1fb6cab27306\"\n/> |\n| Multiple icons | <img width=\"558\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/fe4be017-116d-4586-888d-0e81b0b0395e\"\n/> | <img width=\"557\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/58ea3261-703e-4d17-906c-29ee5a40569f\"\n/> |\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [ ]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n- [ ] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n### Identify risks\n\nDoes this PR introduce any risks? For example, consider risks like hard\nto test bugs, performance regression, potential of data loss.\n\nDescribe the risk, its severity, and mitigation for each identified\nrisk. Invite stakeholders and evaluate how to proceed before merging.\n\n- [ ] [See some risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n- [ ] ...\n\n---------\n\nCo-authored-by: Matthias Wilhelm <[email protected]>","sha":"b4b49acb68b7460d970cec0c54990231ffd2e63c"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: Alejandro García Parrondo <[email protected]> Co-authored-by: Matthias Wilhelm <[email protected]> Co-authored-by: AlexGPlay <[email protected]>
1 parent 00665a1 commit 7fea362

File tree

29 files changed

+740
-191
lines changed

29 files changed

+740
-191
lines changed

src/platform/packages/shared/kbn-discover-utils/src/components/custom_control_columns/degraded_docs_control.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ interface DegradedDocsControlProps extends Partial<RowControlProps> {
3030
*/
3131
export const createDegradedDocsControl = (props?: DegradedDocsControlProps): RowControlColumn => ({
3232
id: 'connectedDegradedDocs',
33-
headerAriaLabel: actionsHeaderAriaLabelDegradedAction,
34-
renderControl: (Control, rowProps) => {
33+
render: (Control, rowProps) => {
3534
return <DegradedDocs Control={Control} rowProps={rowProps} {...props} />;
3635
},
3736
});

src/platform/packages/shared/kbn-discover-utils/src/components/custom_control_columns/stacktrace_control.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,11 @@ import { getStacktraceFields } from '../../utils/get_stack_trace_fields';
2424
*/
2525
export const createStacktraceControl = (props?: Partial<RowControlProps>): RowControlColumn => ({
2626
id: 'connectedStacktraceDocs',
27-
headerAriaLabel: actionsHeaderAriaLabelStacktraceAction,
28-
renderControl: (Control, rowProps) => {
27+
render: (Control, rowProps) => {
2928
return <Stacktrace Control={Control} rowProps={rowProps} {...props} />;
3029
},
3130
});
3231

33-
const actionsHeaderAriaLabelStacktraceAction = i18n.translate(
34-
'discover.customControl.stacktraceArialLabel',
35-
{ defaultMessage: 'Access to available stacktraces' }
36-
);
37-
3832
const stacktraceAvailableControlButton = i18n.translate(
3933
'discover.customControl.stacktrace.available',
4034
{ defaultMessage: 'Stacktraces available' }

src/platform/packages/shared/kbn-discover-utils/src/components/custom_control_columns/types.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import { EuiButtonIconProps, EuiDataGridControlColumn, IconType } from '@elastic/eui';
10+
import { EuiButtonIconProps, IconType } from '@elastic/eui';
1111
import type { Interpolation, Theme } from '@emotion/react';
1212
import React, { FC, ReactElement } from 'react';
1313
import { DataTableRecord } from '../../types';
@@ -32,7 +32,5 @@ export type RowControlComponent = FC<RowControlProps>;
3232

3333
export interface RowControlColumn {
3434
id: string;
35-
headerAriaLabel: string;
36-
headerCellRender?: EuiDataGridControlColumn['headerCellRender'];
37-
renderControl: (Control: RowControlComponent, props: RowControlRowProps) => ReactElement;
35+
render: (Control: RowControlComponent, props: RowControlRowProps) => ReactElement;
3836
}

src/platform/packages/shared/kbn-unified-data-table/__mocks__/external_control_columns.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ export const testLeadingControlColumn: EuiDataGridControlColumn = {
120120
};
121121

122122
export const mockRowAdditionalLeadingControls = ['visBarVerticalStacked', 'heart', 'inspect'].map(
123-
(iconType, index): RowControlColumn => ({
124-
id: `exampleControl_${iconType}`,
125-
headerAriaLabel: `Example Row Control ${iconType}`,
126-
renderControl: (Control, rowProps) => {
123+
(iconType): RowControlColumn => ({
124+
id: `exampleRowControl-${iconType}`,
125+
render: (Control, rowProps) => {
127126
return (
128127
<Control
129128
data-test-subj={`exampleRowControl-${iconType}`}

0 commit comments

Comments
 (0)