Commit d4a78c6
authored
refactor(AccountBackupStep1B): migrate to design system components (#27581)
## **Description**
Migrates `AccountBackupStep1B` from legacy React Native primitives to
the MetaMask design system. Replaces raw `View` components with `Box`,
removes `StyleSheet.create()` in favor of `twClassName` Tailwind
utilities, and adds the `useTailwind` hook. Also fixes a precommit
violation by replacing the static `Dimensions.get('window')`
module-level call with the `useWindowDimensions()` hook (so layout
responds to rotation/resize), removes redundant
`BoxFlexDirection.Column` props, and replaces all arbitrary Tailwind
bracket values (e.g. `text-[32px]`, `leading-[17px]`) with design system
scale steps.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: Account Backup Step 1B screen
Scenario: Visual parity after design system migration
Given the user has created a new wallet and reached the backup prompt
When the AccountBackupStep1B screen is displayed
Then the layout, typography, and spacing appear identical to the pre-migration design
And the "Why is this important?" info button is tappable and opens the modal
And the modal close button dismisses the modal
And the "Start" CTA navigates to ManualBackupStep1
And the SRP explanation link opens the SRP info sheet
Scenario: Responsive layout on device rotation
Given the user is on the AccountBackupStep1B screen
When the device is rotated to landscape
Then the seed phrase illustration resizes correctly without layout overflow
```
## **Screenshots/Recordings**
| | Before | After |
|-------------|--------|-------|
| **Light** | <img
src="https://github.com/user-attachments/assets/d9dd926a-5e4f-4673-b975-ff658ee771d4"
width="300"/> | <img
src="https://github.com/user-attachments/assets/742d3e28-5fd8-4a68-b51f-09e7f22699d0"
width="300"/> |
| **Dark** | <img
src="https://github.com/user-attachments/assets/2fcd0028-6a67-413c-8cd1-75bab51afac4"
width="300"/> | <img
src="https://github.com/user-attachments/assets/123fa568-aa2f-434c-908d-92ed6b39464a"
width="300"/> |
## **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 a single onboarding screen, primarily
swapping UI primitives/styling; main risk is visual or interaction
regressions (modal/CTA/link) across device sizes/rotation.
>
> **Overview**
> Migrates `AccountBackupStep1B` to the MetaMask React Native design
system by replacing legacy `View`/`StyleSheet`/custom button usage with
`Box`, design-system `Text`, `Button`, `Icon`, and Tailwind
(`useTailwind`) styling.
>
> Updates the seed phrase illustration sizing to use
`useWindowDimensions()` (instead of a module-level `Dimensions`
constant) so layout recalculates on resize/rotation, and refactors
repeated body/bullet copy into small helper components (`BodyXsText`,
`BulletText`) while keeping navigation and metrics wiring intact.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
5324d96. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent fc85dc0 commit d4a78c6
1 file changed
Lines changed: 177 additions & 263 deletions
0 commit comments