chore: upgrade design system packages and add deprecation warnings#26450
Conversation
|
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
dd3c885 to
2f060dd
Compare
| @@ -204,9 +204,9 @@ | |||
| "@metamask/core-backend": "^5.0.0", | |||
| "@metamask/delegation-controller": "^1.0.0", | |||
| "@metamask/delegation-deployments": "^0.15.0", | |||
| "@metamask/design-system-react-native": "^0.5.1", | |||
| "@metamask/design-system-react-native": "^0.7.0", | |||
There was a problem hiding this comment.
Package versions bumped here. The jump from 0.5.1 to 0.7.0 (skipping 0.6.x) brings two breaking changes relevant to this repo: ButtonVariant enum values changed from PascalCase to kebab-case (metamask-design-system#894), and the ButtonBase component tree was flattened (metamask-design-system#870). Both are accounted for in the test updates in this PR.
| * The API may have changed — compare props before migrating. | ||
| * @see {@link https://github.com/MetaMask/metamask-design-system/blob/main/packages/design-system-react-native/src/components/BottomSheetOverlay/README.md} | ||
| * @since @metamask/design-system-react-native@0.7.0 | ||
| */ |
There was a problem hiding this comment.
The @deprecated JSDoc block uses @see with a direct source link (not API docs) and @since to indicate exactly when the MMDS replacement became available. The migration note about comparing props is intentional — the MMDS API is not guaranteed to be a 1:1 match with the component-library version.
| @@ -95,174 +95,90 @@ exports[`CustomSlippageModal confirm button is disabled when shouldDisableConfir | |||
| } | |||
| > | |||
| <View | |||
There was a problem hiding this comment.
The large volume of snapshot changes across 53 test suites (~10,000 lines net removed) is expected and caused solely by the ButtonBase refactor in MMDS v0.7.0. The old ButtonBase rendered three layers: an outer wrapper View (transform only), an inner View (styles), and an always-invisible spinner View rendered unconditionally for every button. The new ButtonBase collapses this into a single View with all styles applied directly, eliminating the redundant nesting and the hidden spinner. No behavioral change — purely structural.
| @@ -601,7 +601,7 @@ describe('OnboardingIntroStep', () => { | |||
| confirmAction: { | |||
| label: 'mocked_rewards.onboarding.not_supported_confirm_go_back', | |||
| onPress: expect.any(Function), | |||
| variant: 'Primary', | |||
| variant: 'primary', | |||
There was a problem hiding this comment.
These assertions changed from 'Primary' to 'primary' because ButtonVariant enum runtime values were standardized to kebab-case in MMDS v0.7.0 (metamask-design-system#894). The source code uses ButtonVariant.Primary (the enum constant, unchanged) so production behavior is unaffected — only tests that hardcoded the old raw string value needed updating.
577c834 to
f5ffc6e
Compare
b6cd466 to
a5d39a7
Compare
a2d3b7d to
513aa63
Compare
## **Description** Adds the `corporate-fare` SVG icon to the Icon component library. This icon is needed to unblock the Stocks feature while we wait for the design system libraries upgrade in #26450. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: N/A Related: #26450 ## **Manual testing steps** ```gherkin Feature: Corporate Fare Icon Scenario: Icon renders correctly Given the app is running When a component references the corporate-fare icon Then the icon should render as a building/corporate symbol ``` ## **Screenshots/Recordings** ### **Before** N/A - new icon asset ### **After** N/A - SVG asset only, no UI change ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Adds a new static SVG and enum entry with no behavioral changes beyond making an additional icon available. > > **Overview** > Adds a new `corporate-fare.svg` asset and exposes it through the Icon component library by extending `IconName` with `CorporateFare` and registering the asset in `Icon.assets.ts`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c78eb70. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
## **Description** Adds the `corporate-fare` SVG icon to the Icon component library. This icon is needed to unblock the Stocks feature while we wait for the design system libraries upgrade in #26450. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: N/A Related: #26450 ## **Manual testing steps** ```gherkin Feature: Corporate Fare Icon Scenario: Icon renders correctly Given the app is running When a component references the corporate-fare icon Then the icon should render as a building/corporate symbol ``` ## **Screenshots/Recordings** ### **Before** N/A - new icon asset ### **After** N/A - SVG asset only, no UI change ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Adds a new static SVG and enum entry with no behavioral changes beyond making an additional icon available. > > **Overview** > Adds a new `corporate-fare.svg` asset and exposes it through the Icon component library by extending `IconName` with `CorporateFare` and registering the asset in `Icon.assets.ts`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit c78eb70. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
513aa63 to
f7f82ae
Compare
3d51e8d
f7f82ae to
3d51e8d
Compare
| */ | ||
|
|
There was a problem hiding this comment.
Blank line disconnects JSDoc deprecation from enum declaration
Medium Severity
A blank line on line 9 between the closing */ of the JSDoc block and the export enum AnimationDuration declaration disconnects them. TypeScript and IDEs associate JSDoc comments with the immediately following declaration only when there is no blank line separating them. This means the @deprecated tag won't produce strikethrough or deprecation warnings when AnimationDuration is used. Every other deprecation comment in this PR correctly has no blank line between */ and the declaration.
There was a problem hiding this comment.
will update in a separate PR
0f2526b
3d51e8d to
0f2526b
Compare
…ations Bump @metamask/design-system-react-native from 0.5.1 to 0.7.0 and @metamask/design-tokens from 8.1.1 to 8.2.0. Add @deprecated JSDoc annotations to eight component-library components that now have official MMDS replacements: BottomSheetOverlay, BottomSheetFooter, Card, Label, Input, HeaderBase, Skeleton, and Toast. Mark the local AnimationDuration enum as deprecated in favor of the version exported from @metamask/design-tokens.
0f2526b to
756a9ca
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The deprecated components are foundational and used across the entire app:
Since these are primarily deprecation notices (no functional changes) and snapshot updates, the risk is medium. However, given the wide usage of these components, I'm selecting a broad set of E2E tags to verify core user flows still work:
I'm not selecting all tags because the changes are primarily documentation/deprecation notices without functional changes. Performance Test Selection: |




Description
Upgrades the MetaMask Design System packages to their latest releases and adds deprecation warnings to the local
@app/component-librarycomponents that now have official MMDS replacements.Package upgrades:
@metamask/design-system-react-native:^0.5.1→^0.7.0@metamask/design-tokens:^8.1.1→^8.2.0@metamask/design-system-twrnc-preset: unchanged (already at latest^0.3.0)New MMDS components in v0.7.0:
Label,HeaderBase,Skeleton,Card,BottomSheetFooter,Toast,Input,BottomSheetOverlayDeprecation warnings added to component-library:
BottomSheetOverlay→ use@metamask/design-system-react-nativeBottomSheetFooter→ use@metamask/design-system-react-nativeCard→ use@metamask/design-system-react-nativeLabel→ use@metamask/design-system-react-nativeInput(TextField foundation) → use@metamask/design-system-react-nativeHeaderBase→ use@metamask/design-system-react-nativeSkeleton→ use@metamask/design-system-react-nativeToast→ use@metamask/design-system-react-nativeAnimationDuration(animation.constants.ts) → use@metamask/design-tokensNotable breaking change in v0.7.0: Enum runtime values changed from PascalCase to kebab-case (e.g.
ButtonVariant.Primarynow outputs'primary'instead of'Primary'). This only affects code that persists/compares raw enum string values — no production code in this repo is affected. Test files with hardcoded mock enum strings may surface failures and can be updated incrementally.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
After
General smoke test for the
ButtonBaseupdatesiOS
upgrade.ios.after.mov
Android
recording.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Mostly documentation and dependency upgrades, but the design-system bump can subtly change UI behavior/props and cause downstream test or styling regressions.
Overview
Upgrades MetaMask Design System dependencies (notably
@metamask/design-system-react-nativeto^0.7.0and@metamask/design-tokensto^8.2.0) and refreshes affected Jest snapshots to match updated rendered output/props for several button and navigation-related components.Adds explicit JSDoc
@deprecatednotices (with migration links and version tags) across multiple legacy@app/component-librarycomponents (BottomSheetOverlay,BottomSheetFooter,Card,Label,TextFieldInput,HeaderBase,Skeleton,Toast) and marks the localAnimationDurationenum as deprecated in favor of@metamask/design-tokens.Written by Cursor Bugbot for commit 756a9ca. This will update automatically on new commits. Configure here.