Repository navigation
feat(menu): add an appearance choice that follows the system by default - #1932
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brandyscarney
force-pushed
the
feat/dark-mode-preference
branch
from
December 3, 2026 22:13
fee4fc9 to
972297b
Compare
brandyscarney
force-pushed
the
feat/dark-mode-preference
branch
from
December 3, 2026 22:44
972297b to
734f720
Compare
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
force-pushed
the
feat/dark-mode-preference
branch
from
December 3, 2026 22:59
734f720 to
b7a27f1
Compare
ShaneK
approved these changes
Dec 4, 2026
This branch was successfully deployed
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.
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:
prefers-color-scheme: dark), including changes while the app is open.appearanceand 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.
appearanceis a signal, anddarkis computed from it and the system setting, and an effect applies the dark palette wheneverdarkchanges, 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.FormsModuleis 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.