eui
eui copied to clipboard
[Visual Refresh] Make `EuiDataGrid` and `EuiTable` hover consistent
Summary
Closes https://github.com/elastic/eui-private/issues/301
[!IMPORTANT] Separate PR to update
border-strong-*token values in Amsterdam ~~is still underway~~ ~~in draft mode~~ ready!
Following the design spec, this PR introduces changes to
- background colors mainly for hover, including selected states, for both
EuiTableandEuiDataGrid - colors for cell selection outline in
EuiDataGrid
The update adds a new colors.backgroundBaseInteractiveSelectHover token, to differentiate the hover state for selected rows. And removes hover states completely for the "stripes" version of Data Grid.
Demo videos (Borealis/light only)
Data Grid
https://github.com/user-attachments/assets/f10a0fef-c1a7-4361-bab9-82d1b9e21809
Table
https://github.com/user-attachments/assets/3e787519-aa10-426b-a841-936d9549179b
Amsterdam
Styles for the Amsterdam theme were left untouched. There is only one small change we can consider a fix: for EuiTable the hover state color when there's an onClick handler applies (it didn't).
~~I have a few doubts regarding the adaptation for the legacy Amsterdam theme:~~
- ~~No hover color for
stripes=trueseems too breaking. I would keep it. @ek-so what do you think? (@mgadewoll I implemented this in the component code, not CSS; is there an accepted way to check if the theme is Amsterdam?)~~ - ~~I think the new
backgroundBaseInteractiveSelectHovercolor is too different frombackgroundBaseInteractiveSelect🤔~~- ~~and the values for SCSS are not exactly matching~~
- ~~The value for
borderStrongPrimarywas updated to keep the selected outline "primary" blue (this should be safe, but I felt like I should mention it) — @ek-so you think this is also OK?~~
QA
- [ ] check colors and logic match the spec in:
- [ ] Borealis (light)
- [ ] Borealis (dark)
- [ ] check styles remain the same:
- [ ] Amsterdam (light)
- [ ] Amsterdam (dark)
- [ ] would new visual regression tests be needed/beneficial?
General checklist
- Browser QA
- [x] Checked in both light and dark modes
- [x] Checked in both MacOS and Windows high contrast modes
- (emulate forced colors if you do not have access to a Windows machine.)
- [x] Checked in mobile
- [x] Checked in Chrome, Safari, Edge, and Firefox
- [ ] ~~Checked for accessibility including keyboard-only and screenreader modes~~
- Docs site QA
- [x] Updated documentation
- [ ] ~~Props have proper autodocs (using
@defaultif default values are missing) and playground toggles~~ - [ ] ~~Checked Code Sandbox works for any docs examples~~
- Code quality checklist
- [ ] ~~Added or updated jest and cypress tests~~
- [x] Updated visual regression tests
- Release checklist
- [x] A changelog entry exists and is marked appropriately.
- [ ] ~~If applicable, added the breaking change issue label (and filled out the breaking change checklist)~~
- Designer 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)~~
Converting to draft because a cypress test is failing — ~~seems to be failing not because of the colors of the cell outline changed, but something else?~~
@acstll I don't think the dataGrid failing test is actually related to the changes. I've noticed those tests failing before locally 🫠 Here's a small PR to "fix" the issue.
Hey @acstll, I'm afraid I need some clarification on the questions. Are they related only to Amsterdam? Why then we change anything there? From what I see, in Borealis it all looks good an as expected.
Hey @acstll, I'm afraid I need some clarification on the questions. Are they related only to Amsterdam? Why then we change anything there?
@ek-so it's all clear now! We shouldn't change anything visually on Amsterdam; this was not clear to me and all related questions come from that confusion, so sorry — also the question regarding borderStrongPrimary is mainly related to the implementation (and has been cleared with Lene already) 🙂
From what I see, in Borealis it all looks good an as expected.
thanks for checking 🙏
Quick status update: I changed the implementation to use (new) component tokens instead of that bit of TS logic, in order to have Amsterdam remain exactly the same.
Will do the following next:
- [x] ensure (color) token values are correct across formats (both Borealis and Amsterdam)
- [x] double-check docs, Storybook, VRT
- [x] check cypress failing again (even after rebasing with the fix) — will do this last
- this time it was actually about the focus color (
borderStrongPrimary)
- this time it was actually about the focus color (
- [x] (and that extra PR to update border tokens in Amsterdam) #8794
:green_heart: Build Succeeded
- Buildkite Build
- Commit: 0312e8aff081c77f696f5097560d4d759f689fd1
- Documentation website
History
- :green_heart: Build #564 succeeded 94c55b0239bef64e1bfe4b5f4665e8f3e8748022
- :green_heart: Build #512 succeeded e4f5d041ae8879bd8864766c24164483264c5904
- :broken_heart: Build #511 failed 828355aacddb42016c98133c7ce4f66ed1c3aa06
- :broken_heart: Build #510 failed 8cd38f51b0331fccb2c619452c4361200550cf52
- :green_heart: Build #500 succeeded 10e62b6bb92ef4691f7590b5574a5fc523acc12e
- :green_heart: Build #497 succeeded 0ebdcd5c99d22eb9e5098cb6a05791c7c58f496e
cc @acstll
:green_heart: Build Succeeded
- Buildkite Build
- Commit: 0312e8aff081c77f696f5097560d4d759f689fd1
History
- :broken_heart: Build #4222 failed 94c55b0239bef64e1bfe4b5f4665e8f3e8748022
- :green_heart: Build #4178 succeeded e4f5d041ae8879bd8864766c24164483264c5904
- :broken_heart: Build #4177 failed 828355aacddb42016c98133c7ce4f66ed1c3aa06
- :green_heart: Build #4168 succeeded 10e62b6bb92ef4691f7590b5574a5fc523acc12e
- :broken_heart: Build #4166 failed 0ebdcd5c99d22eb9e5098cb6a05791c7c58f496e
- :broken_heart: Build #4135 failed 7e58e9a9fc269c8e6a926c910f8b0e780908d047
cc @acstll
@acstll after this is merged, I would inform the discover team about it additionally, because they have a custom implementation in discover for this thing, and it doesn't look clean currently. We promised to do that as far as I recall, here. /cc @JasonStoltz @l-suarez
@acstll after this is merged, I would inform the discover team about it additionally, because they have a custom implementation in discover for this thing, and it doesn't look clean currently. We promised to do that as far as I recall, here.
@ek-so I created a sub-task to track it (https://github.com/elastic/eui-private/issues/360), we'll be glad to help