Skip to content
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

[9.0] Make Amsterdam an opt-in theme (#212787) #213093

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

## 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)
@kibanamachine kibanamachine merged commit 6452ad4 into elastic:9.0 Mar 4, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
aiops 613 601 -12
alerting 236 228 -8
apm 1651 1643 -8
banners 30 26 -4
canvas 1217 1209 -8
cloudSecurityPosture 784 740 -44
console 226 218 -8
controls 450 430 -20
core 400 396 -4
dashboard 731 719 -12
data 615 603 -12
datasetQuality 287 283 -4
dataViewEditor 89 81 -8
dataViewFieldEditor 172 156 -16
dataViewManagement 215 207 -8
dataVisualizer 846 830 -16
devTools 30 26 -4
discover 1089 1013 -76
enterpriseSearch 1379 1311 -68
esqlDataGrid 522 478 -44
eventAnnotationListing 700 668 -32
expressionError 36 32 -4
expressions 190 186 -4
expressionXY 285 273 -12
fieldFormats 74 70 -4
fleet 1197 1193 -4
globalSearchBar 47 43 -4
graph 277 269 -8
home 228 224 -4
imageEmbeddable 137 133 -4
indexLifecycleManagement 280 248 -32
indexManagement 689 661 -28
ingestPipelines 381 337 -44
inputControlVis 98 90 -8
inspector 78 70 -8
interactiveSetup 55 51 -4
kibanaOverview 97 93 -4
kibanaReact 255 247 -8
lens 1770 1586 -184
licenseManagement 111 107 -4
links 134 126 -8
logsExplorer 567 535 -32
management 90 86 -4
maps 1330 1318 -12
ml 2180 2144 -36
observability 1304 1260 -44
osquery 300 296 -4
painlessLab 42 38 -4
presentationPanel 123 119 -4
presentationUtil 153 141 -12
reporting 156 148 -8
rollup 132 128 -4
savedObjects 33 29 -4
savedObjectsManagement 117 105 -12
savedObjectsTagging 109 101 -8
screenshotting 27 23 -4
searchIndices 338 334 -4
searchPlayground 283 279 -4
searchprofiler 76 72 -4
security 648 604 -44
securitySolution 6984 6928 -56
serverlessSearch 431 411 -20
share 89 85 -4
slo 996 952 -44
snapshotRestore 198 194 -4
spaces 359 299 -60
stackAlerts 265 253 -12
streamsApp 280 276 -4
transform 484 476 -8
triggersActionsUi 935 859 -76
uiActionsEnhanced 171 163 -8
unifiedDocViewer 270 250 -20
unifiedHistogram 278 274 -4
unifiedSearch 386 358 -28
upgradeAssistant 170 154 -16
visDefaultEditor 241 237 -4
visTypeMarkdown 29 25 -4
visTypeTable 47 43 -4
visTypeTimelion 67 59 -8
visTypeTimeseries 552 496 -56
visTypeVega 512 500 -12
visTypeVislib 186 182 -4
visualizations 500 460 -40
watcher 176 172 -4
total -1544

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiops 454.5KB 452.0KB -2.5KB
alerting 99.4KB 95.2KB -4.2KB
apm 2.3MB 2.3MB -1.2KB
canvas 1.0MB 1002.7KB -55.6KB
cloudSecurityPosture 502.6KB 486.1KB -16.4KB
console 201.8KB 184.5KB -17.3KB
controls 427.7KB 408.4KB -19.2KB
dashboard 535.1KB 523.5KB -11.6KB
data 54.7KB 52.3KB -2.4KB
dataViewEditor 44.5KB 42.2KB -2.3KB
dataViewFieldEditor 114.0KB 159.8KB +45.8KB
dataViewManagement 128.5KB 126.6KB -1.9KB
dataVisualizer 615.9KB 612.9KB -3.0KB
discover 806.3KB 746.8KB -59.5KB
enterpriseSearch 1.3MB 1.3MB -23.6KB
esqlDataGrid 172.8KB 156.3KB -16.4KB
eventAnnotationListing 218.6KB 206.4KB -12.2KB
expressionError 11.3KB 15.1KB +3.7KB
expressionXY 122.3KB 115.8KB -6.5KB
fleet 1.7MB 1.7MB -1.1KB
graph 404.5KB 393.2KB -11.4KB
home 139.3KB 133.2KB -6.1KB
imageEmbeddable 57.2KB 56.0KB -1.2KB
indexLifecycleManagement 172.5KB 161.2KB -11.3KB
indexManagement 713.4KB 695.3KB -18.2KB
ingestPipelines 418.4KB 399.7KB -18.7KB
inputControlVis 53.3KB 50.1KB -3.2KB
kibanaOverview 54.5KB 47.6KB -6.9KB
kibanaReact 203.6KB 194.0KB -9.6KB
lens 1.6MB 1.5MB -119.8KB
links 53.9KB 46.9KB -7.1KB
management 32.6KB 31.6KB -1.1KB
maps 2.9MB 2.9MB -31.9KB
ml 4.5MB 4.4MB -24.4KB
observability 1.2MB 1.2MB -6.6KB
presentationPanel 48.3KB 43.7KB -4.5KB
presentationUtil 90.6KB 86.8KB -3.8KB
reporting 63.9KB 61.7KB -2.2KB
rollup 109.3KB 108.3KB -1.1KB
savedObjectsManagement 85.4KB 81.7KB -3.8KB
savedObjectsTagging 49.0KB 46.3KB -2.8KB
searchIndices 174.7KB 172.3KB -2.4KB
searchPlayground 186.2KB 183.9KB -2.4KB
security 549.9KB 521.8KB -28.1KB
securitySolution 8.8MB 8.8MB -54.2KB
serverlessSearch 351.7KB 344.4KB -7.3KB
share 3.9KB 3.9KB -19.0B
slo 792.2KB 752.8KB -39.3KB
spaces 269.7KB 248.0KB -21.7KB
stackAlerts 75.3KB 73.1KB -2.3KB
triggersActionsUi 1.5MB 1.5MB -25.3KB
uiActionsEnhanced 138.1KB 135.8KB -2.3KB
unifiedDocViewer 124.6KB 118.7KB -5.9KB
unifiedSearch 363.6KB 352.0KB -11.7KB
upgradeAssistant 145.6KB 140.4KB -5.3KB
visDefaultEditor 104.2KB 93.6KB -10.6KB
visTypeMarkdown 7.9KB 6.2KB -1.7KB
visTypeTable 21.6KB 19.1KB -2.5KB
visTypeTimelion 43.2KB 39.6KB -3.6KB
visTypeTimeseries 510.9KB 484.5KB -26.4KB
visTypeVega 1.9MB 1.9MB -4.8KB
visTypeVislib 380.3KB 365.7KB -14.6KB
visualizations 363.2KB 340.8KB -22.4KB
total -797.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
banners 9.6KB 8.4KB -1.2KB
core 474.0KB 429.7KB -44.4KB
data 394.8KB 393.5KB -1.3KB
dataViewEditor 13.2KB 11.9KB -1.3KB
dataViewFieldEditor 23.6KB 23.3KB -264.0B
devTools 13.4KB 11.9KB -1.4KB
enterpriseSearch 38.8KB 38.7KB -91.0B
expressionError 5.4KB 5.4KB -22.0B
expressions 98.8KB 97.2KB -1.6KB
fieldFormats 63.0KB 61.8KB -1.2KB
globalSearchBar 30.3KB 27.9KB -2.4KB
inputControlVis 8.6KB 8.6KB -36.0B
inspector 26.5KB 23.4KB -3.0KB
interactiveSetup 60.1KB 56.7KB -3.4KB
kibanaReact 30.2KB 28.6KB -1.5KB
licenseManagement 13.3KB 12.0KB -1.2KB
painlessLab 13.0KB 11.0KB -2.0KB
savedObjects 16.5KB 15.3KB -1.1KB
screenshotting 8.8KB 7.5KB -1.3KB
searchprofiler 23.7KB 16.4KB -7.3KB
share 58.6KB 57.5KB -1.2KB
snapshotRestore 27.6KB 25.3KB -2.3KB
transform 21.0KB 19.0KB -2.0KB
triggersActionsUi 124.8KB 120.5KB -4.2KB
unifiedSearch 45.8KB 36.4KB -9.4KB
visDefaultEditor 29.4KB 29.4KB -58.0B
watcher 15.7KB 14.2KB -1.5KB
total -96.7KB
Unknown metric groups

async chunk count

id before after diff
dataViewFieldEditor 15 14 -1
unifiedDocViewer 8 9 +1
total -0

cc @tkajtoch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants