Skip to content

Conversation

@ghgoodreau
Copy link
Contributor

@ghgoodreau ghgoodreau commented Dec 1, 2025

Description

The destination account picker modal was experiencing horizontal overflow when account names were long (e.g., external addresses used as names). This created a poor UX with horizontal scrolling.

The fix adds proper overflow handling to the account name container:

  • Added overflow: hidden, flex: 1, and minWidth: 0 to the Column containing the name (the minWidth: 0 is key for flex children to allow shrinking below content size)
  • Added overflow: hidden to the Row
  • Added explicit textOverflow: ellipsis to the Text component
  • Added flexShrink: 0 to the checkmark icon so it doesn't get squished

Now long account names are properly truncated with an ellipsis instead of causing overflow.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Fixed recipient modal overflow when account names are long

Related issues

Fixes: #38107

Manual testing steps

  1. Create or import an account with a very long name (or use an external address as an account name)
  2. Go to the Bridge page
  3. Select a non-EVM chain (Bitcoin or Solana) as the destination
  4. Open the destination account picker modal
  5. Verify that long account names are truncated with an ellipsis instead of causing horizontal overflow
  6. Verify the modal layout looks clean without horizontal scrolling

Screenshots/Recordings

Before

After

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.

Note

Prevents horizontal overflow in the destination account picker by constraining flex children and adding ellipsis truncation; updates snapshots accordingly.

  • UI (Destination account picker):
    • In ui/pages/bridge/prepare/components/destination-account-list-item.tsx:
      • Add style={{ overflow: 'hidden', flex: 1, minWidth: 0 }} to Column wrapping the name.
      • Set Row to style={{ overflow: 'hidden' }} and Text to style={{ overflow: 'hidden', textOverflow: 'ellipsis' }} with ellipsis prop.
      • Prevent check icon from shrinking via style={{ flexShrink: 0 }}.
  • Tests:
    • Update snapshots in __snapshots__/destination-account-picker-modal.test.tsx.snap to reflect new overflow, flex, and ellipsis styles.

Written by Cursor Bugbot for commit 17f58cd. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

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.

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Dec 1, 2025
@metamaskbot
Copy link
Collaborator

metamaskbot commented Dec 1, 2025

✨ Files requiring CODEOWNER review ✨

🔄 @MetaMask/swaps-engineers (2 files, +27 -8)
  • 📁 ui/
    • 📁 pages/
      • 📁 bridge/
        • 📁 prepare/
          • 📁 components/
            • 📁 __snapshots__/
              • 📄 destination-account-picker-modal.test.tsx.snap +19 -6
              • 📄 destination-account-list-item.tsx +8 -2

@ghgoodreau ghgoodreau marked this pull request as ready for review December 1, 2025 20:08
@ghgoodreau ghgoodreau requested a review from a team as a code owner December 1, 2025 20:08
SteP-n-s
SteP-n-s previously approved these changes Dec 1, 2025
@metamaskbot
Copy link
Collaborator

Builds ready [d471ade]
UI Startup Metrics (1239 ± 122 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1239999169712213131462
load1036862144011110891253
domContentLoaded1030844143611110851244
domInteractive251589172272
firstPaint4938212783839641168
backgroundConnect21519626413221241
firstReactRender301981103450
getState3515135194569
initialActions108112
loadScripts82165011771068681024
setupStore1172131318
numNetworkReqs1257420572
BrowserifyPower User HomeuiStartup20511692273319521402464
load1019891135911710291331
domContentLoaded1004886135311810141320
domInteractive3318104203496
firstPaint50210513673639421057
backgroundConnect24820477095231514
firstReactRender5741125155995
getState207142732101208273
initialActions104112
loadScripts79567611571167981104
setupStore21777102441
numNetworkReqs1576832456207244
WebpackStandard HomeuiStartup8196991172918371016
load63656498484650834
domContentLoaded63255997983643829
domInteractive2715154252295
firstPaint23181871175212652
backgroundConnect105101121018
firstReactRender27194263238
getState261362103346
initialActions105112
loadScripts62955696882641826
setupStore1162741318
numNetworkReqs1257620573
WebpackPower User HomeuiStartup16281310209220417952025
load684606103984697888
domContentLoaded674598103184685883
domInteractive38191803237127
firstPaint309981043215341699
backgroundConnect93759817421557
firstReactRender60477876672
getState1749673360182207
initialActions103112
loadScripts671596102182683873
setupStore1965592241
numNetworkReqs95642633698156
FirefoxBrowserifyStandard HomeuiStartup13151071191616714201689
load1088932151311711701254
domContentLoaded1087932151211711701254
domInteractive56321743081121
firstPaint------
backgroundConnect47211963645127
firstReactRender22183942233
getState135128171051
initialActions102112
loadScripts1059915148210711401226
setupStore126170171032
numNetworkReqs1156616659
BrowserifyPower User HomeuiStartup27042088541462027654234
load1229984278732812181948
domContentLoaded1229983278632812171948
domInteractive12536559111121425
firstPaint------
backgroundConnect150261141194154575
firstReactRender5735117175999
getState30157979224420830
initialActions3036526
loadScripts1175963259726011721611
setupStore1486723190151668
numNetworkReqs92533295182235
WebpackStandard HomeuiStartup15721336214913316601790
load1299115115119413751477
domContentLoaded1299115115119413751477
domInteractive65281433386130
firstPaint------
backgroundConnect52201932859109
firstReactRender26194452837
getState1366891425
initialActions205134
loadScripts1269112914749013461425
setupStore166136181542
numNetworkReqs1256817763
WebpackPower User HomeuiStartup29872353531768430014756
load14951163307339515462786
domContentLoaded14941162307339515462785
domInteractive1153347797111382
firstPaint------
backgroundConnect2063216322841661048
firstReactRender64402212866122
getState292671020229403804
initialActions208227
loadScripts14041145281329114511901
setupStore1466748184176618
numNetworkReqs94632854498214
📊 Page Load Benchmark Results

Current Commit: d471ade | Date: 12/1/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±53ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 722ms (±51ms) 🟢 | historical mean value: 730ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 53ms 1.00s 1.32s 1.07s 1.32s
domContentLoaded 722ms 51ms 694ms 989ms 751ms 989ms
firstPaint 76ms 11ms 60ms 172ms 84ms 172ms
firstContentfulPaint 76ms 11ms 60ms 172ms 84ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 268 Bytes (0%)
  • common: 20 Bytes (0%)

micaelae
micaelae previously approved these changes Dec 1, 2025
@ghgoodreau ghgoodreau enabled auto-merge December 1, 2025 22:06
@ghgoodreau ghgoodreau dismissed stale reviews from micaelae and SteP-n-s via 17f58cd December 1, 2025 22:18
@metamaskbot
Copy link
Collaborator

Builds ready [17f58cd]
UI Startup Metrics (1229 ± 110 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12291045154611013031422
load102886313329410731215
domContentLoaded102285813269310671207
domInteractive2615114202287
firstPaint59093133642110441212
backgroundConnect21819726414223253
firstReactRender291969103258
getState3313106144161
initialActions106112
loadScripts812660107188857999
setupStore1172431218
numNetworkReqs1257319570
BrowserifyPower User HomeuiStartup19531691261714420032269
load1007879165212010111267
domContentLoaded993872163712110021261
domInteractive3417142243694
firstPaint5189416513949441267
backgroundConnect25420257095233525
firstReactRender5638108146085
getState18313267659192240
initialActions106112
loadScripts78567413911177911056
setupStore20993112340
numNetworkReqs936525124100135
WebpackStandard HomeuiStartup792692102374813958
load61555382565631785
domContentLoaded61155081864628780
domInteractive2515115222088
firstPaint18978751124190585
backgroundConnect10593101024
firstReactRender26194253136
getState271481113344
initialActions103112
loadScripts60954880963626771
setupStore1063341217
numNetworkReqs1257620571
WebpackPower User HomeuiStartup16201263240523617472119
load685589116695689896
domContentLoaded675584114995678877
domInteractive36171783034123
firstPaint252931157193241841
backgroundConnect1278755212106583
firstReactRender59428686575
getState16813022520183201
initialActions104112
loadScripts673582113893676868
setupStore21753112448
numNetworkReqs92631822599159
FirefoxBrowserifyStandard HomeuiStartup13091086173512813981572
load108690413318811501230
domContentLoaded108690413318811491229
domInteractive59311823083110
firstPaint------
backgroundConnect49222023360110
firstReactRender22183842332
getState12681111036
initialActions103012
loadScripts105489113148111061196
setupStore155156251063
numNetworkReqs1156716658
BrowserifyPower User HomeuiStartup27332100501757027684255
load1276973265534612802465
domContentLoaded1275973265534612802464
domInteractive13032638121115447
firstPaint------
backgroundConnect194251469263167872
firstReactRender5636149165993
getState26956915217288758
initialActions3043523
loadScripts1212957258627712141927
setupStore1927820222337739
numNetworkReqs93613304493212
WebpackStandard HomeuiStartup15041272215015616031839
load12411075155711113141428
domContentLoaded12401075155711113131428
domInteractive56242323678133
firstPaint------
backgroundConnect50212083257109
firstReactRender25197682533
getState157189201344
initialActions204134
loadScripts12111059152510512801408
setupStore176204271342
numNetworkReqs1256616762
WebpackPower User HomeuiStartup30122190834793128914746
load15271159652466314952809
domContentLoaded15271159652466314952809
domInteractive160274438446113374
firstPaint------
backgroundConnect172251241222170709
firstReactRender6238284306198
getState287911087243373894
initialActions2030422
loadScripts14661137650062414612633
setupStore1234755178110659
numNetworkReqs90552304286215
📊 Page Load Benchmark Results

Current Commit: 17f58cd | Date: 12/1/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±39ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 717ms (±37ms) 🟢 | historical mean value: 732ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±12ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 39ms 1.00s 1.33s 1.07s 1.33s
domContentLoaded 717ms 37ms 694ms 1.00s 745ms 1.00s
firstPaint 75ms 12ms 56ms 172ms 84ms 172ms
firstContentfulPaint 75ms 12ms 56ms 172ms 84ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: -108 Bytes (0%)
  • common: 20 Bytes (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Swap - If the Recipient has a long name, the Recipient modal UX overflows causing a weird design

5 participants