Skip to content

chore: upgrade MMDS to v56.0.0 - #33788

Merged
brianacnguyen merged 5 commits into
mainfrom
chore/upgrade-design-system-v56.0.0
Jul 25, 2026
Merged

chore: upgrade MMDS to v56.0.0#33788
brianacnguyen merged 5 commits into
mainfrom
chore/upgrade-design-system-v56.0.0

Conversation

@brianacnguyen

@brianacnguyen brianacnguyen commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Upgrades design system packages to align with the v56.0.0 release.

Packages upgraded:

  • @metamask/design-system-react-native: ^0.37.0^0.38.0
  • @metamask/design-system-shared (transitive): ^0.30.0^0.31.0

Unchanged in this release:

  • @metamask/design-system-twrnc-preset: ^0.8.0
  • @metamask/design-tokens: ^8.7.0

Breaking changes addressed:

  • KeyValueRow: Now defaults to px-4 (16px) horizontal padding so rows align with other full-width list surfaces without a parent padding wrapper. Call sites that already padded the parent would double-pad.
    • Removed redundant parent horizontal padding so KeyValueRow owns the 16px inset
    • Kept sibling non-row content visually at 16px (buttons, custom margin rows, description text, Pro form controls, order book right inset)
    • Touched surfaces: Perps Order View, Close Position, Close All, Close Summary, Position Card, Market Balance Actions, Pro Order Form / Pro Market Layout

Other breaking changes (no code changes needed)

  • None beyond KeyValueRow default padding for this bump (0.37.0 → 0.38.0). Toast bottomOffsettopOffset landed in 0.37.0 and was already consumed upstream of this branch.

New additions available for future use:

  • KeyValueSelect for pressable key/value rows with a non-interactive SelectButton value
  • HelpText with optional HelpTextSeverity and showIcon (leading IconAlert when severity is set)
  • isHidden / length support on string slots for Content, ListItem, TitleHub, and KeyValueRow via SensitiveText

Upstream fixes included in this release:

  • BannerBase spacing updates (inherited by BannerAlert / Toast)
  • Slider: Fixed thumb rewind on rapid taps and fast pans
  • Content: Fixed description stretching the end accessory when the description wraps

Legacy component deprecations:

  • No new deprecations added — all matching legacy components in app/component-library/ already have @deprecated JSDoc notices from prior upgrades

Changelog

CHANGELOG entry: Upgrades design system libraries to v56.0.0 and migrates Perps KeyValueRow call sites off parent horizontal padding

Related issues

Fixes: N/A

Manual testing steps

Feature: Design system upgrade to v56.0.0

Scenario: Core app functionality is unaffected
Given I am on the main app screen
When I navigate through the primary user flows
Then the UI renders correctly with no visual regressions

Scenario: Perps home balance card KeyValueRow padding
Given I open the Perps tab with a funded account
When a deposit/withdraw is in progress (optional) or I view Withdraw / Add funds actions
Then status/detail rows sit ~16px from the relevant edge with no double inset

Scenario: Perps position details KeyValueRows
Given I open a market where I have an open position
When I view the position details section (Direction / Entry / Liquidation / Funding)
Then KeyValueRows align with the Details section header (~16px inset)

Scenario: Perps order form (Long/Short)
Given I open Long or Short on a market
When I view the input card (Leverage / TP-SL / Limit / Pay with) and bottom summary rows
Then content is ~16px inside the card / from screen edge and aligns with sibling rows

Scenario: Close position summary and footer
Given I open Close position on an open position
When I view the footer summary and confirm button (and tap amount to open the keypad)
Then Margin / Fees / You receive / Points align at ~16px; confirm button remains inset ~16px

Scenario: Close all positions sheet
Given I have 2+ open positions
When I open Close all from Perps home
Then description text and summary rows share ~16px left inset; footer buttons look normal

Scenario: Pro mode order form / layout (requires perpsProModeEnabled)
Given Pro mode is enabled via Feature Flag Override
When I switch to Pro and view the order form + order book
Then form controls and OrderSummary are ~16px from the left; book keeps ~16px from the right; collapsing the book keeps expand control and full-width form inset correctly

Screenshots/Recordings

Before

After

Previous KeyValueRow still functional

Simulator Screenshot - iPhone 15 Pro Max - 2026-07-24 at 07 49 45 Simulator Screenshot - iPhone 15 Pro Max - 2026-07-24 at 07 50 21 Simulator Screenshot - iPhone 15 Pro Max - 2026-07-24 at 07 51 05 Simulator Screenshot - iPhone 15 Pro Max - 2026-07-24 at 07 51 20

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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

Low Risk
Layout-only migration for a design-system default change in Perps UI; no trading, auth, or data-path changes.

Overview
Upgrades @metamask/design-system-react-native from ^0.37.0 to ^0.38.0 (design system v56.0.0), with a transitive bump to @metamask/design-system-shared ^0.31.0.

The main behavioral change addressed is KeyValueRow now applying ~16px (px-4) horizontal padding by default. Perps screens that used to pad the parent are updated so rows are not inset twice: redundant paddingHorizontal on wrappers and input groups is removed, while non-row siblings (descriptions, loading states, confirm buttons, custom margin rows, Pro form controls) keep explicit ~16px inset where needed.

PerpsCloseSummary drops the isInputFocused prop and the conditional extra padding; row padding moves onto summary rows and SectionDivider uses mx-4. PerpsClosePositionView no longer passes isInputFocused and wraps the footer confirm button in footerButton for horizontal inset.

Touches include close-all/close-position flows, order view styles, position card details, market balance transaction rows, and Pro market layout (form px-4, order book pr-4). Related unit test mocks and an isInputFocused test are removed.

Reviewed by Cursor Bugbot for commit 5eb4a03. Bugbot is set up for automated code reviews on this repo. Configure here.

@brianacnguyen brianacnguyen self-assigned this Jul 24, 2026
@brianacnguyen
brianacnguyen requested a review from a team as a code owner July 24, 2026 15:07
@brianacnguyen brianacnguyen added the team-design-system All issues relating to design system in Mobile label Jul 24, 2026
@github-actions

Copy link
Copy Markdown
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.

@github-actions github-actions Bot added pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-L risk:low AI analysis: low risk labels Jul 24, 2026
@socket-security

socket-security Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​metamask/​design-system-react-native@​0.37.0 ⏵ 0.38.098 +110084 +1100 +1100

View full report

@brianacnguyen brianacnguyen removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jul 24, 2026

@geositta geositta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a visual regression in the close summary I commented on.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added risk:medium AI analysis: medium risk and removed risk:low AI analysis: low risk labels Jul 24, 2026
@brianacnguyen
brianacnguyen enabled auto-merge July 24, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: @PerformancePreps
  • Risk Level: medium
  • AI Confidence: 88%
click to see 🤖 AI reasoning details

E2E Test Selection:
All changed files are in the Perps UI feature area (app/components/UI/Perps/) with layout/styling refactoring changes:

  1. PerpsCloseAllPositionsView: Restructured Box/padding hierarchy for the close all positions modal
  2. PerpsClosePositionView: Removed isInputFocused prop, wrapped confirm button in footerButton View, style adjustments
  3. PerpsOrderView.styles: Moved paddingHorizontal from container to individual rows
  4. PerpsProMarketLayout: Removed px-4 from outer Box, added to inner elements
  5. PerpsProOrderForm: Wrapped form elements in px-4 Box for consistent padding
  6. PerpsCloseSummary: Removed isInputFocused prop/style, moved paddingHorizontal to summaryRow
  7. PerpsMarketBalanceActions: Removed wrapping Box with px-4 from KeyValueRow
  8. PerpsPositionCard: Removed px-4 from details section Box
  9. package.json: @metamask/design-system-react-native bumped from ^0.37.0 to ^0.38.0

SmokePerps is selected as the primary tag since all changes are in Perps UI components.
Per SmokePerps tag description: 'When selecting SmokePerps, also select SmokeWalletPlatform (Trending section) and SmokeConfirmations (Add Funds deposits are on-chain transactions).'
The design system version bump is minor and unlikely to break functionality, but the Perps UI changes warrant validation of the full Perps flow including confirmations.

Performance Test Selection:
The Perps UI components changed include the order form, position card, close position views, and market balance actions - all of which are part of the perps market loading and position management flows measured by @PerformancePreps. The layout restructuring (padding/Box hierarchy changes) could affect render performance of these components.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@brianacnguyen
brianacnguyen added this pull request to the merge queue Jul 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚡ Performance Test Results

ℹ️ Performance test results are currently non-blocking and will not block this PR.

1 test failed · 2 tests · 1 device

📱 Devices tested (1)

Android: Google Pixel 8 Pro (v14.0)

❌ Failed Tests (1)

@mm-perps-engineering-team

Test Platform Device Reason Recording
Perps open position and close it Android Google Pixel 8 Pro (v14.0) Test error 📹 Watch
✅ Passed Tests (1)
Test Platform Device Duration Team Recording
Perps add funds Android Google Pixel 8 Pro (v14.0) 8.26s @mm-perps-engineering-team 📹 Watch

Branch: chore/upgrade-design-system-v56.0.0 · Build: Normal · Commit: 18377ff · View full run

Merged via the queue into main with commit 45c01ab Jul 25, 2026
201 of 203 checks passed
@brianacnguyen
brianacnguyen deleted the chore/upgrade-design-system-v56.0.0 branch July 25, 2026 00:05
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 25, 2026
@metamask-ci metamask-ci Bot added the release-8.6.0 Issue or pull request that will be included in release 8.6.0 label Jul 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-8.6.0 Issue or pull request that will be included in release 8.6.0 risk:medium AI analysis: medium risk size-L team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants