Skip to content

Conversation

georgewrmarshall
Copy link
Contributor

Description

This PR introduces a new BalanceEmptyState component to improve the user experience when users have zero balance in their wallet. The component encourages users to add funds with a clear call-to-action and provides visual guidance through an engaging UI.

The component includes:

  • Visual bank transfer icon to represent funding actions
  • Clear messaging with i18n support for "Fund your wallet" and "Get your wallet ready to use web3"
  • Integration with the existing ramps system for buying crypto
  • Comprehensive MetaMetrics tracking for user interactions
  • Full test coverage and Storybook documentation

Changelog

CHANGELOG entry: Added BalanceEmptyState component to guide users with zero balance to add funds

Related issues

Fixes:

Manual testing steps

  1. Ensure you have a wallet with zero balance across all tokens
  2. Navigate to the tokens/balance view where the empty state should appear
  3. Verify the component displays with proper styling and messaging
  4. Click the "Add funds" button and verify it opens the buy crypto flow
  5. Check that MetaMetrics events are properly tracked
  6. Test in different locales to verify i18n strings work correctly

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.

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.

@metamaskbot metamaskbot added the team-design-system All issues relating to design system in Extension label Oct 17, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: d1d50f4 | Date: 10/17/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±100ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 740ms (±98ms) 🟢 | historical mean value: 734ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±60ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 100ms 1.00s 1.78s 1.24s 1.78s
domContentLoaded 740ms 98ms 699ms 1.45s 931ms 1.45s
firstPaint 83ms 60ms 60ms 676ms 88ms 676ms
firstContentfulPaint 83ms 60ms 60ms 676ms 88ms 676ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [d1d50f4]
UI Startup Metrics (1238 ± 65 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1238110414366512861344
load106896212656111131179
domContentLoaded106295412335911081165
domInteractive1813140131734
firstPaint646146124143210741158
backgroundConnect2512382806255263
firstReactRender26185672841
getState155101111729
initialActions50407515
loadScripts81671298359859917
setupStore1062331115
WebpackHomeuiStartup824708116075837983
load62257389463627809
domContentLoaded61456888562621792
domInteractive15115471334
firstPaint19657821175195593
backgroundConnect21104472633
firstReactRender2917254243134
getState942231115
initialActions3011247
loadScripts61256687560619782
setupStore952431113
FirefoxBrowserifyHomeuiStartup14271219185911514711665
load1221104615328712741379
domContentLoaded1221104615328712741378
domInteractive1193447262129263
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3318114163665
firstReactRender24204442536
getState84516716
initialActions41364313
loadScripts1199103015128312571332
setupStore11583101031
WebpackHomeuiStartup16111439205011116471889
load1376120615637914331522
domContentLoaded1376120615637914331522
domInteractive1113337564111327
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect4022122174375
firstReactRender312376123273
getState9412912916
initialActions429710310
loadScripts1349119015347813971503
setupStore11598111031
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -46.52 KiB (-1.02%)
  • ui: 10.47 KiB (0.16%)
  • common: 61.71 KiB (0.74%)

@georgewrmarshall georgewrmarshall changed the title feat: add BalanceEmptyState component for zero balance UX feat: add BalanceEmptyState component Oct 18, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 5c4b9b0 | Date: 10/18/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.08s (±76ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 759ms (±74ms) 🟢 | historical mean value: 733ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±12ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.08s 76ms 1.03s 1.37s 1.32s 1.37s
domContentLoaded 759ms 74ms 715ms 1.05s 984ms 1.05s
firstPaint 81ms 12ms 64ms 180ms 96ms 180ms
firstContentfulPaint 81ms 12ms 64ms 180ms 96ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [5c4b9b0]
UI Startup Metrics (1227 ± 70 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1227110014577012711360
load105795112276410911189
domContentLoaded105194312226410811183
domInteractive1712123111626
firstPaint66472122442710591145
backgroundConnect2512362818254266
firstReactRender24175762540
getState16587101934
initialActions607410515
loadScripts80670897262835943
setupStore962431014
WebpackHomeuiStartup8367111082888471056
load62957591479628899
domContentLoaded62157190378623889
domInteractive15115781435
firstPaint18254909177193585
backgroundConnect21103972534
firstReactRender2916235233259
getState931931112
initialActions308246
loadScripts61856989276621879
setupStore1052731113
FirefoxBrowserifyHomeuiStartup1324118115758413681527
load1142102513907011831249
domContentLoaded1142102513907011831249
domInteractive973425342107197
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3121121133551
firstReactRender22183332327
getState74253712
initialActions319134
loadScripts1121100813726911601233
setupStore95445914
WebpackHomeuiStartup15461367188511515771802
load1334119416009013901510
domContentLoaded1334119316009013901510
domInteractive1093037573106350
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect331992103946
firstReactRender28227472940
getState85677813
initialActions519010314
loadScripts1312117715738813611480
setupStore12591151036
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 322 Bytes (0%)

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

Labels

size-M team-design-system All issues relating to design system in Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants