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 flashing between page loads in dark mode #45

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

mokaymokay
Copy link

Description

  • Fix flashing between page loads in dark mode
  • Update cookie value to exclude encoding strings like %22
  • Chore: Use enum for cookie value as best practice

Type(s) of changes

  • Bug fix
  • New feature
  • Update to an existing feature

Motivation for PR

  • Noticed flashing between page loads in dark mode due to when we're setting the dark class on html
  • In order for the theme setting to persist and readable between subdomains, we should make sure the cookie value is deterministic, only contains dark or light without any encoding strings

How Has This Been Tested?

Locally, I also set the cookie on any domain while testing, but have since removed that logic. We should merge and test on production!

Applicable screenshots

https://www.loom.com/share/688ab758f3c84e1688c9fc72fe746877

…ensure that the value does not include unicode strings
@mokaymokay mokaymokay requested a review from nahbee10 December 11, 2024 20:35
@nahbee10 nahbee10 merged commit 8871e62 into master Dec 12, 2024
3 checks passed
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.

2 participants