Skip to content

chore: upgrade design system packages @metamask/design-tokens@8.2.1#26639

Merged
georgewrmarshall merged 2 commits intomainfrom
upgrade-design-tokens-v8.2.1
Mar 2, 2026
Merged

chore: upgrade design system packages @metamask/design-tokens@8.2.1#26639
georgewrmarshall merged 2 commits intomainfrom
upgrade-design-tokens-v8.2.1

Conversation

@georgewrmarshall
Copy link
Copy Markdown
Contributor

@georgewrmarshall georgewrmarshall commented Feb 26, 2026

Description

Upgrades design system packages to their latest versions:

  • @metamask/design-system-react-native: ^0.7.0^0.8.0
    • Added RadioButton component for radio button form controls
    • BadgeStatus migrated from TypeScript enums to string union types with const objects (no migration required)
    • Refactored BottomSheetFooter component location for better organization
  • @metamask/design-tokens: ^8.2.0^8.2.1
    • Updated neutral grey palette (grey050-grey1000) for consistent elevations and interactions across themes
  • @metamask/design-system-shared: ^0.1.3^0.2.0 (transitive dependency)
    • Added centralized BadgeStatus types and constants

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: design system package upgrade

  Scenario: user views the app after upgrading design system packages
    Given the app is running on the latest build

    When user navigates through the main screens
    Then the UI renders correctly with no visual regressions

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.

Note

Low Risk
Changes are limited to Jest snapshot updates reflecting new design-token color values; no functional logic changes are present. Main risk is unintended visual regressions if the updated palette reduces contrast in some states.

Overview
Updates a large set of Jest snapshots across the component library and a few app components to reflect new design-token color values (notably neutral text, border, background, and interaction-state colors).

Most snapshot diffs are palette shifts such as #121314#131416, #686e7d#66676a, #b7bbc8#949596, #f3f5f9#f3f3f4, plus updated translucent separators/pressed backgrounds and a changed modal overlay color in ApprovalModal.

Written by Cursor Bugbot for commit 610c6ed. This will update automatically on new commits. Configure here.

@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.

@metamaskbot metamaskbot added the team-design-system All issues relating to design system in Mobile label Feb 26, 2026
@georgewrmarshall georgewrmarshall self-assigned this Feb 26, 2026
@georgewrmarshall georgewrmarshall requested a review from a team February 26, 2026 17:20
@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 26, 2026

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-tokens@​8.2.0 ⏵ 8.2.110010010095 +2100

View full report

@georgewrmarshall georgewrmarshall force-pushed the upgrade-design-tokens-v8.2.1 branch from e4067f1 to 1e82eba Compare February 26, 2026 17:40
@georgewrmarshall georgewrmarshall changed the title chore: upgrade design system packages (@metamask/design-system-react-native@0.8.0, @metamask/design-tokens@8.2.1) chore: upgrade design system packages @metamask/design-tokens@8.2.1 Feb 26, 2026
@github-actions github-actions bot added size-S and removed size-XS labels Feb 26, 2026
@georgewrmarshall georgewrmarshall force-pushed the upgrade-design-tokens-v8.2.1 branch from 277e8f7 to bbb662c Compare February 26, 2026 19:37
@georgewrmarshall georgewrmarshall force-pushed the upgrade-design-tokens-v8.2.1 branch from bbb662c to eb9297e Compare February 26, 2026 20:03
georgewrmarshall added a commit that referenced this pull request Feb 26, 2026
Replace hardcoded hex color values with design token references in test
files to make tests resilient to future design token upgrades.

This unblocks PR #26639 (design token upgrade to v8.2.1) by ensuring
tests assert the correct design token is used rather than specific hex
values that change between token versions.

Updated test files:
- app/components/Snaps/SnapUIRenderer/components/input.test.ts
- app/components/UI/Bridge/components/TransactionDetails/BridgeStepDescription.test.tsx
- app/components/UI/Card/components/Onboarding/VerifyIdentity.test.tsx
- app/components/UI/Earn/Views/EarnLendingWithdrawalConfirmationView/EarnLendingWithdrawalConfirmationView.test.tsx
- app/components/UI/Rewards/hooks/useRewardsToast.test.tsx
- app/components/Views/confirmations/components/UI/info-row-divider/info-row-divider.test.tsx

Approach:
- Import lightTheme from @metamask/design-tokens
- Replace hex values with lightTheme.colors.* references
- Update theme mocks to use jest.requireActual('@metamask/design-tokens')
- Update snapshots to reflect new token values
github-merge-queue bot pushed a commit that referenced this pull request Feb 27, 2026
#26657)

## **Description**

This PR updates test files to use design token references instead of
hardcoded hex values, unblocking the design tokens upgrade to v8.2.1
(#26639).

**What this PR does:**
- Replaces hardcoded color hex values with `mockTheme.colors.*`
references in test assertions
- Uses `brandColor.*` for static, non-theme-dependent colors (camera
overlay)
- Updates snapshots to reflect new design token values
- Fixes template interpolation in inline snapshots

**Why this is an improvement:**
- Makes tests resilient to design token value changes
- Ensures tests validate correct token usage rather than specific hex
values
- Aligns with design system best practices

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Dependency of: #26639
Related: #26651

## **Manual testing steps**

```gherkin
Scenario: Verify all updated tests pass
  Given the repository with design tokens v8.2.1
  When I run the following test files:
    | Test File |
    | app/components/Snaps/SnapUIRenderer/components/input.test.ts |
    | app/components/UI/Bridge/components/TransactionDetails/BridgeStepDescription.test.tsx |
    | app/components/UI/Card/components/Onboarding/VerifyIdentity.test.tsx |
    | app/components/UI/Earn/Views/EarnLendingWithdrawalConfirmationView/EarnLendingWithdrawalConfirmationView.test.tsx |
    | app/components/UI/Rewards/hooks/useRewardsToast.test.tsx |
    | app/components/Views/confirmations/components/UI/info-row-divider/info-row-divider.test.tsx |
  Then all tests should pass
  And snapshots should match expected values
```

## **Screenshots/Recordings**

N/A - Test-only changes

## **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/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.
- [x] I've properly set the pull request status:
  - [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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**
> Test-only changes that update assertions to reference theme tokens,
reducing brittleness during design-token updates. Low risk aside from
potential snapshot/assertion adjustments if token mappings differ.
> 
> **Overview**
> Updates several UI/unit tests to assert against theme design tokens
(via `mockTheme.colors.*`) instead of hardcoded hex values, including
Snap UI input borders, Bridge step text colors, Earn navbar background,
and Rewards toast icon colors.
> 
> Adjusts tests that relied on inline snapshots/mocked theme shapes by
switching to token-backed assertions (and using `brandColors` for static
camera overlay colors in Veriff branding) to keep tests resilient to
design-token value changes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
04dc67e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@georgewrmarshall georgewrmarshall force-pushed the upgrade-design-tokens-v8.2.1 branch 3 times, most recently from 6e4ad60 to ca5ff31 Compare February 27, 2026 22:52
);
expect(getBackgroundColor(mockTheme, true, true)).toEqual(
mockTheme.colors.error.default,
);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved to a separate PR to remove code owner friction and this PR becoming stale due to snapshot sensitivity

@georgewrmarshall georgewrmarshall marked this pull request as ready for review February 28, 2026 00:14
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner February 28, 2026 00:14
brianacnguyen
brianacnguyen previously approved these changes Feb 28, 2026
github-merge-queue bot pushed a commit that referenced this pull request Mar 2, 2026
…d assertions (#26710)

## **Description**

Updates `amount-keyboard.test.tsx` to use `mockTheme` design token
references instead of hardcoded hex values in test assertions,
unblocking the design tokens upgrade to v8.2.1 (#26639).

**What this PR does:**
- Replaces hardcoded color hex values (`#b7bbc8`, `#121314`, `#ca3542`)
with `mockTheme.colors.*` references in test assertions for
`getBackgroundColor` and the disabled Next button

**Why this is an improvement:**
- Makes tests resilient to design token value changes
- Ensures tests validate correct token usage rather than specific hex
values
- Aligns with design system best practices
- Follows the same pattern established in #26657

## **Changelog**

CHANGELOG entry: null

## **Related issues**

Dependency of: #26639
Related: #26657

## **Manual testing steps**

```gherkin
Scenario: Verify updated tests pass
  Given the repository with design tokens v8.2.1
  When I run app/components/Views/confirmations/components/send/amount/amount-keyboard/amount-keyboard.test.tsx
  Then all 6 tests should pass
```

## **Screenshots/Recordings**

N/A - Test-only changes

## **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**
> Test-only updates that swap fixed hex assertions for `mockTheme` token
references, reducing brittleness during design token upgrades. No
production logic changes; risk limited to potential mismatches with
token names/structure.
> 
> **Overview**
> Updates `amount-keyboard.test.tsx` to stop asserting on hardcoded hex
colors for the disabled Next/Continue button and `getBackgroundColor`
output.
> 
> Assertions now reference `mockTheme.colors.text.*` and
`mockTheme.colors.error.*`, making the tests resilient to design token
value changes while still verifying the correct token is used.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
95e250e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@georgewrmarshall georgewrmarshall force-pushed the upgrade-design-tokens-v8.2.1 branch from 3170193 to 2666ac0 Compare March 2, 2026 17:54
@github-actions github-actions bot added size-XS and removed size-S labels Mar 2, 2026
@georgewrmarshall georgewrmarshall removed the request for review from a team March 2, 2026 18:21
@georgewrmarshall georgewrmarshall force-pushed the upgrade-design-tokens-v8.2.1 branch 2 times, most recently from 5ade5c2 to 1ac4c05 Compare March 2, 2026 18:39
@georgewrmarshall georgewrmarshall force-pushed the upgrade-design-tokens-v8.2.1 branch from 1ac4c05 to 610c6ed Compare March 2, 2026 18:40
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 2, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR contains exclusively Jest snapshot test file updates (100 files, all in snapshots directories). These are test artifacts that capture the rendered output of React components for unit testing purposes. No actual source code, components, controllers, or business logic has been modified.

Snapshot files are regenerated when:

  1. Component rendering output changes (due to styling, structure, or dependency updates)
  2. Test infrastructure changes
  3. Manual snapshot updates to sync with current component state

Since these changes:

  • Don't modify any runtime application code
  • Don't change any user-facing functionality
  • Are purely test infrastructure maintenance
  • Don't affect E2E test execution (E2E tests run against the actual app, not unit test snapshots)

No E2E tests are required. The snapshot updates themselves will be validated by the unit test suite (Jest) which will verify the snapshots match the current component output.

Performance Test Selection:
This PR only contains Jest snapshot test file updates. No actual application code, components, or rendering logic has been changed. Snapshot files are test artifacts used by Jest for unit testing and do not affect runtime performance. Since no source code that could impact app performance has been modified, no performance tests are needed.

View GitHub Actions results

@georgewrmarshall georgewrmarshall added this pull request to the merge queue Mar 2, 2026
Merged via the queue into main with commit 114b3d1 Mar 2, 2026
59 checks passed
@georgewrmarshall georgewrmarshall deleted the upgrade-design-tokens-v8.2.1 branch March 2, 2026 19:33
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2026
@metamaskbot metamaskbot added the release-7.69.0 Issue or pull request that will be included in release 7.69.0 label Mar 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.69.0 Issue or pull request that will be included in release 7.69.0 size-XS team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants