-
Notifications
You must be signed in to change notification settings - Fork 122
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
feat(heatmap): dark mode with theme controls #1356
Conversation
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.
I can see a visible difference on the echHighlighterMask
in this PR in dark mode:
the Y axis and the selected areas are not transparent anymore as in the old implementation:
This PR:
Current master:
Despite the black text, the behaviour on master is the correct one. clearly visible also in the light theme
I'd also like to chat about when a style needs to be pushed into the theme
and when it needs to be local on the spec.
just remember that the |
Aside from what we discussed in todays meeting, I tend to through all function thing like formatters in the spec rather than the theme. |
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.
Looks good to me
tested locally and all the issues are now gone!
adds dark mode to goal charts with configurable theme styles. BREAKING CHANGE: The `HeatmapSpec.config` prop is removed. All properties have been moved/renamed under new `Theme.heatmap` options with the following exceptions: - `HeatmapSpec.margin` was not used, `Theme.chartMargins` should be used in the future. - `HeatmapSpec.fontFamily` `HeatmapSpec.width` and `HeatmapSpec.height` all removed as they were never used.
Summary
Adds dark mode to goal charts with configurable theme styles.
BREAKING CHANGES
The
HeatmapSpec.config
prop is removed. All properties have been moved/renamed under newTheme.heatmap
options with the following exceptions:HeatmapSpec.margin
was not used,Theme.chartMargins
should be used in the future.HeatmapSpec.fontFamily
HeatmapSpec.width
andHeatmapSpec.height
all removed as they were never used.Details
The
Heatmap
,Partition
andWordCloud
specs all have no connection to the chart theme and thus have no canonical inheritance to dark mode. This PR fixes this for theHeatmap
chart and adds some added styles to the text labels as exposed in xy charts. TheHeatmapConfig
was broken down and moved intoTheme
or theHeatmapSpec
accordingly. We should avoid having aConfig
option to control theme as this not only creates a disconnect but also allows for multiple sources of truth for similar options and another property requirement to toggle for theming between dark and light modes.In the future I think it would great if we have a
Config
alternative to the react props in addition to theTheme
options.Issues
closes #1335
Checklist
:xy
,:partition
):interactions
,:axis
):theme
label has been added and the@elastic/eui-design
team has been pinged when there areTheme
API changescloses #123
,fixes #123
)packages/charts/src/index.ts
dark
,light
,eui-dark
&eui-light