Skip to content

Commit ccdd2be

Browse files
[9.1] [Discover] Fix font size in a single document/flyover popover (#226259) (#226348)
# Backport This will backport the following commits from `main` to `9.1`: - [[Discover] Fix font size in a single document/flyover popover (#226259)](#226259) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ania Kowalska","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-03T08:24:50Z","message":"[Discover] Fix font size in a single document/flyover popover (#226259)\n\n## Summary\n\nCloses #226217\n\nThis PR adds unit to `euiTheme.font.scale.s` value, which fixes too\nsmall text.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/52a89b5f-a426-4934-b861-619e8d0bb483)\n\nAfter:\n<img width=\"525\" alt=\"Screenshot 2025-07-02 at 18 09 31\"\nsrc=\"https://github.com/user-attachments/assets/5f5e9e55-a86d-4d92-abf2-c500f5aeb2ce\"\n/>","sha":"5bd075c5648dfe86a0d5c17e32d5d1b67ab7472b","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:DataDiscovery","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Discover] Fix font size in a single document/flyover popover","number":226259,"url":"https://github.com/elastic/kibana/pull/226259","mergeCommit":{"message":"[Discover] Fix font size in a single document/flyover popover (#226259)\n\n## Summary\n\nCloses #226217\n\nThis PR adds unit to `euiTheme.font.scale.s` value, which fixes too\nsmall text.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/52a89b5f-a426-4934-b861-619e8d0bb483)\n\nAfter:\n<img width=\"525\" alt=\"Screenshot 2025-07-02 at 18 09 31\"\nsrc=\"https://github.com/user-attachments/assets/5f5e9e55-a86d-4d92-abf2-c500f5aeb2ce\"\n/>","sha":"5bd075c5648dfe86a0d5c17e32d5d1b67ab7472b"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/226259","number":226259,"mergeCommit":{"message":"[Discover] Fix font size in a single document/flyover popover (#226259)\n\n## Summary\n\nCloses #226217\n\nThis PR adds unit to `euiTheme.font.scale.s` value, which fixes too\nsmall text.\n\nBefore:\n\n![image](https://github.com/user-attachments/assets/52a89b5f-a426-4934-b861-619e8d0bb483)\n\nAfter:\n<img width=\"525\" alt=\"Screenshot 2025-07-02 at 18 09 31\"\nsrc=\"https://github.com/user-attachments/assets/5f5e9e55-a86d-4d92-abf2-c500f5aeb2ce\"\n/>","sha":"5bd075c5648dfe86a0d5c17e32d5d1b67ab7472b"}}]}] BACKPORT--> Co-authored-by: Ania Kowalska <[email protected]>
1 parent eea43c2 commit ccdd2be

File tree

1 file changed

+9
-4
lines changed
  • src/platform/plugins/shared/unified_doc_viewer/public/components/doc_viewer_table

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
EuiTextColor,
1717
EuiToolTip,
1818
useResizeObserver,
19+
euiFontSize,
1920
type UseEuiTheme,
2021
} from '@elastic/eui';
2122
import React, { Fragment, useCallback, useState } from 'react';
@@ -200,18 +201,22 @@ export const TableFieldValue = ({
200201
};
201202

202203
const componentStyles = {
203-
docViewerValue: ({ euiTheme }: UseEuiTheme) =>
204-
css({
204+
docViewerValue: (themeContext: UseEuiTheme) => {
205+
const { euiTheme } = themeContext;
206+
const { fontSize } = euiFontSize(themeContext, 's');
207+
208+
return css({
205209
wordBreak: 'break-all',
206210
wordWrap: 'break-word',
207211
whiteSpace: 'pre-wrap',
208212
lineHeight: euiTheme.font.lineHeightMultiplier,
209213
verticalAlign: 'top',
210214

211215
'.euiDataGridRowCell__popover &': {
212-
fontSize: euiTheme.font.scale.s,
216+
fontSize,
213217
},
214-
}),
218+
});
219+
},
215220
docViewerValueHighlighted: ({ euiTheme }: UseEuiTheme) =>
216221
css({
217222
fontWeight: euiTheme.font.weight.bold,

0 commit comments

Comments
 (0)