Skip to content

Commit 0a62384

Browse files
refactor(AccountBackupStep1): migrate to design system components (#27580)
## **Description** Migrate the `AccountBackupStep1` component from legacy styling patterns to the design system: - Replace `View` with `Box` and `StyleSheet.create()` with `twClassName` Tailwind utilities - Replace component-library `Button` and `Text` with `@metamask/design-system-react-native` equivalents - Remove redundant default props (`flexDirection Column`, `justifyContent FlexStart`) - Clean up unused imports (`PropTypes`, `fontStyles`, `scaling`, `StorageWrapper`) This is a pure refactor with no behavioral changes — functional logic, navigation, and analytics are untouched. ## **Changelog** CHANGELOG entry: null ## **Related issues** N/A ## **Manual testing steps** ```gherkin Feature: AccountBackupStep1 screen Scenario: View secure wallet prompt after wallet creation Given the user has just created a new wallet When the user reaches the "Secure your wallet" screen Then they see the SRP illustration, explanation text, and two buttons Scenario: Proceed to manual backup Given the user is on the "Secure your wallet" screen When the user taps "Start" Then they navigate to ManualBackupStep1 Scenario: Skip backup for later Given the user has no funds and is on the "Secure your wallet" screen When the user taps "Remind me later" Then the skip confirmation modal appears Scenario: Theme switching Given the user is on the "Secure your wallet" screen When the device is in dark mode Then the dark SRP illustration is displayed ``` ## **Screenshots/Recordings** | | Before | After | |-----------|--------|-------| | **Light** | <img src="https://github.com/user-attachments/assets/5f5d1695-387b-4827-94bd-f6f915aa250e" width="300"/> | <img width="300" height="2622" alt="Simulator Screenshot - iPhone 17 - 2026-03-19 at 15 55 40" src="https://github.com/user-attachments/assets/22d25352-4159-41fd-b4d6-9ec0fa515e2b" /> | | **Dark** | <img src="https://github.com/user-attachments/assets/932503c1-fab4-4068-bb36-839a1c5c65cc" width="300"/> | <img width="300" height="2622" alt="Simulator Screenshot - iPhone 17 - 2026-03-19 at 15 55 48" src="https://github.com/user-attachments/assets/0e1bbd50-19b0-433b-bdc5-dee42fe90f1f" /> | ## **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** > Low risk refactor limited to the `AccountBackupStep1` UI layer, but it could cause minor layout/spacing regressions due to the styling and component swap. > > **Overview** > Migrates `AccountBackupStep1` from legacy `StyleSheet`/`View` and component-library `Button`/`Text` to the MetaMask design system (`Box`, `Button`, `Text`) with Tailwind (`useTailwind`) styling. > > Keeps the existing navigation/metrics/back-handler flows, while updating padding/spacing rules and refreshing Jest snapshots to match the new rendered component tree and style output. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2ba0f3d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 43e2312 commit 0a62384

2 files changed

Lines changed: 1318 additions & 703 deletions

File tree

0 commit comments

Comments
 (0)