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

Allow turning on dark mode for individual components. #3957

Closed
nreese opened this issue Aug 24, 2020 · 3 comments
Closed

Allow turning on dark mode for individual components. #3957

nreese opened this issue Aug 24, 2020 · 3 comments

Comments

@nreese
Copy link
Contributor

nreese commented Aug 24, 2020

Maps would like to style its tooltips with euiToolTipStyle mixin to provide a more cohesive UI in dashboard and canvas, elastic/kibana#75758. Maps uses EuiPopover for its tooltip because it has interactive components like select and buttons. Maps does not want to stop using EuiPopover. Maps just wants to style the existing components so they are similar to lens and visualize tooltips. To accomplish this, maps needs a way to turn on dark mode for all components in the EuiPopover.

@nreese
Copy link
Contributor Author

nreese commented Aug 24, 2020

Below is a screen shot from a POC of aligning the visual style of the tooltips. Notice how the select, buttons, and EuiPagination in the tooltip need to have dark mode styling to look correct in the tooltip.

Screen Shot 2020-08-24 at 9 23 59 AM

@cchaos
Copy link
Contributor

cchaos commented Aug 24, 2020

This is an example of something of a feature we are looking to add during our CSS in JS effort. And, really, is the only way we'll be able to properly accomplish this. The cascade effect of being able to tell all the children of a popover to then swap to it's dark theme counterpart is not something easily done with how we currently build our components with SASS.

We have a meta ticket going for our CSS in JS effort #3912 where you can track the idea of a <ColorMode>. But while we will build out the ability to use this, the conversion of all EUI components will take close to a year.


For this very specific example (tooltip styling of popover), the design team actually highly recommend not doing this. It breaks the consistent paradigm of users understanding that dark tooltips don't have interactive content in them and that they're primarily for displaying additional information. The chart usages in Kibana only use the tooltip to display the data contained within that piece, but end up using an EuiPopover for drilldowns

@miukimiu
Copy link
Contributor

Closing in favor of #3912.

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