-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] Fix Treemap outer labels with transparent background #84245
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
This PR fixes the severe bug, so I think it's a step in the right direction. Tested in Chrome, code LGTM
However, I don't like that we introduce another 'problem' in Canvas when Kibana is in the dark mode, but canvas has white background. In the future, with more customisability options maybe we'll allow users to fix it by using their own background color or font color, or we'll pass a background from canvas to set the proper color for the text.
Passing the Canvas Page background color to the embeddable would be great, in general I think, agree. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
Summary
Fixes #83525
The outer layer has a transparent background, precisely a
rgba(0,0,0,0)
(note0
opacity), which makes the elastic charts library produce awhite
text color. The library ignores the alpha parameter when computing the contrast color, so it requires a hint about dark mode.This PR makes the component aware of the dark mode theme state and hints the chart library about the Kibana background color.
Tested on Lens + Dashboard