-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Add a guide for setting dark mode by default #34839
Conversation
|
Co-authored-by: danilo leal <67129314+danilo-leal@users.noreply.github.com> Signed-off-by: Siriwat K <siriwatkunaporn@gmail.com>
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.
👍
Thoughts:
- A demo could help a lot to be able to build reproductions that are dark mode only. It could also serve as a visual regression test case.
- I wonder if setting the default is more important than the rest of the page, so maybe it should be closer to the top.
- The dark mode docs page is under "How to guide" but all the pages that aren't API references are also how to guides in our docs, only that they are groups in "logical" sections. So per this rational, I think that it could be better to have the docs about the dark mode under the Customization section. Meaning, we could use "How to guide" for pages we don't know where else to put.
Agree on all points, let me update them altogether. |
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.
Would it make sense to have this demo and the others in TypeScript? It could serve as a good stress test to spot TypeScript issues.
useEnhancedEffect(() => { | ||
setNode(document.getElementById('dark-mode-by-default')); | ||
}, []); |
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.
Off topic
This could suggest that nesting dark with a light theme in Joy UI might be a bit of a struggle (it's not a single rendering step).
…/joy-default-dark
…/joy-default-dark
@oliviertassinari it is ready for a second review.
|
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.
This is looking great, thanks for putting it up, Jun! Sam will definitely do a thorough copy review but I already took the opportunity to do some content rearranging + writing tweaks. I wonder how to make it better when similar and close sections have exact same content, though.
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.
It looks good 👍
…l-ui into docs/joy-default-dark
@samuelsycamore @danilo-leal Wow 😲, it looks much much better. The content flow is so smooth. |
Preview: https://deploy-preview-34839--material-ui.netlify.app/joy-ui/customization/dark-mode/
From the docs feedback.