Commit 208c27b
authored
feat: migrate
<!--
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**
<!--
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?
-->
Migrated `ListItem` component as part of pilot migration.
## **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: https://consensyssoftware.atlassian.net/browse/DSYS-280
## **Manual testing steps**
```gherkin
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**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
https://github.com/user-attachments/assets/afc628d9-29a8-458f-a524-48ac0f90b651
### **After**
https://github.com/user-attachments/assets/865bbc0a-6a2c-4cf8-82fa-fe6d7cc61101
## **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.
#### Performance checks (if applicable)
- [ ] I've tested on Android
- Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example
For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).
## **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**
> UI-only component migration with snapshot updates; main risk is minor
layout/spacing/accessibility regressions in the settings drawer rows.
>
> **Overview**
> Migrates `SettingsDrawer` from legacy list components
(`ListItemColumn`/`WidthType`) to `@metamask/design-system-react-native`
primitives (`ListItem` + `Box`) while preserving the same content
structure (title/description/warning and optional arrow).
>
> Updates the `DefaultSettings` onboarding success Jest snapshot to
reflect the new rendered tree/styles from the DSRN components.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
02bc58c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->ListItem to DSRN usage (#28878)1 parent e0a6b8c commit 208c27b
2 files changed
Lines changed: 132 additions & 62 deletions
File tree
- app/components
- UI/SettingsDrawer
- Views/OnboardingSuccess/DefaultSettings/__snapshots__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
| 126 | + | |
126 | 127 | | |
127 | | - | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
Lines changed: 123 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | 67 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
74 | 85 | | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
82 | 97 | | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
89 | 111 | | |
90 | | - | |
91 | 112 | | |
92 | 113 | | |
93 | 114 | | |
| |||
129 | 150 | | |
130 | 151 | | |
131 | 152 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
135 | 159 | | |
136 | | - | |
137 | 160 | | |
138 | 161 | | |
139 | 162 | | |
| |||
157 | 180 | | |
158 | 181 | | |
159 | 182 | | |
160 | | - | |
161 | | - | |
162 | 183 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
167 | 201 | | |
168 | 202 | | |
169 | 203 | | |
170 | 204 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
175 | 213 | | |
176 | 214 | | |
177 | 215 | | |
178 | 216 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
182 | 227 | | |
183 | | - | |
184 | 228 | | |
185 | 229 | | |
186 | 230 | | |
| |||
222 | 266 | | |
223 | 267 | | |
224 | 268 | | |
225 | | - | |
226 | | - | |
227 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
228 | 275 | | |
229 | | - | |
230 | 276 | | |
231 | 277 | | |
232 | 278 | | |
| |||
250 | 296 | | |
251 | 297 | | |
252 | 298 | | |
253 | | - | |
254 | | - | |
255 | 299 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
260 | 317 | | |
261 | 318 | | |
262 | 319 | | |
263 | 320 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
268 | 329 | | |
269 | 330 | | |
270 | 331 | | |
271 | 332 | | |
272 | | - | |
273 | | - | |
274 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
275 | 343 | | |
276 | | - | |
277 | 344 | | |
278 | 345 | | |
279 | 346 | | |
| |||
315 | 382 | | |
316 | 383 | | |
317 | 384 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
321 | 391 | | |
322 | | - | |
323 | 392 | | |
324 | 393 | | |
325 | 394 | | |
| |||
0 commit comments