Open JasonStoltz opened 2 weeks ago
@elastic/kibana-core @elastic/kibana-esql @elastic/appex-ai-infra @elastic/logstash @elastic/security-defend-workflows @elastic/security-threat-hunting-investigations @elastic/security-detection-engine @elastic/security-generative-ai @elastic/security-threat-hunting-explore @elastic/security-detection-rule-management @elastic/security-solution
Hi folks 👋 . Could you all please add a contact/owner from your team to the table above? It's helpful for coordinate and serves as an acknowledgement of this work from your team.
Let me know if you have any questions.
The EUI team is making updates to EUI that require updates and QA by all Kibana Codeowners. This issue defines the ask for teams and provides a means to track progress.
Key Points
Codeowners, we are asking you to "own" the upgrade of your particular code area and ensure the tasks listed below are completed. Please mark yourself as "Done" when you have completed the work. A "Definition of Done" is included in the next section.
Definition of Done
Things marked as Required must be completed. Everything else we would really like teams to give their best effort to resolve, but are ultimately non-blocking.
More detail on each of these steps is noted in detail below.
Intro
We have made the following changes to EUI that will be visible to end-users in Kibana:
In addition, we are attempting to clean up existing color usage in order to help iterate on these colors faster in the future. So in addition to QA, there are also system-level changes that will need to be accounted for in Kibana's codebase.
If you have questions, please do not hesitate to reach out to the EUI team in the #eui Slack channel (Elastic internal). If you would like guidance from the EUI team on your implementation, you may also add the @elastic/eui-team as reviewers on your PR.
As you update and QA in Kibana with these changes, please indicate your status as a Codeowner in the table above.
Instructions for updating and QA
These changes are available in a new theme called Borealis. The current theme from which we are updating is called Amsterdam. Borealis will be available in Kibana for testing. It will not be turned on by default. You'll need to enable it following the instructions below.
When testing, please test your changes in both Borealis and Amsterdam. We will keep Kibana on Amsterdam for a period of time until we're ready to switch to Borealis. Additionally, 8.x will remain on Amsterdam. For this reason, we want to ensure Kibana UI works with both themes applied.
Throughout this section, tokens are referred to by their root name (e.g.
primary
). In practice, theprimary
token exists in Sass as$euiColorPrimary
and in Emotion ascolors.primary
. Keep this in mind for all tokens mentioned below.Running Kibana with the Borealis theme
In order to run Kibana with Borealis, you'll need to do the following:
uiSettings.experimental.themeSwitcherEnabled: true
KBN_OPTIMIZER_THEMES="borealislight,borealisdark,v8light,v8dark" yarn start
This will expose a toggle under Stack Management > Advanced Settings > Theme version, which you can use to toggle between Amsterdam and Borealis.
Color changes
We have updated nearly every color provided by EUI.
The Following is a list of color changes that require work beyond QA.
Success
andaccentSecondary
An example of an affirmative meaning would be this confirmation dialog. This would use the
success
color:An example of a non-affirmative meaning would be the background of the "Security" badge. This would use the
accentSeoncary
color.successText
andtextAccentSecondary
Renamed color variables
Color palettes should now be theme aware
https://eui.elastic.co/#/utilities/color-palettes
Vis color tokens are now available through the EUI theme:
euiTheme.colors.vis
:These were not previously part of the theme. This means that they would not change when the theme was changed. They are now part of the theme and should change when the theme is changed.
If you were using any of the above tokens directly, please change your code to pull them directly from
euiTheme.colors.vis
.If you were using any of our color palette functions:
EuiProvider
context and is hence connected to rerender (called on rerender or connected to a state)EuiProvider
context you can use the newEUI_VIS_COLOR_STORE.subscribe()
function to listen to changes and update usages manuallyDon't use vis colors anywhere other than visualizations
The color palettes above should be reserved for coloring visualizations. Please do not use them for other UI element styling.
If you are using vis colors like this, please change to use another color token from EUI.
Custom colors
The EUI team hopes to iterate on color faster in the future. In order to do so, it is imperative teams strive to use EUI tokens for colors exclusively.
Hardcoded colors create issues when we iterate on the Kibana UI as a whole -- they break the system. By consistently using color tokens from the EUI library, we enable seamless updates and iterations on colors without requiring additional work from Kibana teams. With this approach, we can update a single token in EUI, and the color change will automatically apply across all of Kibana.
The EUI team is fundamentally changing the library by adding a comprehensive suite of Semantic Tokens. A semantic token is defined as such:
A practical example of this can be seen by looking at our shade colors. The naming of these tokens is based on their appearance -- dark. light, darkest, etc. Over time, we will deprecate these tokens in favor of tokens that are based on usage -- "border", "background", etc. This will be a key concept that allows us to iterate and evolve the Kibana UI over time -- cleanly and easily.
This same concept flows through to component customizations as well. In order for the EUI team to modernize UI at an atomic level (buttons, inputs, forms, layout, etc.), we will be asking teams to clean up CSS customizations to these elements as well. We realize that this is a big ask, but it is an important one. Simply put, if you are applying custom styles to our components, we are not able to update them without breaking UI.
Color calculation functions
EUI provides color utility functions. Please discontinue use of these and replace them with an EUI color token. These will be deprecated as they create unpredictable results.
JSON tokens
Exported legacy JSON tokens will be deprecated in the future and will eventually be replaced with tokens from the EUI theme. We'd appreciate it if teams could spend some time migrating away from these.
Please discontinue use of these and replace them with a JS variable from our theme context.
JSON tokens are anything from:
For example: https://github.com/elastic/kibana/blob/main/packages/kbn-visualization-ui-components/components/dimension_buttons/palette_indicator.tsx#L32
Before:
After:
Typography
https://eui.elastic.co/#/theming/typography/values
Our
l
,xl
, andxxl
font sizes are now smaller. Ourmedium
,semiBold
, andbold
font weights are now slightly less bold.Please QA to ensure your UI still looks good with these changes. If you have hardcoded font sizes or weights rather than using EUI tokens, please update your code to use an EUI token.