feat: dark mode master#200
Open
HathawayQAQ wants to merge 4 commits intoNetflix:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unit tests related to the change have been updated
Documentation related to the change has been updated
Description of the Change
Add dark mode support to the Metaflow UI (addresses Dark Mode #157).
[data-theme="dark"]CSS variable override block intheme.cssthat swaps color values when active. Component variables that reference base colors viavar()cascade automatically, so only base colors and hardcoded values need overrides.ThemeProviderReact context (following the same pattern asTimezoneProvider) that persists the user's choice tolocalStorageand defaults to the OS preference viaprefers-color-scheme.font-familty,---color-text-primary).Alternate Designs
[data-theme]CSS selector is simpler and requires no changes to individual components.Possible Drawbacks
data-themeattribute and will remain in light mode.Supporting plugin dark mode would require passing the theme via
postMessage, which is out of scope for this PR.Verification Process
localStoragetsc --noEmitwith zero errorsRelease Notes