refactor(confirmations): migrate Text to MMDS design system - #34229
refactor(confirmations): migrate Text to MMDS design system#34229brianacnguyen wants to merge 19 commits into
Conversation
Replace component-library Text with @metamask/design-system-react-native across confirmations-owned files, updating TextVariant/TextColor mappings and FontWeight splits. 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
|
Use MMDS TextVariant/TextColor after the confirmations Text migration, and keep post-trade suggestions empty until destination and fallback fetches finish. Co-authored-by: Cursor <cursoragent@cursor.com>
Use real MMDS components and existing testID/child-prop APIs instead of local design-system mocks. Co-authored-by: Cursor <cursoragent@cursor.com>
…to refactor/confirmations-text
…Mask/metamask-mobile into refactor/confirmations-text
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 a4ce944. Configure here.
MMDS TextColor tokens were passed to component-library Icon after the Text migration, so severity colors no longer resolved. Co-authored-by: Cursor <cursoragent@cursor.com>
…to refactor/confirmations-text
…to refactor/confirmations-text
…to refactor/confirmations-text
Merge duplicate @metamask/design-system-react-native imports so yarn lint passes. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #34229 +/- ##
=======================================
Coverage 85.12% 85.13%
=======================================
Files 6350 6352 +2
Lines 173080 173090 +10
Branches 42804 42806 +2
=======================================
+ Hits 147333 147354 +21
+ Misses 15708 15701 -7
+ Partials 10039 10035 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Affected flows requiring E2E validation:
Dependency tags added per tag descriptions:
Not selected: SmokeAccounts, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeMultiChainAPI, SmokeBrowser, SmokeSnaps, SmokeMMConnect, SmokeSeedlessOnboarding — these areas are not touched by this PR's changes. Performance Test Selection: |
|




Description
Confirmations still used the deprecated component-library
TextAPI (TextVariant.BodyMD, weight baked into variant names,TextColor.Alternative, etc.). This PR migrates confirmations-owned UI to@metamask/design-system-react-nativeso confirmations stay aligned with the MMDS Text contract.What changed (94 files):
Textimports with MMDSTextBodyMD→BodyMd,HeadingLG→HeadingLg, etc.)fontWeight(BodyMDMedium→BodyMd+FontWeight.Medium)Alternative→TextAlternative,Error→ErrorDefault, etc.)Out of scope (separate PRs for extra CODEOWNERS):
external/staking/**(confirmations + earn)TemplateRenderer(confirmations + core-platform)Intentionally kept on component-library
TextVariant:ButtonLink.labelTextVariantinconfirm-alert-modalTagColored.labelProps.variantingas-fee-details-row(those CL components still expect CL enum values)
Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-981
Manual testing steps
Screenshots/Recordings
N/A — intended visual parity migration (typography/color mapping only). Spot-check screenshots welcome if reviewers want them.
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
Medium Risk
Wide, user-facing confirmation/send/activity typography changes with enum remapping; regressions would be visual or subtle prop mismatches rather than logic changes, aside from the post-trade loading behavior tweak.
Overview
Moves confirmations-related UI (plus
AmountPilland legacyAddressElement) off the component-libraryTextAPI onto@metamask/design-system-react-native, using MMDS variant names (BodyMd,HeadingLg, etc.),TextColor.*Default/TextAlternative, andfontWeightwhere weight used to be baked into variants likeBodyMDMedium.Inline alerts now drive icon colors via
IconColorinstead of text color enums; a few spots still pass legacyTextVariantinto component-libraryButtonLink/TagColored.Tests add
useTailwindmocks and stricter inline-alert icon color checks.usePostTradeTrendingTokensreturns an empty token list while queries are loading so the post-trade sheet does not briefly show a partial list.Reviewed by Cursor Bugbot for commit 9f9af45. Bugbot is set up for automated code reviews on this repo. Configure here.