kibana/packages
Tomasz Kajtoch 4dd8de807a
Make Amsterdam an opt-in theme (#212787)
## Summary

This PR updates `DEFAULT_THEME_TAGS` used to determine what theme tags
are bundled in Kibana by default to only include the Borealis theme,
specifically `borealislight` and `borealisdark` theme tags. This change
is expected to decrease bundle sizes significantly and get back to
bundling a single theme, not two (4 → 2 theme tags).

Now that Serverless, `9.0`, and `main` all run with Borealis, there's no
risk in removing Amsterdam from the bundle and decreasing Kibana bundle
sizes.

We need to keep the feature flag in code for the time being to easily
test future Borealis iterations.

Amsterdam will still be available as an opt-in theme and is meant to be
used locally when testing changes to be backported to 8.x versions that
use Amsterdam. To do so, Kibana needs to be started/built with
`KBN_OPTIMIZER_THEMES` environment variable set and the feature flag
overridden in `kibana.dev.yml`.

```yml
# config/kibana.dev.yml
feature_flags.overrides.coreRendering.defaultThemeName: amsterdam
```

```shell
# Run dev server with both borealis and Amsterdam theme tags
KBN_OPTIMIZER_THEMES="borealislight,borealisdark,v8light,v8dark" yarn start
```

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-04 13:40:06 +01:00
..
kbn-babel-preset [Fleet] Add SSL options to fleet server hosts settings (#208091) 2025-03-03 13:23:00 +01:00
kbn-bazel-runner Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-capture-oas-snapshot-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-check-mappings-update-cli [Fleet] Add SSL options to fleet server hosts settings (#208091) 2025-03-03 13:23:00 +01:00
kbn-check-prod-native-modules-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ci-stats-performance-metrics Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-ci-stats-shipper-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-cli-dev-mode Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-presentation (#204843) 2024-12-23 12:32:11 -06:00
kbn-dependency-ownership Add check to fail CI if any dependencies are unowned (#206679) 2025-01-16 09:59:04 -05:00
kbn-dependency-usage SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
kbn-docs-utils Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-visualizations (#202754) 2025-01-08 12:19:24 +01:00
kbn-eslint-config SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
kbn-eslint-plugin-css Resolve false positives with eslint no color rule (#204848) 2024-12-19 10:26:48 +00:00
kbn-eslint-plugin-disable Add ESLINT constraints to detect inter-group dependencies (#194810) 2024-10-22 06:34:19 -05:00
kbn-eslint-plugin-eslint [Hardening] Kibana Feature API Privileges Names (#208067) 2025-02-03 15:22:29 +01:00
kbn-eslint-plugin-i18n Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-visualizations (#202754) 2025-01-08 12:19:24 +01:00
kbn-eslint-plugin-imports chore(NA): upgrade to webpack 5 (#191106) 2025-02-14 03:01:36 +00:00
kbn-eslint-plugin-telemetry Sustainable Kibana Architecture: Move modules owned by @elastic/obs-ux-infra_services-team (#202830) 2024-12-29 09:58:37 +01:00
kbn-failed-test-reporter-cli Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
kbn-find-used-node-modules Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-generate SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
kbn-generate-console-definitions SKA: Categorise remaining packages (#205875) 2025-01-08 22:20:14 +01:00
kbn-import-locator Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-json-ast Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-kibana-manifest-schema Kibana Sustainable Architecture: Force visibility: 'private' for solutions in manifest (#199452) 2024-11-08 15:36:07 +01:00
kbn-lint-packages-cli [codeowners] Filter kibanamachine (#199404) 2024-11-12 12:39:17 -06:00
kbn-lint-ts-projects-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-managed-vscode-config SKA: Misc cleanup and enhancements (#212207) 2025-02-24 13:31:00 +00:00
kbn-managed-vscode-config-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-manifest Sustainable Kibana Architecture: Categorise straightforward packages (#199630) 2024-11-22 10:33:25 +01:00
kbn-mock-idp-plugin Preparation for High Contrast Mode, Security domains (#202609) 2024-12-09 13:03:23 -07:00
kbn-optimizer Make Amsterdam an opt-in theme (#212787) 2025-03-04 13:40:06 +01:00
kbn-peggy-loader SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
kbn-performance-testing-dataset-extractor Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
kbn-picomatcher Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-plugin-check SKA: Categorise remaining packages (#205875) 2025-01-08 22:20:14 +01:00
kbn-plugin-generator Remove SCSS from plugin generator (#211116) 2025-02-19 08:07:05 +01:00
kbn-plugin-helpers fix: add REACT_18 env variable to kbn-plugin-helpers bazel config (#211121) 2025-02-18 17:37:57 +01:00
kbn-relocate SKA: Misc cleanup and enhancements (#212207) 2025-02-24 13:31:00 +00:00
kbn-repo-file-maps Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-repo-linter Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-repo-source-classifier chore(NA): upgrade to webpack 5 (#191106) 2025-02-14 03:01:36 +00:00
kbn-repo-source-classifier-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-set-map SKA: Categorise remaining packages (#205875) 2025-01-08 22:20:14 +01:00
kbn-sort-package-json Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-styled-components-mapping-cli SKA: Relocate "platform" packages that remain on /packages (#208704) 2025-02-24 11:03:30 +00:00
kbn-ts-projects Dependency usage CLI (#198920) 2024-11-25 14:07:40 +01:00
kbn-ts-type-check-cli Remove references to old type check script (#202825) 2024-12-18 11:38:30 -08:00
kbn-validate-next-docs-cli [ci] Work around docosaurus errors (#206097) 2025-01-09 16:33:30 -06:00
kbn-web-worker-stub Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-whereis-pkg-cli Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kbn-yarn-lock-validator Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00