Closed
Conversation
- Fix invisible mentions/search highlights in dark contrast mode by adding mentionBG override (was same color as mentionText, both blue600) - Fix Enter key not toggling high contrast switch by adding SWITCH role to SelectionList's disableEnterShortcut check - Fix badge backgrounds blending with sidebar highlights in dark contrast by using brighter badge colors (green500, tangerine500) - Fix GBR badge text ignoring high contrast theme by replacing hardcoded colors.white with theme.buttonSuccessText Co-authored-by: Rushat Gabhane <rushatgabhane@users.noreply.github.com>
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.
Explanation of Change
This PR fixes four deploy blockers introduced by PR #85197 (High Contrast theme):
Invisible mentions in dark high-contrast mode ([Due for payment 2026-04-14] Theme - Highlighted search query and mention are not visible when high contrast mode is enabled #86339): The
dark-contrasttheme setmentionTexttocolors.blue600but did not overridementionBG, which inheritscolors.blue600from the base dark theme. This made mention text and background the same color (#0164BF), rendering mentions invisible. Fixed by addingmentionBG: colors.blue200todark-contrast.ts.Enter key doesn't toggle high contrast switch ([Due for payment 2026-04-14] Preference - Unable to turn on the high contrast mode toggle using enter key #86346): The
disableEnterShortcutguard inBaseSelectionListonly checked forbuttonandcheckboxroles. When the Switch (role=switch) had focus inside the SelectionList footer, pressing Enter triggered the list's keyboard shortcut instead. Fixed by addingCONST.ROLE.SWITCHto bothBaseSelectionList.tsxandBaseSelectionListWithSections.tsx.Badge backgrounds blend with sidebar in dark high-contrast (Reports - The number blended with the highlight in dark mood #86347): Badge colors (
green700/tangerine700) were too dark against the dark sidebar backgrounds, making them virtually invisible. Fixed by overridingbadgeSuccessBGandbadgeDangerBGto brighter 500-level palette colors indark-contrast.ts.GBR badge ignores high contrast theme ([Due for payment 2026-04-14] Theme - High contrast theme is not applied on GBR on LHN #86349):
badgeStrongTextused hardcodedcolors.whiteinstead of a theme-aware variable. Fixed by changing it totheme.buttonSuccessText, which resolves to near-white in normal themes and dark green in high-contrast themes.Fixed Issues
$ #86339
$ #86346
$ #86347
$ #86349
PROPOSAL:
Tests
@concierge) — verify the mention text is visible (dark blue text on light blue background)Offline tests
These changes are purely visual theme overrides and keyboard shortcut handling. No network/offline behavior is affected.
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
Theme/color changes only — identical behavior across all platforms.
Android: mWeb Chrome
Theme/color changes only — identical behavior across all platforms.
iOS: Native
Theme/color changes only — identical behavior across all platforms.
iOS: mWeb Safari
Theme/color changes only — identical behavior across all platforms.
MacOS: Chrome / Safari
Tested via web agent — mentions are visible in dark+high contrast, keyboard Enter toggles the switch, badge colors confirmed brighter.