Skip to content

fix(perps): keep curated token logo backgrounds after the design-system upgrade - #47599

Merged
georgewrmarshall merged 1 commit into
mainfrom
cursor/upgrade-design-system-v78-c900
Nov 10, 2026
Merged

georgewrmarshall merged 1 commit into
mainfrom
cursor/upgrade-design-system-v78-c900

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

#47305 already upgraded the design-system packages on main, and it went further than this branch originally did:

  • @metamask/design-system-react is ^0.51.0 (this PR targeted ^0.50.0, v78)
  • @metamask/design-system-shared is ^0.45.0 (this PR targeted ^0.44.0)
  • @metamask/design-tokens is ^13.0.0
  • @metamask/design-system-tailwind-preset is ^0.16.0

That upgrade includes the v76–v78 breaks this PR was written for: required TextFieldSearch inputAriaLabel, AvatarToken image backgrounds of bg-white, and removal of the accent font. The call-site migrations, snapshot updates, and lockfile changes from this branch are already on main, so they were dropped. Keeping the old version bumps would have downgraded design-system-react and design-system-shared.

What remains is the Perps logo background that #47305 did not preserve. AvatarToken still paints image logos with bg-white. PerpsTokenLogo chooses backgrounds from perps-asset-bg-config.ts and used to pass no class when no per-asset override applied, which used to mean the themed bg-alternative. After the upgrade, that empty class lets bg-white through, so light logos such as RESOLV and USUAL sit on white in dark mode. The fallback is now bg-alternative. Curated overrides are unchanged: ETH and the other light-background assets still use bg-white in dark mode, and S, RESOLV, USUAL, and the other dark-background assets still use bg-icon-default in light mode.

Changelog

CHANGELOG entry: Kept Perps token logos on their themed background so light logos stay visible in dark mode

Related issues

Fixes:

Related: #47305 (design-system upgrade and search-field accessibility, already on main)

Manual testing steps

  1. Open the extension in dark mode and go to the Perps market list.
  2. Confirm ETH still renders on a white circle.
  3. Confirm BTC renders on the themed alternative background, not white.
  4. Switch to light mode and confirm a light logo such as RESOLV or USUAL uses the dark background and stays visible. In dark mode that same logo uses the themed alternative background, not white.

Screenshots/Recordings

AvatarToken rendered with the background class PerpsTokenLogo passes for BTC, ETH, S, RESOLV, and USUAL. Artwork is the Hyperliquid coin SVG the component loads when the MetaMask primary icon 404s. The page background is the theme default.

Before

main at 9e4be0b1fb. No curated override means bg-white. In dark mode the light S mark and the USUAL ring sit on that white circle. ETH stays white because it is on the light-background list.

After

This branch. No curated override means bg-alternative, so S and USUAL stay visible on the dark theme. ETH is still white in dark mode. In light mode S, RESOLV, and USUAL still use bg-icon-default. RESOLV's SVG already contains its own beige disc, so the avatar color barely shows around it.

Screen Before After
Light – logos Light theme logos on main Light theme logos on this branch
Dark – logos Dark theme logos on main Dark theme logos on this branch

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.
Open in Web Open in Cursor 

Note

Low Risk
Only touches Perps logo styling logic and associated tests, leaving broader flows untouched.

Reviewed by Cursor Bugbot for commit b96f3fb. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added the size-S label Nov 3, 2026
@metamask-ci metamask-ci Bot added the team-design-system All issues relating to design system in Extension label Nov 3, 2026
@metamask-ci

metamask-ci Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/perps (2 files, +14 -8)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 perps/
          • 📁 perps-token-logo/
            • 📄 perps-token-logo.test.tsx +11 -7
            • 📄 perps-token-logo.tsx +3 -1

@metamask-ci

metamask-ci Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor
Builds ready [988008f]
⚡ Performance Benchmarks (Total: 🟢 5 pass · 🟡 4 warn · 🔴 4 fail)

Baseline (latest main): f693520 | Date: 11/3/2026 | Pipeline: 41725611039 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 4 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟡 [CI log]🟡 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟡 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ loadNewAccount/load_new_account: +181%
  • ↑ loadNewAccount/total: +181%
  • ↓ loadNewAccount/inp: -18%
  • ↑ loadNewAccount/cls: +282%
  • ↑ confirmTx/longTaskTotalDuration: +49%
  • ↑ confirmTx/longTaskMaxDuration: +72%
  • ↑ confirmTx/tbt: +82%
  • ↓ confirmTx/inp: -13%
  • ↑ confirmTx/fcp: +12%
  • ↑ confirmTx/lcp: +16%
  • ↑ bridgeUserActions/bridge_load_page: +90%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +41%
  • ↑ bridgeUserActions/longTaskCount: +82%
  • ↑ bridgeUserActions/longTaskTotalDuration: +114%
  • ↑ bridgeUserActions/longTaskMaxDuration: +37%
  • ↑ bridgeUserActions/tbt: +166%
  • ↑ bridgeUserActions/total: +15%
  • ↑ bridgeUserActions/inp: +10%
  • ↑ bridgeUserActions/fcp: +10%
  • ↑ bridgeUserActions/cls: +281%
  • ↑ loadNewAccount/load_new_account: +183%
  • ↑ loadNewAccount/total: +183%
  • ↓ loadNewAccount/fcp: -48%
  • ↑ loadNewAccount/lcp: +1323%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -21%
  • ↑ confirmTx/fcp: +16%
  • ↑ confirmTx/lcp: +1310%
  • ↑ bridgeUserActions/bridge_load_page: +203%
  • ↑ bridgeUserActions/bridge_load_asset_picker: +137%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/total: +42%
  • ↑ bridgeUserActions/inp: +54%
  • ↓ bridgeUserActions/fcp: -31%
  • ↑ bridgeUserActions/lcp: +1275%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 1.9s
  • 🟡 confirmTx/FCP: p75 1.9s
  • 🟡 bridgeUserActions/FCP: p75 1.9s
  • 🟡 loadNewAccount/LCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.0s
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 loadScripts

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/uiStartup: +12%
  • ↑ startupStandardHome/domInteractive: +26%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -29%
  • ↑ startupStandardHome/setupStore: +101%
  • ↓ startupStandardHome/longTaskCount: -29%
  • ↑ startupStandardHome/tbt: +13%
  • ↑ startupStandardHome/cls: +400%
  • ↑ startupStandardHome/domInteractive: +36%
  • ↓ startupStandardHome/firstReactRender: -99%
  • ↓ startupStandardHome/initialActions: -50%
  • ↑ startupStandardHome/setupStore: +132%
  • ↑ startupStandardHome/fcp: +39%
User Journey Benchmarks · Samples: 5 · mock API 🔴 2
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total

📈 Results compared to the previous 5 runs on main

  • ↑ onboardingImportWallet/srpButtonToSrpForm: +40%
  • ↑ onboardingImportWallet/confirmSrpToPwForm: +39%
  • ↑ onboardingImportWallet/pwFormToMetricsScreen: +30%
  • ↑ onboardingImportWallet/metricsToWalletReadyScreen: +29%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -92%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -74%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -85%
  • ↓ onboardingNewWallet/srpButtonToPwForm: -25%
  • ↓ onboardingNewWallet/createPwToRecoveryScreen: -25%
  • ↓ onboardingNewWallet/skipBackupToMetricsScreen: -14%
  • ↓ onboardingNewWallet/agreeButtonToOnboardingSuccess: -41%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -76%
  • ↓ onboardingNewWallet/longTaskCount: -100%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -100%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -100%
  • ↓ onboardingNewWallet/tbt: -100%
  • ↓ onboardingNewWallet/total: -73%
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ dappPageLoad/pageLoadTime: -70%
  • ↓ dappPageLoad/domContentLoaded: -39%
  • ↓ dappPageLoad/firstPaint: -52%
  • ↓ dappPageLoad/firstContentfulPaint: -52%
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
Status Bundle Total Diff Change
✅ background 15.26 MiB +170 Bytes 0.00%
🚨 ui 19.34 MiB +3.94 KiB +0.02%
✅ common 0 Bytes 0 Bytes 0.00%
🚨 other 4.44 MiB +2.84 KiB +0.06%
✅ content scripts 3.23 MiB +80 Bytes 0.00%
🚨 unzipped 79.9 MiB +6.76 KiB +0.01%
🚨 zip 24.07 MiB +1.21 KiB 0.00%

…white default

AvatarToken paints image logos with bg-white. Perps still chooses
backgrounds from the curated asset config, so the fallback stays
bg-alternative and light logos such as RESOLV and USUAL stay visible
in dark mode.

The design-system package bump is already on main via #47305.

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/upgrade-design-system-v78-c900 branch from 988008f to b96f3fb Compare November 6, 2026 18:15
@cursor cursor Bot changed the title chore: upgrade design system packages (v78.0.0) fix(perps): keep curated token logo backgrounds after the design-system upgrade Nov 6, 2026
@metamask-ci

metamask-ci Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor
Builds ready [b96f3fb]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)

Baseline (latest main): f693520 | Date: 11/3/2026 | Pipeline: 42269029867 | Baseline logs

Metricschrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 load_new_account(p95) [CI log]🔴 load_new_account(p95) [CI log]
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]

Regressions (🔴 3 failures)

Interaction Benchmarks · Samples: 5 🔴 2
Benchmarkchrome-webpackfirefox-webpack
loadNewAccount
[Sentry log · main/release]
🔴 [CI log]
🔴 load_new_account
🔴 [CI log]
🔴 load_new_account
confirmTx
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]
bridgeUserActions
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ loadNewAccount/load_new_account: +180%
  • ↑ loadNewAccount/total: +180%
  • ↓ loadNewAccount/inp: -48%
  • ↓ loadNewAccount/fcp: -33%
  • ↑ loadNewAccount/lcp: +557%
  • ↓ loadNewAccount/cls: -76%
  • ↓ confirmTx/inp: -44%
  • ↓ confirmTx/fcp: -33%
  • ↑ confirmTx/lcp: +573%
  • ↓ bridgeUserActions/bridge_load_asset_picker: -15%
  • ↓ bridgeUserActions/longTaskTotalDuration: -30%
  • ↓ bridgeUserActions/longTaskMaxDuration: -35%
  • ↓ bridgeUserActions/tbt: -61%
  • ↓ bridgeUserActions/inp: -34%
  • ↓ bridgeUserActions/fcp: -33%
  • ↑ bridgeUserActions/lcp: +565%
  • ↑ bridgeUserActions/cls: +621%
  • ↑ loadNewAccount/load_new_account: +180%
  • ↑ loadNewAccount/total: +180%
  • ↓ loadNewAccount/inp: -25%
  • ↓ loadNewAccount/fcp: -74%
  • ↑ loadNewAccount/lcp: +979%
  • ↓ confirmTx/longTaskCount: -100%
  • ↓ confirmTx/longTaskTotalDuration: -100%
  • ↓ confirmTx/longTaskMaxDuration: -100%
  • ↓ confirmTx/tbt: -100%
  • ↓ confirmTx/inp: -44%
  • ↓ confirmTx/fcp: -73%
  • ↑ confirmTx/lcp: +989%
  • ↑ bridgeUserActions/bridge_load_page: +82%
  • ↓ bridgeUserActions/bridge_search_token: -15%
  • ↓ bridgeUserActions/longTaskCount: -100%
  • ↓ bridgeUserActions/longTaskTotalDuration: -100%
  • ↓ bridgeUserActions/longTaskMaxDuration: -100%
  • ↓ bridgeUserActions/tbt: -100%
  • ↑ bridgeUserActions/inp: +62%
  • ↓ bridgeUserActions/fcp: -74%
  • ↑ bridgeUserActions/lcp: +730%
Startup Benchmarks · Samples: 100
Benchmarkchrome-webpackfirefox-webpack
startupStandardHome
[Sentry log · main/release]
🟢 [CI log]🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↑ startupStandardHome/uiStartup: +91%
  • ↑ startupStandardHome/load: +127%
  • ↑ startupStandardHome/domContentLoaded: +128%
  • ↑ startupStandardHome/domInteractive: +26%
  • ↓ startupStandardHome/firstPaint: -53%
  • ↓ startupStandardHome/firstReactRender: -98%
  • ↓ startupStandardHome/initialActions: -29%
  • ↑ startupStandardHome/loadScripts: +126%
  • ↑ startupStandardHome/setupStore: +134%
  • ↑ startupStandardHome/longTaskCount: +43%
  • ↑ startupStandardHome/longTaskTotalDuration: +125%
  • ↑ startupStandardHome/longTaskMaxDuration: +136%
  • ↑ startupStandardHome/tbt: +150%
  • ↓ startupStandardHome/fcp: -49%
  • ↑ startupStandardHome/lcp: +129%
  • ↓ startupStandardHome/cls: -72%
  • ↓ startupStandardHome/uiStartup: -20%
  • ↓ startupStandardHome/load: -14%
  • ↓ startupStandardHome/domContentLoaded: -16%
  • ↑ startupStandardHome/domInteractive: +16%
  • ↓ startupStandardHome/firstReactRender: -99%
  • ↓ startupStandardHome/initialActions: -50%
  • ↓ startupStandardHome/loadScripts: -14%
  • ↓ startupStandardHome/setupStore: -19%
  • ↑ startupStandardHome/fcp: +18%
  • ↓ startupStandardHome/lcp: -13%
User Journey Benchmarks · Samples: 5 · mock API 🔴 1
Benchmarkchrome-webpackfirefox-webpack
onboardingImportWallet
[Sentry log · main/release]
🟢 [CI log]🟡 [CI log]
🟡 total
onboardingNewWallet
[Sentry log · main/release]
🟢 [CI log]🔴 [CI log]
🔴 total

📈 Results compared to the previous 5 runs on main

  • ↓ onboardingImportWallet/srpButtonToSrpForm: -22%
  • ↓ onboardingImportWallet/confirmSrpToPwForm: -14%
  • ↓ onboardingImportWallet/metricsToWalletReadyScreen: -33%
  • ↓ onboardingImportWallet/doneButtonToHomeScreen: -92%
  • ↓ onboardingImportWallet/openAccountMenuToAccountListLoaded: -74%
  • ↓ onboardingImportWallet/longTaskCount: -100%
  • ↓ onboardingImportWallet/longTaskTotalDuration: -100%
  • ↓ onboardingImportWallet/longTaskMaxDuration: -100%
  • ↓ onboardingImportWallet/tbt: -100%
  • ↓ onboardingImportWallet/total: -86%
  • ↑ onboardingNewWallet/srpButtonToPwForm: +14%
  • ↑ onboardingNewWallet/createPwToRecoveryScreen: +35%
  • ↑ onboardingNewWallet/skipBackupToMetricsScreen: +12%
  • ↓ onboardingNewWallet/doneButtonToAssetList: -68%
  • ↓ onboardingNewWallet/longTaskCount: -23%
  • ↓ onboardingNewWallet/longTaskTotalDuration: -43%
  • ↓ onboardingNewWallet/longTaskMaxDuration: -28%
  • ↓ onboardingNewWallet/tbt: -82%
  • ↓ onboardingNewWallet/total: -63%
Dapp Page Load Benchmarks · Samples: 100
Benchmarkchrome-webpack
dappPageLoad
[Sentry log · main/release]
🟢 [CI log]

📈 Results compared to the previous 5 runs on main

  • ↓ dappPageLoad/pageLoadTime: -48%
  • ↓ dappPageLoad/firstPaint: -28%
  • ↓ dappPageLoad/firstContentfulPaint: -28%
Bundle Size Diffs
Status Bundle Total Diff Change
✅ background 15.26 MiB +130 Bytes 0.00%
✅ ui 19.42 MiB +79 Bytes 0.00%
✅ common 0 Bytes 0 Bytes 0.00%
✅ other 4.46 MiB 0 Bytes 0.00%
✅ content scripts 3.23 MiB 0 Bytes 0.00%
✅ unzipped 79.76 MiB +214 Bytes 0.00%
✅ zip 23.86 MiB +53 Bytes 0.00%

@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@georgewrmarshall georgewrmarshall self-assigned this Nov 6, 2026
@georgewrmarshall
georgewrmarshall marked this pull request as ready for review November 6, 2026 19:37
@georgewrmarshall
georgewrmarshall requested a review from a team as a code owner November 6, 2026 19:37
@georgewrmarshall
georgewrmarshall added this pull request to the merge queue Nov 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@georgewrmarshall
georgewrmarshall added this pull request to the merge queue Nov 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 10, 2026
@georgewrmarshall
georgewrmarshall added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit a9e87f7 Nov 10, 2026
270 of 273 checks passed
@georgewrmarshall
georgewrmarshall deleted the cursor/upgrade-design-system-v78-c900 branch November 10, 2026 20:07
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
@metamaskbot metamaskbot added the release-13.58.0 Issue or pull request that will be included in release 13.58.0 label Nov 16, 2026
@gauthierpetetin

Copy link
Copy Markdown
Contributor

No release label on PR. Adding release label release-13.58.0 on PR, as PR was added to branch 13.58.0 when release was cut.

This branch was previously deployed

1 inactive deployment
pr-comment — b96f3fb6 Deployed Nov 6, 2026 by georgewrmarshall via identify-codeowners #88978
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.58.0 Issue or pull request that will be included in release 13.58.0 size-S team-design-system All issues relating to design system in Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants