-
Notifications
You must be signed in to change notification settings - Fork 860
[Visual Refresh][Theme] Update dataVis text color tokens #8793
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
[Visual Refresh][Theme] Update dataVis text color tokens #8793
Conversation
|
This PR contains breaking changes. The opener of this pull request is asked to perform the following due diligence steps below, to assist EUI in our next Kibana upgrade:
|
f887dee to
ba3c24b
Compare
acstll
left a comment
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.
Found one small thing in a .scss file, and I have a doubt regarding some Amsterdam values in SCSS/JSON.
Also (not so important), the approximations in Amsterdam in some cases do not match the hue, e.g. text2 and text3 in Borealis are "blue", but in Amsterdam are magenta/purple-ish, is that intentional?
In summary, I checked the token assignments follow the spec ✅, and checked values in SCSS and JSON.
(I felt like I was reviewing again my own PR from yesterday haha 😅)
packages/eui-theme-borealis/src/variables/colors/_colors_vis_dark.scss
Outdated
Show resolved
Hide resolved
packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis_dark.scss
Show resolved
Hide resolved
packages/eui/src/themes/amsterdam/global_styling/variables/_colors_vis_light.scss
Show resolved
Hide resolved
acstll
left a comment
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.
Thanks for the quick update! 🟢
|
Thank you Lene, the only thing that I would change is that I would put a dedicated table for these tokens at the end of the documentation page, these tokens are almost never used and they are here as a fallback in case of need for text visualisation, I would love to give them less importance and to separate them from default datavis colors |
💚 Build SucceededHistory
cc @mgadewoll |
💚 Build Succeeded
History
cc @mgadewoll |
`103.1.0` ⏩ `104.0.2` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) ## Changes - updates flat tooltip prop usages on **EuiCopy** to use new `tooltipProp` ## Package updates ### `@elastic/eui` ## [`v104.0.2`](https://github.com/elastic/eui/releases/v104.0.2) **Bug fixes** - Fixed missing JSON token exports for `euiColorBackgroundBaseInteractiveSelectHover` and `euiColorBorderStrongText` ([#8819](elastic/eui#8819)) ## [`v104.0.1`](https://github.com/elastic/eui/releases/v104.0.1) **Bug fixes** - Fixed a wrong path in the module declaration for the JSON token exports that would trigger typescript errors ([#8818](elastic/eui#8818)) ## [`v104.0.0`](https://github.com/elastic/eui/releases/v104.0.0) - Added data vis text color tokens: ([#8793](elastic/eui#8793)) - `colors.vis.euiColorVisText0` - `colors.vis.euiColorVisText1` - `colors.vis.euiColorVisText2` - `colors.vis.euiColorVisText3` - `colors.vis.euiColorVisText4` - `colors.vis.euiColorVisText5` - `colors.vis.euiColorVisText6` - `colors.vis.euiColorVisText7` - `colors.vis.euiColorVisText8` - `colors.vis.euiColorVisText9` - Updated and aligned background hover styles for `EuiTable` and `EuiDataGrid` ([#8769](elastic/eui#8769)) **Deprecations** - Deprecated `euiPaletteForLightBackground` and `euiPaletteForDarkBackground` palettes. Use the newly added data vis color tokens instead. ([#8793](elastic/eui#8793)) **Breaking changes** - Removed tokens: ([#8793](elastic/eui#8793)) - `colors.vis.euiColorVisAsTextLight1` - `colors.vis.euiColorVisAsTextLight0` - `colors.vis.euiColorVisAsTextLight2` - `colors.vis.euiColorVisAsTextLight3` - `colors.vis.euiColorVisAsTextLight4` - `colors.vis.euiColorVisAsTextLight5` - `colors.vis.euiColorVisAsTextLight6` - `colors.vis.euiColorVisAsTextDark1` - `colors.vis.euiColorVisAsTextDark0` - `colors.vis.euiColorVisAsTextDark2` - `colors.vis.euiColorVisAsTextDark3` - `colors.vis.euiColorVisAsTextDark4` - `colors.vis.euiColorVisAsTextDark5` - `colors.vis.euiColorVisAsTextDark6` - Removed `xl` size from `EuiTabs` ([#8762](elastic/eui#8762)) - Added `tooltipProps` to `EuiCopy` which replaces spreading all props to `EuiToolTip` ([#8758](elastic/eui#8758)) <!--ONMERGE {"backportTargets":["8.19"]} ONMERGE--> --------- Co-authored-by: Elastic Machine <[email protected]>
`103.1.0` ⏩ `104.0.2` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) ## Changes - updates flat tooltip prop usages on **EuiCopy** to use new `tooltipProp` ## Package updates ### `@elastic/eui` ## [`v104.0.2`](https://github.com/elastic/eui/releases/v104.0.2) **Bug fixes** - Fixed missing JSON token exports for `euiColorBackgroundBaseInteractiveSelectHover` and `euiColorBorderStrongText` ([elastic#8819](elastic/eui#8819)) ## [`v104.0.1`](https://github.com/elastic/eui/releases/v104.0.1) **Bug fixes** - Fixed a wrong path in the module declaration for the JSON token exports that would trigger typescript errors ([elastic#8818](elastic/eui#8818)) ## [`v104.0.0`](https://github.com/elastic/eui/releases/v104.0.0) - Added data vis text color tokens: ([elastic#8793](elastic/eui#8793)) - `colors.vis.euiColorVisText0` - `colors.vis.euiColorVisText1` - `colors.vis.euiColorVisText2` - `colors.vis.euiColorVisText3` - `colors.vis.euiColorVisText4` - `colors.vis.euiColorVisText5` - `colors.vis.euiColorVisText6` - `colors.vis.euiColorVisText7` - `colors.vis.euiColorVisText8` - `colors.vis.euiColorVisText9` - Updated and aligned background hover styles for `EuiTable` and `EuiDataGrid` ([elastic#8769](elastic/eui#8769)) **Deprecations** - Deprecated `euiPaletteForLightBackground` and `euiPaletteForDarkBackground` palettes. Use the newly added data vis color tokens instead. ([elastic#8793](elastic/eui#8793)) **Breaking changes** - Removed tokens: ([elastic#8793](elastic/eui#8793)) - `colors.vis.euiColorVisAsTextLight1` - `colors.vis.euiColorVisAsTextLight0` - `colors.vis.euiColorVisAsTextLight2` - `colors.vis.euiColorVisAsTextLight3` - `colors.vis.euiColorVisAsTextLight4` - `colors.vis.euiColorVisAsTextLight5` - `colors.vis.euiColorVisAsTextLight6` - `colors.vis.euiColorVisAsTextDark1` - `colors.vis.euiColorVisAsTextDark0` - `colors.vis.euiColorVisAsTextDark2` - `colors.vis.euiColorVisAsTextDark3` - `colors.vis.euiColorVisAsTextDark4` - `colors.vis.euiColorVisAsTextDark5` - `colors.vis.euiColorVisAsTextDark6` - Removed `xl` size from `EuiTabs` ([elastic#8762](elastic/eui#8762)) - Added `tooltipProps` to `EuiCopy` which replaces spreading all props to `EuiToolTip` ([elastic#8758](elastic/eui#8758)) <!--ONMERGE {"backportTargets":["8.19"]} ONMERGE--> --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit efedad1) # Conflicts: # package.json # src/dev/license_checker/config.ts # yarn.lock
Summary
Closes #8589
Note
It's suggested to review this PR by following along by commit.
This PR updates the theme tokens for data visualization text to ensure there are tokens available to create labels for visualizations that are readable in both color modes.
This PR aligns the previously available text tokens that were named per color mode into a single set of tokens that are connected to the theme color mode. This ensures that the tokens update based on the selected theme color mode.
Changes
euiColorVisAsTextDark{NUMBER}andeuiColorVisAsTextLight{NUMBER}tokens toeuiColorVisText{NUMBER}euiColorVisTexttokenseuiPaletteForLightBackgroundandeuiPaletteForDarkBackgroundto use the new tokensWhy are we making this change?
This change ensures that visualizations have tokens available to apply to text which relate directly to the used colors for data visualizations. This solves an accessibility issue when using the available data vis colors would otherwise result in text that is too light on light backgrounds.
Screenshots
Impact to users
🟢 Those tokens are not in use in Kibana or Cloud-UI. This is mainly due to the tokens having been introduced only recently with the introduction of the Borealis theme. Originally they were solely in use in the
euiPaletteForLightBackgroundandeuiPaletteForDarkBackgroundpalettesAdditional notes
🟢 The changes were tested against Kibana and
eui-theme/amsterdam.eui-theme/amsterdamon the next release to match the changedcolorVisimports.Changes required here and here:
QA
General checklist
Checked in both MacOS and Windows high contrast modesChecked in mobileChecked for accessibility including keyboard-only and screenreader modesProps have proper autodocs (using@defaultif default values are missing) and playground togglesChecked Code Sandbox works for any docs examplesAdded or updated jest and cypress testsIf applicable, added the breaking change issue label (and filled out the breaking change checklist)If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)