Skip to content

Commit 3cb13fb

Browse files
1Copenutcee-chenkibanamachinenikitaindik
authored
Upgrade EUI to v88.1.0 (#165047)
## PR change summary `v87.2.0`⏩`v88.1.0` ⚠️ The biggest thing to QA in this PR is several **breaking changes** to `EuiDescriptionList`. ### Description list `columnWidths` prop This PR introduces a new `columnWidths` prop and removes several Kibana instances of custom CSS overrides to title/description column widths. The primary motivation behind this is not just to reduce custom CSS, but also because v88.0.0 introduced an underlying CSS change of `column` description lists to using [`display: grid` CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout). The new prop allows us to support existing description list custom widths while not requiring Kibana developers to understand or write grid CSS (except for 1 or two scenarios around `max-width`). ⚠️ **No user-facing UI around column widths should have regressed as a result of these changes. If they have, please let us know in this PR.** ### Description list gutter size changes The prop `gutterSize` has been renamed to `rowGutterSize` and the default size is now `s` instead of `m`. The change to `s` from `m` means there is an **expected** smaller gap between list items (see below screenshots): **Current `EuiDescriptionList` with default `rowGutterSize="s"`** <img width="753" alt="" src="https://github.com/elastic/kibana/assets/934879/c17aef28-ed3b-40c4-84c3-396e788b13bb"> **Prior `EuiDescriptionList` with default `gutterSize="m"`** <img width="721" alt="" src="https://github.com/elastic/kibana/assets/934879/84d5f5a2-8fa6-4f99-9dc0-73fd143aa1e1"> If Kibana teams prefer to keep the previous `m` gutter for their instances of `EuiDescriptionList`, you have a couple of options: 1. Let EUI team know in the PR and we can set usage back to what it was before 2. Set `rowGutterSize="m"` yourselves manually --- ## [`88.1.0`](https://github.com/elastic/eui/tree/v88.1.0) - Added `font.defaultUnits` theme token. EUI component font sizes default to `rem` units - this token allows consumers to configure this to `px` or `em` ([#7133](elastic/eui#7133)) - Updated `EuiDescriptionList` with new `columnWidths` prop ([#7146](elastic/eui#7146)) **Bug fixes** - Fixed `EuiDataGrid`'s keyboard shortcuts popover display ([#7146](elastic/eui#7146)) **CSS-in-JS conversions** - Renamed `useEuiFontSize()`'s `measurement` option to `unit` for clarity ([#7133](elastic/eui#7133)) ## [`88.0.0`](https://github.com/elastic/eui/tree/v88.0.0) - Updated `EuiDescriptionList` with a new `columnGutterSize` prop ([#7062](elastic/eui#7062)) **Deprecations** - Deprecated `EuiSuggest`. We recommend using `EuiSelectable` or `EuiComboBox` instead ([#7122](elastic/eui#7122)) - Deprecated `EuiControlBar`. We recommend using `EuiBottomBar` instead ([#7122](elastic/eui#7122)) - Deprecated `EuiColorStops`. We recommend copying the component to your application if necessary ([#7122](elastic/eui#7122)) - Deprecated `EuiNotificationEvent`. We recommend copying the component to your application if necessary ([#7122](elastic/eui#7122)) **Breaking changes** - Renamed `EuiDescriptionList`'s `gutterSize` prop to `rowGutterSize` ([#7062](elastic/eui#7062)) - `EuiDescriptionList`'s `rowGutterSize` prop now defaults to a size of `s` (was previously `m`) ([#7062](elastic/eui#7062)) **Accessibility** - Fixed the dark mode colors of inline `EuiDescriptionListTitle`s to meet WCAG color contrast requirements ([#7062](elastic/eui#7062)) **CSS-in-JS conversions** - Converted `EuiKeyPadMenuItem` to Emotion; Removed `$euiKeyPadMenuSize` and `$euiKeyPadMenuMarginSize` ([#7118](elastic/eui#7118)) --------- Co-authored-by: Cee Chen <[email protected]> Co-authored-by: Cee Chen <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Nikita Indik <[email protected]>
1 parent 889f067 commit 3cb13fb

File tree

53 files changed

+380
-550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+380
-550
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"@elastic/datemath": "5.0.3",
101101
"@elastic/elasticsearch": "npm:@elastic/[email protected]",
102102
"@elastic/ems-client": "8.4.0",
103-
"@elastic/eui": "87.2.0",
103+
"@elastic/eui": "88.1.0",
104104
"@elastic/filesaver": "1.1.2",
105105
"@elastic/node-crypto": "1.2.1",
106106
"@elastic/numeral": "^2.5.1",

src/dev/license_checker/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const LICENSE_OVERRIDES = {
8585
'[email protected]': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
8686
'@mapbox/[email protected]': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
8787
'@elastic/[email protected]': ['Elastic License 2.0'],
88-
'@elastic/eui@87.2.0': ['SSPL-1.0 OR Elastic License 2.0'],
88+
'@elastic/eui@88.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
8989
'[email protected]': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
9090
'[email protected]': ['MIT'], // license in importing module https://www.npmjs.com/package/binary
9191
};

src/plugins/data/public/shard_failure_modal/__snapshots__/shard_failure_description.test.tsx.snap

Lines changed: 12 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plugins/data/public/shard_failure_modal/_shard_failure_modal.scss

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,3 @@
1919
// could be much higher than the available screenspace
2020
max-width: 686px;
2121
}
22-
23-
.shardFailureModal__descTitle {
24-
width: 12% !important;
25-
}
26-
27-
.shardFailureModal__descValue {
28-
width: 88% !important;
29-
}
30-
31-
@include euiBreakpoint('xs','s') {
32-
.shardFailureModal__descTitle {
33-
width: 100% !important;
34-
}
35-
36-
.shardFailureModal__descValue {
37-
width: 100% !important;
38-
}
39-
}

src/plugins/data/public/shard_failure_modal/shard_failure_description.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function ShardFailureDescription(props: ShardFailure) {
9696
<EuiFlexItem grow={false}>
9797
<EuiDescriptionList
9898
type="responsiveColumn"
99-
gutterSize="s"
99+
columnWidths={[1, 6]}
100100
listItems={items}
101101
compressed
102102
className="shardFailureModal__desc"

x-pack/plugins/canvas/public/components/workpad_filters/filter.component.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ interface Props {
1616

1717
type CustomComponentProps = Omit<Props, 'filter'> & { value: string };
1818

19-
const titleStyle = {
20-
width: '30%',
21-
};
22-
23-
const descriptionStyle = {
24-
width: '70%',
25-
};
26-
2719
const renderElement = (
2820
Component: FC<
2921
Omit<CustomComponentProps, 'updateFilter'> & { onChange?: CustomComponentProps['updateFilter'] }
@@ -53,11 +45,12 @@ export const Filter: FC<Props> = ({ filter, ...restProps }) => {
5345
<EuiPanel grow={false} hasShadow={false} paddingSize="m">
5446
<EuiDescriptionList
5547
type="column"
48+
columnWidths={[3, 7]}
5649
className="workpadFilter"
5750
compressed
5851
listItems={filterView}
59-
titleProps={{ style: titleStyle, className: 'eui-textBreakWord' }}
60-
descriptionProps={{ style: descriptionStyle, className: 'eui-textBreakWord' }}
52+
titleProps={{ className: 'eui-textBreakWord' }}
53+
descriptionProps={{ className: 'eui-textBreakWord' }}
6154
/>
6255
</EuiPanel>
6356
);

x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_by_resource/severity_map.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
EuiFlexItem,
1515
EuiText,
1616
} from '@elastic/eui';
17-
import { ColorStop } from '@elastic/eui/src/components/color_picker/color_stops';
17+
import { PaletteColorStop } from '@elastic/eui/src/components/color_picker/color_palette_picker';
1818
import { i18n } from '@kbn/i18n';
1919
import { getSeverityStatusColor } from '../../../common/utils/get_vulnerability_colors';
2020
import { VulnSeverity } from '../../../../common/types';
@@ -53,7 +53,7 @@ const formatPercentage = (percentage: number) => {
5353
export const SeverityMap = ({ severityMap, total }: Props) => {
5454
const { euiTheme } = useEuiTheme();
5555

56-
const severityMapPallet: ColorStop[] = [];
56+
const severityMapPallet: PaletteColorStop[] = [];
5757
const severityMapTooltip: SeverityMapTooltip[] = [];
5858

5959
if (total > 0) {

x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/_index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import 'analysis_summary/index';
21
@import 'edit_flyout/index';
32
@import 'file_contents/index';
43
@import 'import_summary/index';

x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/analysis_summary/_analysis_summary.scss

Lines changed: 0 additions & 11 deletions
This file was deleted.

x-pack/plugins/data_visualizer/public/application/file_data_visualizer/components/analysis_summary/_index.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)