Skip to content

Commit 08eb393

Browse files
authored
[Discover] Add info icon to doc viewer table (#214366) (#222299)
## Summary Closes #214366 | Before | After | |--------|------| | <img width="387" alt="image" src="https://github.com/user-attachments/assets/b0e011b9-5563-4b63-9632-cfed9d3eea1c" /> | <img width="389" alt="image" src="https://github.com/user-attachments/assets/b26696ab-ee6a-4433-8dd4-877e2d2e7d90" /> | ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
1 parent 0f4129f commit 08eb393

File tree

1 file changed

+6
-8
lines changed
  • src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_table

1 file changed

+6
-8
lines changed

src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_table/get_pin_control.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import React from 'react';
1111
import {
1212
EuiButtonIcon,
1313
EuiDataGridControlColumn,
14-
EuiScreenReaderOnly,
14+
EuiIconTip,
1515
EuiToolTip,
1616
useEuiTheme,
1717
} from '@elastic/eui';
@@ -71,17 +71,15 @@ export const getPinColumnControl = ({
7171
rows: FieldRow[];
7272
onTogglePinned: (fieldName: string) => void;
7373
}): EuiDataGridControlColumn => {
74+
const pinColumnHeader = i18n.translate('unifiedDocViewer.fieldsTable.pinControlColumnHeader', {
75+
defaultMessage: 'Pin field column',
76+
});
77+
7478
return {
7579
id: 'pin_field',
7680
width: 32,
7781
headerCellRender: () => (
78-
<EuiScreenReaderOnly>
79-
<span>
80-
{i18n.translate('unifiedDocViewer.fieldsTable.pinControlColumnHeader', {
81-
defaultMessage: 'Pin field column',
82-
})}
83-
</span>
84-
</EuiScreenReaderOnly>
82+
<EuiIconTip aria-label={pinColumnHeader} type="iInCircle" content={pinColumnHeader} />
8583
),
8684
rowCellRender: ({ rowIndex }) => {
8785
const row = rows[rowIndex];

0 commit comments

Comments
 (0)