Skip to content

feat: migrate Button (card scope)#27752

Merged
kirillzyusko merged 7 commits into
mainfrom
feat/migrate-button-card-scope
Mar 25, 2026
Merged

feat: migrate Button (card scope)#27752
kirillzyusko merged 7 commits into
mainfrom
feat/migrate-button-card-scope

Conversation

@kirillzyusko

@kirillzyusko kirillzyusko commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Description

Replace deprecated Button usage with DSRN package.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-445

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-03-25.at.14.07.15.mov

After

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-03-25.at.14.08.38.mov

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

Medium Risk
Touches many card/onboarding screens to swap a core UI component; while mostly prop/markup changes, subtle differences in disabled/loading/accessibility behavior could affect user flows and tests.

Overview
Migrates card-related screens/components from the deprecated component-library Button to the design-system @metamask/design-system-react-native Button (e.g., auth, home, cashback, checkout/onboarding, spending limit, message box, and dev options).

Updates callsites to the new API (variant enums, isLoading, isDisabled, isFullWidth, and children-based labels) and adjusts tests/snapshots accordingly (including assertions using toBeDisabled/toBeEnabled and checking accessibilityState.busy).

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

@kirillzyusko kirillzyusko self-assigned this Mar 20, 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.

@kirillzyusko kirillzyusko added the team-card Card Team label Mar 23, 2026
@kirillzyusko kirillzyusko force-pushed the feat/migrate-button-card-scope branch from 45d5661 to bfcfeb7 Compare March 23, 2026 13:40
@github-actions github-actions Bot added size-L and removed size-M labels Mar 23, 2026
@kirillzyusko kirillzyusko force-pushed the feat/migrate-button-card-scope branch from 998b6e9 to 52809c5 Compare March 24, 2026 18:13
@kirillzyusko kirillzyusko force-pushed the feat/migrate-button-card-scope branch from 52809c5 to 66e6d97 Compare March 24, 2026 19:45
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

Copy link
Copy Markdown

@kirillzyusko kirillzyusko marked this pull request as ready for review March 25, 2026 13:12
@kirillzyusko kirillzyusko requested a review from a team as a code owner March 25, 2026 13:12

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

width={ButtonWidthTypes.Full}
disabled={!isSwapEnabledForPriorityToken}
isFullWidth
isDisabled={!isSwapEnabledForPriorityToken}

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.

Redundant opacity styling doubles disabled visual handling

Low Severity

The add funds Button now uses the DSRN isDisabled prop, which automatically applies opacity: 0.5 when disabled. The manually applied 'opacity-50' tailwind class via style={tw.style('w-1/2', !isSwapEnabledForPriorityToken && 'opacity-50')} is now redundant. While React Native style array overrides prevent a visual double-opacity bug, this redundant logic is misleading and could cause confusion if the DSRN Button's disabled opacity behavior ever changes.

Fix in Cursor Fix in Web

@kirillzyusko kirillzyusko enabled auto-merge March 25, 2026 19:33
@kirillzyusko kirillzyusko added this pull request to the merge queue Mar 25, 2026
Merged via the queue into main with commit d4cdad3 Mar 25, 2026
225 of 227 checks passed
@kirillzyusko kirillzyusko deleted the feat/migrate-button-card-scope branch March 25, 2026 19:56
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 25, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 size-L team-card Card Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants