elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.69k stars 8.24k forks source link

[Security Solution][EUI visual refresh] make sure color palettes are theme aware #201882

Open PhilippeOberti opened 3 days ago

PhilippeOberti commented 3 days ago

Context

Changes are made to EUI that will be visible to end-users in Kibana:

See parent ticket for how to use the new theme and labels to add to the PR for tracking

Description

All usage of color palette tokens and functions now pull from the theme, and correctly update to use new colors when the theme changes from Borealis to Amsterdam and vice versa.

[!IMPORTANT] Key point: Make sure that if you are using colors from our color palette options, that your UI correctly updates to use the correct colors whenever you change themes.

https://eui.elastic.co/#/utilities/color-palettes

euiColorVis0
euiColorVis1
euiColorVis2
euiColorVis3
euiColorVis4
euiColorVis5
euiColorVis6
euiColorVis7
euiColorVis8
euiColorVis9

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:

const storeId = EUI_VIS_COLOR_STORE.subscribe(
  VIS_COLOR_STORE_EVENTS.UPDATE,
  () => {
    setPalette(euiPaletteColorBlind());
  }
);
elasticmachine commented 3 days ago

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

elasticmachine commented 3 days ago

Pinging @elastic/security-solution (Team: SecuritySolution)

elasticmachine commented 3 days ago

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)