-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Amsterdam an opt-in theme #212787
Make Amsterdam an opt-in theme #212787
Conversation
… feature flag value is not currently bundled in
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsasync chunk count
History
cc @tkajtoch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Just out of curiosity, what is this themeVersion used for?
@gsoldevila It's a legacy way themes were toggled back in Kibana 7 era. We plan to remove it and clean up the theming logic across Kibana, probably around the time we get rid of the remaining SCSS styles |
Starting backport for target branches: 9.0 |
## 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> (cherry picked from commit 4dd8de8)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `9.0`: - [Make Amsterdam an opt-in theme (#212787)](#212787) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Tomasz Kajtoch","email":"tomasz.kajtoch@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T12:40:06Z","message":"Make Amsterdam an opt-in theme (#212787)\n\n## Summary\n\nThis PR updates `DEFAULT_THEME_TAGS` used to determine what theme tags\nare bundled in Kibana by default to only include the Borealis theme,\nspecifically `borealislight` and `borealisdark` theme tags. This change\nis expected to decrease bundle sizes significantly and get back to\nbundling a single theme, not two (4 → 2 theme tags).\n\nNow that Serverless, `9.0`, and `main` all run with Borealis, there's no\nrisk in removing Amsterdam from the bundle and decreasing Kibana bundle\nsizes.\n\nWe need to keep the feature flag in code for the time being to easily\ntest future Borealis iterations.\n\nAmsterdam will still be available as an opt-in theme and is meant to be\nused locally when testing changes to be backported to 8.x versions that\nuse Amsterdam. To do so, Kibana needs to be started/built with\n`KBN_OPTIMIZER_THEMES` environment variable set and the feature flag\noverridden in `kibana.dev.yml`.\n\n```yml\n# config/kibana.dev.yml\nfeature_flags.overrides.coreRendering.defaultThemeName: amsterdam\n```\n\n```shell\n# Run dev server with both borealis and Amsterdam theme tags\nKBN_OPTIMIZER_THEMES=\"borealislight,borealisdark,v8light,v8dark\" yarn start\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"4dd8de807ae8a9d1b00a2a99c98510f7a21382db","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","v9.1.0"],"title":"Make Amsterdam an opt-in theme","number":212787,"url":"https://github.com/elastic/kibana/pull/212787","mergeCommit":{"message":"Make Amsterdam an opt-in theme (#212787)\n\n## Summary\n\nThis PR updates `DEFAULT_THEME_TAGS` used to determine what theme tags\nare bundled in Kibana by default to only include the Borealis theme,\nspecifically `borealislight` and `borealisdark` theme tags. This change\nis expected to decrease bundle sizes significantly and get back to\nbundling a single theme, not two (4 → 2 theme tags).\n\nNow that Serverless, `9.0`, and `main` all run with Borealis, there's no\nrisk in removing Amsterdam from the bundle and decreasing Kibana bundle\nsizes.\n\nWe need to keep the feature flag in code for the time being to easily\ntest future Borealis iterations.\n\nAmsterdam will still be available as an opt-in theme and is meant to be\nused locally when testing changes to be backported to 8.x versions that\nuse Amsterdam. To do so, Kibana needs to be started/built with\n`KBN_OPTIMIZER_THEMES` environment variable set and the feature flag\noverridden in `kibana.dev.yml`.\n\n```yml\n# config/kibana.dev.yml\nfeature_flags.overrides.coreRendering.defaultThemeName: amsterdam\n```\n\n```shell\n# Run dev server with both borealis and Amsterdam theme tags\nKBN_OPTIMIZER_THEMES=\"borealislight,borealisdark,v8light,v8dark\" yarn start\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"4dd8de807ae8a9d1b00a2a99c98510f7a21382db"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212787","number":212787,"mergeCommit":{"message":"Make Amsterdam an opt-in theme (#212787)\n\n## Summary\n\nThis PR updates `DEFAULT_THEME_TAGS` used to determine what theme tags\nare bundled in Kibana by default to only include the Borealis theme,\nspecifically `borealislight` and `borealisdark` theme tags. This change\nis expected to decrease bundle sizes significantly and get back to\nbundling a single theme, not two (4 → 2 theme tags).\n\nNow that Serverless, `9.0`, and `main` all run with Borealis, there's no\nrisk in removing Amsterdam from the bundle and decreasing Kibana bundle\nsizes.\n\nWe need to keep the feature flag in code for the time being to easily\ntest future Borealis iterations.\n\nAmsterdam will still be available as an opt-in theme and is meant to be\nused locally when testing changes to be backported to 8.x versions that\nuse Amsterdam. To do so, Kibana needs to be started/built with\n`KBN_OPTIMIZER_THEMES` environment variable set and the feature flag\noverridden in `kibana.dev.yml`.\n\n```yml\n# config/kibana.dev.yml\nfeature_flags.overrides.coreRendering.defaultThemeName: amsterdam\n```\n\n```shell\n# Run dev server with both borealis and Amsterdam theme tags\nKBN_OPTIMIZER_THEMES=\"borealislight,borealisdark,v8light,v8dark\" yarn start\n```\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"4dd8de807ae8a9d1b00a2a99c98510f7a21382db"}}]}] BACKPORT--> Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co>
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, specificallyborealislight
andborealisdark
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
, andmain
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 inkibana.dev.yml
.Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.