-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[One Discover] Update log.level indicators color #202985
[One Discover] Update log.level indicators color #202985
Conversation
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
@tonyghiani without having run it locally 😬 , have you checked the color contrast levels? I am wondering if those pass our WCAG AA target. |
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 @tonyghiani! The colours seem to match the mockups for the most part, just seeing one issue in dark mode with Amsterdam.
Amsterdam light
I believe this looks as expected:
Amsterdam dark
It looks like fatal
here is lighter than the lower error levels:
Also I know we don't plan to release Borealis in 8.x, but if we merge this PR as is, we'd need to make sure we implement the final colours in main
before 9.0 FF since otherwise they don't match at all in Borealis.
Also attaching some screenshots from main
for comparison:
@ryankeairns The EuiBadge
component is supposed to automatically adjust the text colour based on the background, but I agree it doesn't really seem like there's enough contrast for some of the colours. I think we raised this when we first implemented the badges since there's a similar issue for the original colours, but were told by design that there was enough contrast.
@davismcphee you are right, and this is probably due the fact that some of these colors are hard-coded in the palette definition provided in #186273 (comment). @ryankeairns regarding the contrast on the badge, I noticed the badge switched it automatically to adjust the contrast, so I guess it was good enough given it's an automated check in EUI. |
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.
@davismcphee I removed these assertions against the color because it make the test much more difficult to maintain (manual converting colors to rgba) and it is already unit tested in get_log_level_color.test.ts module.
Thanks for the details @gvnmagni, the problem raised by Davis was that, if we cannot rely on a colors generator that does the interpolation and correctly generates good colors in dark mode too, hard-coding them might create unexpected colors scheme in dark mode. Is it possible to generate those interpolation colors dynamically with EUI utils instead of hardcoding them? |
there might actually be, in EUI there are a few functions for generating color palettes (https://eui.elastic.co/#/utilities/color-palettes), if you look into the Quantitative Color Scale you would see that there is a RED color function that might help us. I would need to understand a detail though, and pardon me because I am clearly missing part of the context and I am trying to catch up, why this become an issue only after this update? I mean, before changing these set of red shades that we introduce with this PR, didn't we have this same issue with the previously hard-coded values? |
|
I would not go for the status because it includes green shades that we don't want and a yellow inflection point that is undesired since it will create orange shades. I am still not fully understanding why we have to rely on EUI functions though, we had hardcoded values before this PR right? Why can't we keep having them but just use the updated version? |
Ooooh now I see, my original assumption was completely wrong, thank you for making it clear to me! Please proceed as you mention, using the highlighted color palette from EUI so that we have better control of everything. I just want to be sure that this is ok for everybody @LucaWintergerst @davismcphee @ninoslavmiskovic |
@gvnmagni @davismcphee added the latest update using the red palette. |
thanks @gvnmagni and @tonyghiani - looks good to me, thanks for getting ahead of the dark mode issues and apologies for the confusion |
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.
Latest code changes look good, and the new colours looks great in both light and dark mode! Thanks @tonyghiani and @gvnmagni for the design work 👍
They even look nice in Borealis. I know we intend to change these anyway, but it's nice that the colours look good in all configs in main
until then.
Looks good 👏 |
Linking this new proposal for Borealis so that people who were interested/involved in this issues could have a look: #203387 |
packages/kbn-discover-utils/src/data_types/logs/utils/get_log_level_color.ts
Outdated
Show resolved
Hide resolved
…kibana into 202258-update-loglevel-color
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.
Changes LGTM from EUI side 👍
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.
LGTM 👨🏼🎨
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12299215623 |
## 📓 Summary Closes elastic#202258 This change updates the colors scale for Discover's `log.level` indicators to differentiate errors from other levels better. **N.B. As this relies on some hard-coded values defined [here](elastic#186273 (comment)), it is not a definitive version, but a middle step to enhance the scale in v8.x versions.** With the introduction of the Borealis theme in v9, a new scale token-based will replace this. <img width="934" alt="Screenshot 2024-12-04 at 17 40 32" src="https://github.com/user-attachments/assets/b3da1300-b39a-4ad0-92c9-fde5dabe91ec"> --------- Co-authored-by: Marco Antonio Ghiani <[email protected]> (cherry picked from commit c47b509)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
ℹ️ We noticed too late that this PR actually is not Borealis specific. |
PR to revert the change: #204054 |
## 📓 Summary Related to #202985 This change reverts a suggestion that was applied but that should only be valid for v9. Co-authored-by: Marco Antonio Ghiani <[email protected]>
## 📓 Summary Related to elastic#202985 This change reverts a suggestion that was applied but that should only be valid for v9. Co-authored-by: Marco Antonio Ghiani <[email protected]> (cherry picked from commit 08da946) # Conflicts: # packages/kbn-discover-utils/src/data_types/logs/utils/get_log_level_color.test.ts # packages/kbn-discover-utils/src/data_types/logs/utils/get_log_level_color.ts
Friendly reminder: Looks like this PR hasn’t been backported yet. |
The backport for this PR was necessary, but it would have failed due to a mistakenly used token from the new EUI theme. |
📓 Summary
Closes #202258
This change updates the colors scale for Discover's
log.level
indicators to differentiate errors from other levels better.N.B. As this relies on some hard-coded values defined here, it is not a definitive version, but a middle step to enhance the scale in v8.x versions.
With the introduction of the Borealis theme in v9, a new scale token-based will replace this.