Repository navigation
fix(perps): keep curated token logo backgrounds after the design-system upgrade - #47599
Conversation
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/perps (2 files, +14 -8)
|
Builds ready [988008f]
⚡ Performance Benchmarks (Total: 🟢 5 pass · 🟡 4 warn · 🔴 4 fail)
Bundle Size Diffs [🚨 Warning! Bundle size has increased!]
|
…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>
988008f to
b96f3fb
Compare
Builds ready [b96f3fb]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 1 warn · 🔴 3 fail)
Bundle Size Diffs
|
|
|
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. |



Description
#47305 already upgraded the design-system packages on
main, and it went further than this branch originally did:@metamask/design-system-reactis^0.51.0(this PR targeted^0.50.0, v78)@metamask/design-system-sharedis^0.45.0(this PR targeted^0.44.0)@metamask/design-tokensis^13.0.0@metamask/design-system-tailwind-presetis^0.16.0That upgrade includes the v76–v78 breaks this PR was written for: required
TextFieldSearchinputAriaLabel,AvatarTokenimage backgrounds ofbg-white, and removal of the accent font. The call-site migrations, snapshot updates, and lockfile changes from this branch are already onmain, so they were dropped. Keeping the old version bumps would have downgradeddesign-system-reactanddesign-system-shared.What remains is the Perps logo background that #47305 did not preserve.
AvatarTokenstill paints image logos withbg-white.PerpsTokenLogochooses backgrounds fromperps-asset-bg-config.tsand used to pass no class when no per-asset override applied, which used to mean the themedbg-alternative. After the upgrade, that empty class letsbg-whitethrough, so light logos such as RESOLV and USUAL sit on white in dark mode. The fallback is nowbg-alternative. Curated overrides are unchanged: ETH and the other light-background assets still usebg-whitein dark mode, and S, RESOLV, USUAL, and the other dark-background assets still usebg-icon-defaultin 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
Screenshots/Recordings
AvatarTokenrendered with the background classPerpsTokenLogopasses 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
mainat9e4be0b1fb. No curated override meansbg-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 usebg-icon-default. RESOLV's SVG already contains its own beige disc, so the avatar color barely shows around it.Pre-merge author checklist
Pre-merge reviewer checklist
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.