-
Notifications
You must be signed in to change notification settings - Fork 63
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
refactor: theme state #4310
refactor: theme state #4310
Conversation
The deployment to the dev cluster was successful. You can find the deployment here: https://4310.development.scrumlr.fra.ics.inovex.io Deployed Images
|
🐙 OctomindTest Report: 13/14 successful.
commit sha: e2d05ab |
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 and works in all common browsers
Description
Changes the logic how setting of the theme is handled.
Before
Previously, the logic was split weirdly by using the local storage directly to set/get the theme.
Also, the Html component would hold the logic to determine what the system theme preference is.
After
Now,
theme
ist also part of the application store and can be set/retrieved as such with Actions etc.The theme is is also still saved to the local storage and retrieved initially, but the local storage key name has been streamlined with the scrumlr prefix to fit with the others.
Additionally, a hook is now used to determine the theme which is set as a global attribute.
Changelog
theme
to the application store (as part of view), including Actions, Reducer, and Middleware.scrumlr/theme
).useAutoTheme
which will return the currently used theme ("light" | "dark"
), even if the theme is set to"auto"
.Html.tsx
andThemeSettings.tsx
to use the new app state / hook.Checklist