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

[Security Solution][Explore][EUI visual refresh] remove JSON tokens in favor of color tokens #202506

Closed
5 tasks done
angorayc opened this issue Dec 2, 2024 · 5 comments
Closed
5 tasks done
Assignees
Milestone

Comments

@angorayc
Copy link
Contributor

angorayc commented Dec 2, 2024

Context

  1. EUI visual refresh:
    Changes are made to EUI that will be visible to end-users in Kibana:
  • Updated all colors in EUI
  • Reduce the topmost font weights and sizes (think titles and headings)
    These changes are available in a new theme called Borealis.

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

  1. Replace SCSS with CSS-in-JS: https://github.com/elastic/kibana-team/issues/1417

Description

All usages of JSON tokens have been removed in favor of color tokens, where possible.

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:

@elastic/eui/dist/eui_theme_light.json
@elastic/eui/dist/eui_theme_dark.json
import { euiThemeVars } from '@kbn/ui-theme'

For example:
https://github.com/elastic/kibana/blob/main/packages/kbn-visualization-ui-components/components/dimension_buttons/palette_indicator.tsx#L32

Before:

import { euiThemeVars } from '@kbn/ui-theme'
...
height: ${euiThemeVars.euiSizeXS} / 2;

After:

import { useEuiTheme } from '@elastic/eui'
....
const { euiTheme } = useEuiTheme();
...
height: ${euiTheme.size.xs} / 2;

As many usage of euiThemeVars are in styled-components , explore team is planning to use this opportunity completely remove styled-components and migrate to emotion/react .

Tasks

Preview Give feedback
  1. Team:Threat Hunting:Explore
    agusruidiazgd
  2. Team:Threat Hunting:Explore
    agusruidiazgd
  3. Team:Threat Hunting:Explore
    kapral18
  4. Team:Threat Hunting:Explore
    agusruidiazgd

To test

Running Kibana with the Borealis theme

In order to run Kibana with Borealis, you'll need to do the following:

  1. Set the following in kibana.dev.yml: uiSettings.experimental.themeSwitcherEnabled: true

  2. Run Kibana with the following environment variable set:
    KBN_OPTIMIZER_THEMES="borealislight,borealisdark,v8light,v8dark" yarn start

  3. This will expose a toggle under Stack Management > Advanced Settings > Theme version, which you can use to toggle between Amsterdam and Borealis.

Image

@angorayc angorayc added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore labels Dec 2, 2024
@angorayc angorayc added this to the 8.18 milestone Dec 2, 2024
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@kapral18 kapral18 self-assigned this Dec 30, 2024
@angorayc angorayc removed Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Dec 30, 2024
@angorayc
Copy link
Contributor Author

Removed it from Entity Analytics Board to avoid confusion: https://elastic.slack.com/archives/C02CUMTF99B/p1735572444810329

@angorayc
Copy link
Contributor Author

Meta issue from shared UX: https://github.com/elastic/kibana-team/issues/1417

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

No branches or pull requests

3 participants