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

Docs go dark #409

Merged
merged 10 commits into from
Jan 24, 2024
Merged

Docs go dark #409

merged 10 commits into from
Jan 24, 2024

Conversation

nlopin
Copy link
Contributor

@nlopin nlopin commented Jan 19, 2024

What

Adds dark mode support and a switch between dark and light mode to the documentation. The switch also switches the Wave's scheme.

Resolves #408 #404

Media

The updated documentation is available on the temporary website.

CleanShot 2024-01-19 at 18 28 01

Video

How

  • Storybook docs don't explain theming well. After some research, I found that they do not support theme switches out of the box. I found an addon storybook-dark-mode that adds almost everything I needed.
  • The Source components didn't respect the mode setting. I've written a small wrapper Source that derives the theme and passes it to the Storybook Source component. As a result, I had to change paths for all the users of the Source
  • A lot of small adjustments to make the dark mode okay

Nikolai Lopin added 7 commits January 19, 2024 18:11
Nikolai Lopin added 2 commits January 19, 2024 22:16
Copy link
Contributor

@martimalek martimalek left a comment

Choose a reason for hiding this comment

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

LGTM, I've just added a comment to make sure we've tried storybook's own addon before using another one, feel free to resolve it if you think it's not worth trying

Copy link
Contributor

@div-Leo div-Leo left a comment

Choose a reason for hiding this comment

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

Amazing job!

Signed-off-by: Nikolai Lopin <[email protected]>
@nlopin nlopin merged commit b6d32c2 into next Jan 24, 2024
10 checks passed
@nlopin nlopin deleted the docs-go-dark branch January 24, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Dark mode for Storybook CSS Variables are missing on the non-story pages
3 participants