feat(ux): dark mode with light/dark/system appearance picker - #116
Merged
Conversation
Wire a real theme switch end-to-end. setTheme now drives the NativeWind
color scheme and persists to MMKV; the saved scheme is re-applied from the
always-rendered root layout on cold start (the store's module side-effect
alone never ran because the first screen doesn't import it). The tab bar,
previously a hardcoded white bar, follows the scheme too.
- stores/ui-store: setTheme → colorScheme.set + MMKV persist; load on init
- ThemeSelector + /appearance screen, entry under More › Preferences
- (tabs)/_layout: theme-aware tab bar colors
- i18n: appearance.{title,light,dark,system} + more.appearance (en/zh/ar)
- jest: mock nativewind colorScheme so ui-store tests load
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
UX-A — Dark mode
First of the UX improvements from the browser walkthrough. Adds a real, persistent theme switch.
What
useUIStore.setThemenow drives the NativeWindcolorSchemeand persists to MMKV — previously it only set state, so dark mode was unreachable.i18n
appearance.{title,light,dark,system}+more.appearanceacross en / zh / ar.Tests
jest.setupnow mocks nativewind'scolorSchemeAPI so the ui-store suite loads. Full suite: 1298 passing.Verified
Browser walkthrough: toggling applies live across all screens, persists across a hard reload (cold-load
.darkconfirmed), Home + tab bar both render dark.🤖 Generated with Claude Code