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

[REF-1994] ThemePanel: clear chakra-ui-color-mode key when using theme panel #2799

Merged
merged 1 commit into from Mar 6, 2024

Conversation

masenf
Copy link
Collaborator

@masenf masenf commented Mar 6, 2024

The ThemePanel fights with the ThemeProvider when the user color preference key differs from the appearance prop specified in the theme. To avoid issues when using the ThemePanel (in development), clear out the user color preference before loading the page and before unloading the page (to ensure it does not freeze on reload).

Clearing the user preference isn't ideal production behavior, but typically the ThemePanel is only used during development for trying out different styles, and having it not freeze the app is better dev behavior.

Fix #2650

…e panel

The ThemePanel fights with the ThemeProvider when the user color preference key differs from the `appearance` prop specified in the theme. To avoid issues when using the ThemePanel (in development), clear out the user color preference before loading the page and before unloading the page (to ensure it does not freeze on reload).

Clearing the user preference isn't ideal production behavior, but typically the
ThemePanel is only used during development for trying out different styles, and
having it not freeze the app is better dev behavior.

Fix #2650
Copy link

linear bot commented Mar 6, 2024

@masenf masenf merged commit 77d551f into main Mar 6, 2024
45 checks passed
@masenf masenf deleted the masenf/unfreezie-theme-panel branch March 6, 2024 23:32
mahrz24 pushed a commit to mahrz24/reflex that referenced this pull request Mar 12, 2024
…e panel (reflex-dev#2799)

The ThemePanel fights with the ThemeProvider when the user color preference key differs from the `appearance` prop specified in the theme. To avoid issues when using the ThemePanel (in development), clear out the user color preference before loading the page and before unloading the page (to ensure it does not freeze on reload).

Clearing the user preference isn't ideal production behavior, but typically the
ThemePanel is only used during development for trying out different styles, and
having it not freeze the app is better dev behavior.

Fix reflex-dev#2650
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REF-1994] rx.theme(appearance='dark') freezes whole app
2 participants