Skip to content

Commit 487036e

Browse files
Update EUI to v108.0.0 (#240888)
- `@elastic/eui`: `v107.0.1` ⏩ `v108.0.0` - `@elastic/eui-theme-borealis`: `v3.6.0` ⏩ `v4.0.0` --- ## Changes >[!IMPORTANT] This PR removes code related to the legacy Amsterdam theme. But it purposefully keeps Amsterdam palettes in `kbn-palettes` as those are standalone. - removed code related to the legacy theme Amsterdam [[#9090](elastic/eui#9090)] - updated custom types to align with changes to the event type of `onClose` on `EuiModal` [[#9137](elastic/eui#9137)] ## Package updates ### [`v108.0.0`](https://github.com/elastic/eui/releases/v108.0.0) - Updated `EuiModal` to support closing on outside click, via the new `outsideClickCloses` prop ([#9137](elastic/eui#9137)) **Breaking changes** - Removed all "Amsterdam" theme related code in `src/themes/amsterdam` - EUI now only supports the "Borealis" theme in `eui-theme-borealis` ([#9090](elastic/eui#9090)) - Removed `euiTheme.flags.hasGlobalFocusColor` ([#9090](elastic/eui#9090)) - Removed `euiTheme.flags.hasVisColorAdjustment` ([#9090](elastic/eui#9090)) - Removed `hasVisColorAdjustment` argument from color palettes (used in `euiPaletteColorBlindBehindText`, `euiPaletteForTemperature`, `euiPaletteComplementary`, `euiPaletteCool`) ([#9090](elastic/eui#9090)) - Removed `euiTheme.flags.buttonVariant` and `euiTheme.flags.formVariant` ([#9090](elastic/eui#9090)) - Removed `euiTheme.components.keyPadMenuItemBackgroundDisabledSelect` ([#9090](elastic/eui#9090)) - Removed legacy SCSS files from `src/global_styling/variables`, `src/global_styling/mixins` and `src/global_styling/functions` - if needed, use them from `eui-theme-common` instead ([#9090](elastic/eui#9090)) ### [`v4.0.0`](https://github.com/elastic/eui/releases/v4.0.0) **Breaking changes** - Removed `euiTheme.flags.hasGlobalFocusColor` ([#9090](elastic/eui#9090)) - Removed `euiTheme.flags.hasVisColorAdjustment` ([#9090](elastic/eui#9090)) - Removed `euiTheme.flags.buttonVariant` and `euiTheme.flags.formVariant` ([#9090](elastic/eui#9090)) - Removed `euiTheme.components.keyPadMenuItemBackgroundDisabledSelect` ([#9090](elastic/eui#9090)) --------- Co-authored-by: Elastic Machine <[email protected]>
1 parent d092949 commit 487036e

File tree

144 files changed

+333
-887
lines changed

Some content is hidden

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

144 files changed

+333
-887
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@
129129
"@elastic/ecs": "^9.0.0",
130130
"@elastic/elasticsearch": "9.1.1",
131131
"@elastic/ems-client": "8.6.3",
132-
"@elastic/eui": "107.0.1",
133-
"@elastic/eui-theme-borealis": "3.6.0",
132+
"@elastic/eui": "108.0.0",
133+
"@elastic/eui-theme-borealis": "4.0.0",
134134
"@elastic/filesaver": "1.1.2",
135135
"@elastic/kibana-d3-color": "npm:@elastic/[email protected]",
136136
"@elastic/monaco-esql": "^3.1.11",

packages/kbn-optimizer/README.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ Any import in a bundle which resolves into another bundles "context" directory,
5151

5252
## Themes
5353

54-
SASS imports in bundles are automatically converted to CSS for one or more themes. In development we build the `v8light` and `v8dark` themes by default to improve build performance. When producing distributable bundles the default shifts to `*` so that the distributable bundles will include all themes, preventing the bundles from needing to be rebuilt when users change the active theme in Kibana's advanced settings.
54+
SASS imports in bundles are automatically converted to CSS for one or more themes. In development we build the `borealislight` and `borealisdark` themes by default to improve build performance. When producing distributable bundles the default shifts to `*` so that the distributable bundles will include all themes, preventing the bundles from needing to be rebuilt when users change the active theme in Kibana's advanced settings.
5555

5656
To customize the themes that are built for development you can specify the `KBN_OPTIMIZER_THEMES` environment variable to one or more theme tags, or use `*` to build styles for all themes. Unfortunately building more than one theme significantly impacts build performance, so try to be strategic about which themes you build.
5757

58-
Currently supported theme tags: `v8light`, `v8dark`
58+
Currently supported theme tags: `borealislight`, `borealisdark`
5959

6060
Examples:
6161
```sh
6262
# start Kibana with only a single theme
63-
KBN_OPTIMIZER_THEMES=v8light yarn start
63+
KBN_OPTIMIZER_THEMES=borealislight yarn start
6464

6565
# start Kibana with all the themes
6666
KBN_OPTIMIZER_THEMES=* yarn start

src/core/packages/injected-metadata/browser-mocks/src/injected_metadata_service.mock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const createSetupContractMock = () => {
4343
} as any),
4444
getTheme: jest.fn().mockReturnValue({
4545
darkMode: false,
46-
name: 'amsterdam',
46+
name: 'borealis',
4747
version: 'v8',
4848
stylesheetPaths: {
4949
default: ['light-1.css'],

src/core/packages/notifications/browser-internal/src/toasts/__snapshots__/error_toast.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/packages/rendering/server-internal/src/bootstrap/__snapshots__/render_template.test.ts.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/packages/rendering/server-internal/src/bootstrap/bootstrap_renderer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,15 @@ describe('bootstrapRenderer', () => {
395395
})
396396
);
397397

398-
themeName$.next('amsterdam');
398+
themeName$.next('borealis');
399399
await renderer({
400400
request,
401401
uiSettingsClient,
402402
});
403403

404404
expect(renderTemplateMock).toHaveBeenCalledWith(
405405
expect.objectContaining({
406-
themeTagName: 'v8',
406+
themeTagName: 'borealis',
407407
})
408408
);
409409
});

src/core/packages/rendering/server-internal/src/bootstrap/bootstrap_renderer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ export const bootstrapRendererFactory: BootstrapRendererFactory = ({
8383
}
8484

8585
const colorMode = darkMode === false ? 'light' : darkMode === true ? 'dark' : 'system';
86-
// Amsterdam theme is called `v8` internally
87-
// and should be kept this way for compatibility reasons.
88-
const themeTagName = themeName === 'amsterdam' ? 'v8' : themeName;
86+
const themeTagName = themeName;
8987
const bundlesHref = getBundlesHref(baseHref);
9088

9189
const bundlePaths = getPluginsBundlePaths({

src/core/packages/rendering/server-internal/src/bootstrap/render_template.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { renderTemplate } from './render_template';
1111

1212
function mockParams() {
1313
return {
14-
themeTagName: 'v8',
14+
themeTagName: 'borealis',
1515
colorMode: 'light',
1616
jsDependencyPaths: ['/js-1', '/js-2'],
1717
styleSheetPaths: ['/style-1', '/style-2'],

src/core/packages/rendering/server-internal/src/render_utils.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ export const getScriptPaths = ({
4242
themeName: ThemeName;
4343
}) => {
4444
if (darkMode === 'system') {
45-
return [
46-
`${baseHref}/ui/bootstrap_system_theme_${
47-
themeName === 'borealis' ? 'borealis' : 'amsterdam'
48-
}.js`,
49-
];
45+
return [`${baseHref}/ui/bootstrap_system_theme_borealis.js`];
5046
} else {
5147
return [];
5248
}

src/core/packages/rendering/server-internal/src/rendering_service.test.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ describe('RenderingService', () => {
605605
});
606606

607607
describe('start()', () => {
608-
it('subscribes to the featureFlags.setStringValue$ observable and updates theme name accordingly', async () => {
608+
it('subscribes to the featureFlags.setStringValue$', async () => {
609609
// setup and render added to assert the current theme name
610610
const { render } = await service.setup(mockRenderingSetupDeps);
611611
const themeName$ = new BehaviorSubject<ThemeName>(DEFAULT_THEME_NAME);
@@ -631,15 +631,11 @@ describe('RenderingService', () => {
631631
globalClient: uiSettingsServiceMock.createClient(),
632632
};
633633

634-
getIsThemeBundledMock.mockImplementation((name) => ['borealis', 'amsterdam'].includes(name));
634+
getIsThemeBundledMock.mockImplementation((name) => name === 'borealis');
635635

636-
let renderResult = await render(createKibanaRequest(), uiSettings);
636+
const renderResult = await render(createKibanaRequest(), uiSettings);
637637
expect(getIsThemeBundledMock).toHaveBeenCalledWith('borealis');
638638
expect(renderResult).toContain(',&quot;name&quot;:&quot;borealis&quot;');
639-
640-
themeName$.next('amsterdam');
641-
renderResult = await render(createKibanaRequest(), uiSettings);
642-
expect(renderResult).toContain(',&quot;name&quot;:&quot;amsterdam&quot;');
643639
});
644640

645641
it('falls back to the default theme if theme is not bundled', async () => {

0 commit comments

Comments
 (0)