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

fix: Adds ability to persist theming to local storage. #4367

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dlabaj
Copy link
Contributor

@dlabaj dlabaj commented Oct 31, 2024

Fixes issue #4365 by persisting theme setting to local storage.

@dlabaj dlabaj added the PF6 label Oct 31, 2024
@dlabaj dlabaj self-assigned this Oct 31, 2024
Copy link
Contributor

@jonkoops jonkoops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might I suggest using the prefers-color-scheme selector to determine the default value? The logic would then essentially be to use the stored value only if it exists, and otherwise fall back to this logic we have Keycloak (but with thepf-v6-theme-dark class).

@patternfly-build
Copy link
Contributor

@dlabaj
Copy link
Contributor Author

dlabaj commented Oct 31, 2024

Might I suggest using the prefers-color-scheme selector to determine the default value? The logic would then essentially be to use the stored value only if it exists, and otherwise fall back to this logic we have Keycloak (but with thepf-v6-theme-dark class).

Thanks for the suggestion will look to see how to use it. Thanks.

@kmcfaul kmcfaul linked an issue Nov 6, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - Dark and light mode are not saved when refreshing the browser
3 participants