Skip to content

feat(ux): dark mode with light/dark/system appearance picker - #116

Merged
os-zhuang merged 1 commit into
mainfrom
feat/ux-dark-mode
Jun 11, 2026
Merged

feat(ux): dark mode with light/dark/system appearance picker#116
os-zhuang merged 1 commit into
mainfrom
feat/ux-dark-mode

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

UX-A — Dark mode

First of the UX improvements from the browser walkthrough. Adds a real, persistent theme switch.

What

  • Appearance screen (More › Preferences › Appearance) with Light / Dark / System options, mirroring the existing Language selector (haptics, check state).
  • useUIStore.setTheme now drives the NativeWind colorScheme and persists to MMKV — previously it only set state, so dark mode was unreachable.
  • Saved scheme is re-applied from the always-rendered root layout on cold start. The store's own module-load side-effect never fired because the first screen never imports the store.
  • Tab bar is now theme-aware — it was a hardcoded white bar that stayed glaring-white under a dark app.

i18n

appearance.{title,light,dark,system} + more.appearance across en / zh / ar.

Tests

jest.setup now mocks nativewind's colorScheme API 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 .dark confirmed), Home + tab bar both render dark.

🤖 Generated with Claude Code

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>
@os-zhuang
os-zhuang merged commit 59d38ba into main Jun 11, 2026
@os-zhuang
os-zhuang deleted the feat/ux-dark-mode branch June 11, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant