refactor(confirmations): Migrate ButtonLink to MMDS - #34370
refactor(confirmations): Migrate ButtonLink to MMDS#34370brianacnguyen wants to merge 14 commits into
Conversation
…Tertiary Button Migrate deprecated ButtonLink and text-as-link patterns to TextButton for inline links and Button Tertiary for standalone CTAs, with testIDs for stable queries. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
…ce assertions Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34370 +/- ##
==========================================
- Coverage 85.08% 85.08% -0.01%
==========================================
Files 6332 6335 +3
Lines 172506 172500 -6
Branches 42652 42650 -2
==========================================
- Hits 146784 146775 -9
+ Misses 15691 15688 -3
- Partials 10031 10037 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…to refactor/confirmations-button-link
Tertiary Button defaults to medium height and oversized the compact InfoRow nonce value. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 76090b8. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Risk factors:
Performance Test Selection: |
|




Description
Confirmations still used deprecated
ButtonLinkand ad-hoc pressableTextfor link-style actions. Those patterns are being replaced by MMDS:TextButtonfor inline links in copy, andButtonwithButtonVariant.Tertiaryfor standalone background-less CTAs.What changed:
ButtonLink/ pressable-text links withTextButtonin pending-transaction and account-upgrade alerts, staking footer legal links, percentage-row terms link, and Blockaid “Report an issue”Buttonin confirm-alert-modal (“Review all alerts”) and advanced-details nonce controlBlockaidBannerLinkwrappertestIDs for the new MMDS controls and updated unit tests to query bytestIDinstead of copyBreaking change: none for external consumers. Confirmations-internal only;
BlockaidBannerLinkdeleted (only used by Blockaid alert content).Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-994
Manual testing steps
Screenshots/Recordings
N/A — design-system component swap for the same link/CTA affordances; no intended product flow change. Optional visual QA screenshots of staking footer links, confirm-alert “Review all alerts”, and advanced-details nonce can be added if reviewers want before/after.
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Mostly design-system swaps and test harness updates in confirmations UI; the bridge hook change only affects loading-state display of trending tokens, not transaction or auth flows.
Overview
Replaces deprecated ButtonLink and underlined pressable Text link patterns across confirmations with MetaMask Design System controls:
TextButtonfor inline legal/learn-more/report links, and a TertiaryButtonfor the confirm-alert Review all alerts CTA.BlockaidBannerLinkis removed in favor of inlinedTextButton+Linking.openURL.Adds centralized
testIDconstants (footer staking links, confirm-alert modal actions, Blockaid report, percentage-row terms, pending-tx and account-upgrade alerts) and updates unit tests to assert viatestIDand i18nstringswhere appropriate.Separately,
usePostTradeTrendingTokensnow returns an empty token list while Ethereum fallback backfill is loading (when destination results need topping up), so the post-trade trending list does not flash a partial set before the merged list appears.Reviewed by Cursor Bugbot for commit 0d240e9. Bugbot is set up for automated code reviews on this repo. Configure here.