Skip to content

Improvement to dark-tweaks, presist dark mode, add transitions, etc #4023

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

Closed

Conversation

amitojsingh366
Copy link

@amitojsingh366 amitojsingh366 commented Oct 29, 2021

Below mentioned things are added in this pr:

  • persistent color mode (dark, light)
  • components using the new color mode system
  • smooth transition between colorModes

this was achieved by creating a context provider using the context api called ThemeProvider it can be found at beta/src/modules/ThemeProvider.tsx

@amitojsingh366
Copy link
Author

@gaearon this should check a few boxes for your PR #4019

@amitojsingh366 amitojsingh366 mentioned this pull request Oct 30, 2021
@amitojsingh366 amitojsingh366 changed the title Improvement to dark-tweaks Improvement to dark-tweaks, presist dark mode, add transitions, etc Nov 3, 2021
@amitojsingh366 amitojsingh366 mentioned this pull request Nov 3, 2021
4 tasks
@gaearon
Copy link
Member

gaearon commented Nov 3, 2021

  • The formatting changes make it very difficult to see what's changed in the PR. When you send a PR, please exclude any formatting changes. We use Prettier. It seems like maybe you're also using Prettier but it doesn't respect the project settings? Not sure what happened here.
  • I'm not sure I understand what value the transition brings. I don't think it's necessary.
  • There is a significant flaw of this solution. That is — the page flashes from white to dark on load. That's not acceptable and is part of the reason why we haven't implemented this yet. I'll take another look but I think I'll need to implement this from scratch because we need to avoid this flaw.

@gaearon
Copy link
Member

gaearon commented Nov 4, 2021

Hey! Appreciate the effort. We've had to do a bunch of things differently to make it work well with SSR. I already merged the corresponding PRs but thanks for trying!

@gaearon gaearon closed this Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants