-
Notifications
You must be signed in to change notification settings - Fork 121
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: add dark theme #44
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.
Code LGTM (just left a couple of questions for my own clarification); tested locally on Firefox.
ce84d0e
to
49d84da
Compare
49d84da
to
5b7445f
Compare
I've updated the theme structure after the reviews
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.
Just a couple of minor comments otherwise LGTM. Thanks for doing all the Theme refactoring!
ca797f7
to
f4ad52e
Compare
The Dark Theme is now available. The AxisConfig has now a cleaner styling, splitted by axis or tick styles. Changing a theme is now easier and it's not necessary tied to a darkmode flag. New theme can be added and used on the charts. fix elastic#35 BREAKING CHANGE: The `Theme.AxisConfig` type has a different signature. It now contains `axisTitleStyle`, `axisLineStyle`, `tickLabelStyle` and `tickLineStyle` defined as `TextStyle` or `StrokeStyle` elements. The `Theme` interface is changed in a more flat structure. `darkMode` prop from `Setting` is removed. `theme` prop in `Setting` is now a `Theme` type object, not a `PartialTheme`. You can use `mergeWithDefaultTheme` function to merge an existing theme with a partial one.
f4ad52e
to
93c9f2b
Compare
# [2.0.0](v1.1.1...v2.0.0) (2019-02-19) ### Features * add dark theme ([#44](#44)) ([766f1ad](766f1ad)), closes [#35](#35) ### BREAKING CHANGES * The `Theme.AxisConfig` type has a different signature. It now contains `axisTitleStyle`, `axisLineStyle`, `tickLabelStyle` and `tickLineStyle` defined as `TextStyle` or `StrokeStyle` elements. The `Theme` interface is changed in a more flat structure. `darkMode` prop from `Setting` is removed. `theme` prop in `Setting` is now a `Theme` type object, not a `PartialTheme`. You can use `mergeWithDefaultTheme` function to merge an existing theme with a partial one.
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [2.0.0](elastic/elastic-charts@v1.1.1...v2.0.0) (2019-02-19) ### Features * add dark theme ([opensearch-project#44](elastic/elastic-charts#44)) ([bf772a0](elastic/elastic-charts@bf772a0)), closes [opensearch-project#35](elastic/elastic-charts#35) ### BREAKING CHANGES * The `Theme.AxisConfig` type has a different signature. It now contains `axisTitleStyle`, `axisLineStyle`, `tickLabelStyle` and `tickLineStyle` defined as `TextStyle` or `StrokeStyle` elements. The `Theme` interface is changed in a more flat structure. `darkMode` prop from `Setting` is removed. `theme` prop in `Setting` is now a `Theme` type object, not a `PartialTheme`. You can use `mergeWithDefaultTheme` function to merge an existing theme with a partial one.
This PR introduce the a better theming on charts. Now the theme has a clear and flatter structure.
A new theme is added:
DARK_THEME
.A switch to test the DARK theme is added to storybook
fix #35
BREAKING CHANGES:
The
Theme
interface was refactored completely with a flatter structure.