Skip to content

fix: critical error message visibility bug in dark mode #30570

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

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Feb 25, 2025

Description

This PR fixes critical error message visibility in dark mode. Previously, error messages used a hardcoded color value that didn't respect theme preferences.

The improvement changes the color property to inherit in the critical error component, ensuring proper color inheritance from the parent theme based on the user's prefers-color-scheme setting.

Open in GitHub Codespaces

Related issues

Fixes: #30569

Manual testing steps

  1. Open app/scripts/ui.js
  2. Locate the initializeUiWithTab function
  3. Throw an error
    // To test critical error display, uncomment the next line:
    throw new Error('Test Critical Error');
  4. Enable dark mode in your system preferences or via dev tools (see recording)
  5. Verify error message text properly inherits dark theme colors
  6. Switch to light mode and verify error message remains visible

Screenshots/Recordings

Before

before720.mov

After

after720.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system in Extension label Feb 25, 2025
@georgewrmarshall georgewrmarshall self-assigned this Feb 25, 2025
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@georgewrmarshall georgewrmarshall marked this pull request as ready for review February 25, 2025 22:20
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner February 25, 2025 22:20
@metamaskbot
Copy link
Collaborator

Builds ready [1009e63]
Page Load Metrics (1845 ± 78 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint33622901774369177
domContentLoaded16122196181514067
load16202282184516278
domInteractive2794442010
backgroundConnect1083342813
firstReactRender1676362210
getState56818188
initialActions01000
loadScripts11711693135313665
setupStore862222110
uiStartup18062589211117082
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@georgewrmarshall georgewrmarshall changed the title chore: updating text color to inherit color set in prefers-colo-scheme fix: critical error message visibility bug in dark mode Feb 25, 2025
@georgewrmarshall georgewrmarshall added this pull request to the merge queue Feb 25, 2025
Merged via the queue into main with commit f0b840a Feb 25, 2025
97 of 105 checks passed
@georgewrmarshall georgewrmarshall deleted the fix/30569/fix-error-visibility-issue branch February 25, 2025 23:37
@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2025
@metamaskbot metamaskbot added the release-12.14.0 Issue or pull request that will be included in release 12.14.0 label Feb 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.14.0 Issue or pull request that will be included in release 12.14.0 team-design-system All issues relating to design system in Extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Error visibility issues in dark mode
5 participants