Commit 543e138
authored
feat: migrate WalletCreationError screens to design system (#27613)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
Migrates the WalletCreationError screens (SocialLoginErrorSheet and
SRPErrorScreen) from legacy StyleSheet.create() styling to the MetaMask
design system with Tailwind CSS.
Changes:
* Replaced View with Box from @metamask/design-system-react-native
* Replaced component-library Text with design system Text using
corrected variants (HeadingMd, BodyMd, BodySm) and semantic colors
(PrimaryDefault, TextAlternative, ErrorDefault)
* Replaced component-library Icon with design system Icon using
corrected colors (ErrorDefault, InfoDefault)
* Replaced TextVariant.BodyMDMedium with TextVariant.BodyMd +
FontWeight.Medium
* Replaced useStyles(styleSheet) with useTailwind() and twClassName
props
* Styled SafeAreaView and ScrollView via tw.style() for non-Box
components
Jira: https://consensyssoftware.atlassian.net/browse/TO-599
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry: null
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: Wallet Creation Error Screens
Scenario: user encounters social login wallet creation error
Given the user is on the onboarding flow with metrics enabled
When wallet creation fails during social login
Then the SocialLoginErrorSheet displays with fox logo, error title, description with MetaMask Support link, and a Try again button
And tapping Try again deletes the wallet and resets to onboarding
And tapping MetaMask Support opens the support URL
Scenario: user encounters SRP wallet creation error
Given the user is on the onboarding flow with metrics disabled
When wallet creation fails during SRP import or password setup
Then the SRPErrorScreen displays with error title, info banner with support link, error report details, Copy button, Send error report button, and Try again button
And tapping Copy copies the error report to clipboard and shows "Copied" feedback
And tapping Send error report sends the error to Sentry and navigates back with a toast
And tapping Try again deletes the wallet and resets to onboarding
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<img width="303" height="640" alt="Screenshot 2026-03-18 at 7 22 48 PM"
src="https://github.com/user-attachments/assets/bd4936eb-9125-4c32-a17e-7803b1105c92"
/>
<img width="303" height="640" alt="Screenshot 2026-03-18 at 7 23 22 PM"
src="https://github.com/user-attachments/assets/cfe65237-55fe-4f56-a0fc-facf26a42874"
/>
<!-- [screenshots/recordings] -->
### **After**
<img width="303" height="640" alt="Screenshot 2026-03-18 at 7 17 43 PM"
src="https://github.com/user-attachments/assets/246f8205-9d59-40b1-9c37-0a3bf6f53117"
/>
<img width="303" height="640" alt="Screenshot 2026-03-18 at 7 18 49 PM"
src="https://github.com/user-attachments/assets/1748c481-5de8-4c6d-bbac-592cf493f0b0"
/>
<!-- [screenshots/recordings] -->
## **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**
> Primarily a UI/styling refactor to design-system components and
Tailwind classes, with minimal behavioral change. Risk is limited to
potential layout/visual regressions or minor prop/variant mismatches on
these error screens.
>
> **Overview**
> Migrates the `WalletCreationError` UI (`SRPErrorScreen` and
`SocialLoginErrorSheet`) from legacy `StyleSheet`/`useStyles` and
component-library `Text`/`Icon` to the MetaMask design system (`Box`,
design-system `Text`/`Icon`) with Tailwind-based styling via
`useTailwind()`.
>
> Deletes the dedicated `.styles.ts` files and updates typography/color
usage to design-system variants/semantic tokens (including
`FontWeight.Medium` for the SRP error report header), while keeping
existing analytics, support linking, wallet deletion, and
error-report/copy flows intact.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ececdf9. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 0a62384 commit 543e138
4 files changed
Lines changed: 74 additions & 200 deletions
File tree
- app/components/Views/WalletCreationError
Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 43 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
9 | 22 | | |
10 | 23 | | |
11 | 24 | | |
| |||
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | | - | |
35 | 39 | | |
36 | 40 | | |
37 | | - | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | | - | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
63 | | - | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
| 170 | + | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
| 180 | + | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | | - | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
| 216 | + | |
| 217 | + | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
Lines changed: 0 additions & 57 deletions
This file was deleted.
0 commit comments