-
Notifications
You must be signed in to change notification settings - Fork 279
Jon/light mode #5918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jon/light mode #5918
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 814257e7aa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export const writeIsLightTheme = async (isLightTheme: boolean) => { | ||
| return await writeDeviceSettings({ ...deviceSettings, isLightTheme }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read disk settings before writing light mode
writeIsLightTheme writes the module-scoped deviceSettings without first reloading from disk, unlike the other write* helpers. If a user toggles light mode before initDeviceSettings finishes (or if deviceSettings is otherwise stale), this call will persist the default settings plus isLightTheme, effectively wiping other saved flags like disableAnimations or forceLightAccountCreate from the JSON file. Consider mirroring the read/merge pattern used by writeDisableAnimations so existing settings are preserved.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really agree - by the time we get to the settings scene, this will surely be loaded. We probably need to refactor this whole module for safety, but spot-fixing this is probably not worthwhile.
| export const writeIsLightTheme = async (isLightTheme: boolean) => { | ||
| return await writeDeviceSettings({ ...deviceSettings, isLightTheme }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really agree - by the time we get to the settings scene, this will surely be loaded. We probably need to refactor this whole module for safety, but spot-fixing this is probably not worthwhile.
db87ea8 to
70ee8c0
Compare
Also remove unused images
We were unable to come up with acceptable changes for the `GiftCardTile` component by changing only colors. A redesign of the component is required in the future, but these changes at least make it useable.
70ee8c0 to
4bc0b69
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Introduces a full light mode with persistence and broad theming updates.
isLightThemedevice setting,writeIsLightTheme, and a Settings toggle; applies light theme on app init viaInteractionManageredgeLight/testLighttheme palettes, gradients, images, and button styles; addsgiftCardTextto theme and uses it in gift card componentstheme.isDarkto avoid over-darkening in light modegetThemedIconUri,getUi4ImageUri); locales and snapshots updatedWritten by Cursor Bugbot for commit 4bc0b69. This will update automatically on new commits. Configure here.