Skip to content

feat(menu): add an appearance choice that follows the system by default - #1932

Merged
brandyscarney merged 1 commit into
mainfrom
feat/dark-mode-preference
Dec 4, 2026
Merged

brandyscarney merged 1 commit into
mainfrom
feat/dark-mode-preference

Conversation

@brandyscarney

@brandyscarney brandyscarney commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

The menu's Dark Mode toggle only switched the palette for the current visit: the app started in light mode on every load and ignored the system dark mode setting. The toggle is replaced with an Appearance section in the menu:

  • System is the default and follows the system dark mode setting (prefers-color-scheme: dark), including changes while the app is open.
  • Light and Dark override the system setting.
  • The choice is saved in Preferences under appearance and used on the next load.

The choices are radios with an icon each, like the other menu items. They use the iOS radio on both platforms, so the picked choice is marked with a checkmark instead of a radio circle. The rows are slightly shorter than the other menu items to keep the section compact.

appearance is a signal, and dark is computed from it and the system setting, and an effect applies the dark palette whenever dark changes, so the value loaded at startup reaches the page in this zoneless app. A choice made while the saved one is still loading is kept. FormsModule is no longer needed.

Unit tests cover the saved choice taking over the system setting, a saved value that is not a choice falling back to System, and following system changes only while System is picked. e2e tests check that the choices switch the palette, that System follows the system setting, and that the choice is kept after a reload.

Same change in the other conference apps: ionic-team/ionic-react-conference-app#217, ionic-team/ionic-vue-conference-app#128

Based on ionic-team/ionic-react-conference-app#77 by @brucelane, who is credited as co-author.

@brandyscarney
brandyscarney requested a review from a team as a code owner December 3, 2026 18:43
@brandyscarney
brandyscarney requested review from ShaneK and removed request for a team December 3, 2026 18:43
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-conference-app Ready Ready Preview Dec 3, 2026 11:00pm UTC

Request Review

The menu's Dark Mode toggle is replaced with an Appearance section with
System, Light and Dark choices. System is the default and follows the
system dark mode setting, including changes while the app is open. The
choice is saved in Preferences and used on the next load.

Co-authored-by: Bruce LANE <138158+brucelane@users.noreply.github.com>
@brandyscarney
brandyscarney merged commit bfc8592 into main Dec 4, 2026
6 checks passed
@brandyscarney
brandyscarney deleted the feat/dark-mode-preference branch December 4, 2026 18:38

This branch was successfully deployed

1 active deployment
Preview — b7a27f1c Deployed Dec 3, 2026 by vercel[bot]
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.

2 participants