Commit bb15712
authored
feat: import SRP continue button and keyboard changes added (#24693)
<!--
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**
* Shift Continue button at the bottom of the screen.
* Remove autoFocus when importSrp screen opens
* Change checkmark icon to done in the keyboard and add keyboard dismiss
event.
* Jira: https://consensyssoftware.atlassian.net/browse/SL-454
<!--
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: Import SRP screen UX improvements
1) **Existing Behaviour**: When the Import SRP screen opens, the
keyboard opens automatically and focus is set on the SRPInputGrid.
**New Behaviour**: When the Import SRP screen opens, the user sees the
SRPInputGrid and the Continue button, and the keyboard opens only when
the SRPInputGrid is tapped.
2) **Existing Behaviour**: Tapping the checkmark icon on the keyboard
moves focus from one cell to the next in SRPInput.
**New Behaviour**: The checkmark icon is replaced with a Done button,
and tapping it dismisses the keyboard.
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
Feature: Import SRP screen UX improvements
Scenario: Keyboard does not auto-open on screen load
Given the user navigates to Import from Secret Recovery Phrase screen
Then the SRP input grid and Continue button should be visible
And the keyboard should not be visible
Scenario: Keyboard opens only when user taps SRP input
Given the user is on the Import SRP screen with keyboard hidden
When the user taps on a word input field
Then the keyboard should open
Scenario: Done button dismisses keyboard
Given the user is entering words with keyboard visible
When the user taps the Done button on keyboard
Then the keyboard should be dismissed
```
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<img width="327" height="681" alt="Screenshot 2026-01-16 at 12 01 27 PM"
src="https://github.com/user-attachments/assets/c4481dd5-403b-4e64-a178-3b29c88c8e58"
/>
<!-- [screenshots/recordings] -->
### **After**
https://github.com/user-attachments/assets/5315cb1c-733c-4236-989d-3aa52a62ef01
<!-- [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
- [ ] 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]
> Updates SRP input UX and CTA placement.
>
> - Adds `autoFocus` prop to `SrpInputGrid` (default `true`); consuming
screens pass `autoFocus={false}`
> - Changes submit behavior: `onSubmitEditing` now dismisses the
keyboard instead of creating/moving to a new input; removes enter-key
advance logic
> - Normalizes text input props (`returnKeyType="done"`,
`blurOnSubmit={false}`, `enablesReturnKeyAutomatically={false}`) and
adds submit handlers to textarea
> - Moves “Continue”/“Import” buttons to a fixed bottom container with
optional inline error text; updates styles and snapshots
> - Adjusts tests to reflect keyboard dismissal, fixed footer CTA, and
error rendering via `getAllByText`
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
45381fe. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent ebb48c4 commit bb15712
11 files changed
Lines changed: 180 additions & 118 deletions
File tree
- app/components
- UI/SrpInputGrid
- __snapshots__
- Views
- ImportFromSecretRecoveryPhrase
- __snapshots__
- ImportNewSecretRecoveryPhrase
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
96 | 97 | | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| 109 | + | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| |||
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| 193 | + | |
190 | 194 | | |
| 195 | + | |
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
| |||
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
| 207 | + | |
201 | 208 | | |
202 | 209 | | |
203 | 210 | | |
| |||
345 | 352 | | |
346 | 353 | | |
347 | 354 | | |
| 355 | + | |
348 | 356 | | |
| 357 | + | |
349 | 358 | | |
350 | 359 | | |
351 | 360 | | |
| |||
356 | 365 | | |
357 | 366 | | |
358 | 367 | | |
| 368 | + | |
359 | 369 | | |
360 | 370 | | |
361 | 371 | | |
| |||
439 | 449 | | |
440 | 450 | | |
441 | 451 | | |
| 452 | + | |
442 | 453 | | |
| 454 | + | |
443 | 455 | | |
444 | 456 | | |
445 | 457 | | |
| |||
448 | 460 | | |
449 | 461 | | |
450 | 462 | | |
| 463 | + | |
451 | 464 | | |
452 | 465 | | |
| 466 | + | |
453 | 467 | | |
454 | 468 | | |
455 | 469 | | |
| |||
597 | 611 | | |
598 | 612 | | |
599 | 613 | | |
| 614 | + | |
600 | 615 | | |
| 616 | + | |
601 | 617 | | |
602 | 618 | | |
603 | 619 | | |
| |||
608 | 624 | | |
609 | 625 | | |
610 | 626 | | |
| 627 | + | |
611 | 628 | | |
612 | 629 | | |
613 | 630 | | |
| |||
691 | 708 | | |
692 | 709 | | |
693 | 710 | | |
| 711 | + | |
694 | 712 | | |
| 713 | + | |
695 | 714 | | |
696 | 715 | | |
697 | 716 | | |
| |||
700 | 719 | | |
701 | 720 | | |
702 | 721 | | |
| 722 | + | |
703 | 723 | | |
704 | 724 | | |
| 725 | + | |
705 | 726 | | |
706 | 727 | | |
707 | 728 | | |
| |||
884 | 905 | | |
885 | 906 | | |
886 | 907 | | |
| 908 | + | |
887 | 909 | | |
| 910 | + | |
888 | 911 | | |
889 | 912 | | |
890 | 913 | | |
| |||
895 | 918 | | |
896 | 919 | | |
897 | 920 | | |
| 921 | + | |
898 | 922 | | |
899 | 923 | | |
900 | 924 | | |
| |||
1014 | 1038 | | |
1015 | 1039 | | |
1016 | 1040 | | |
| 1041 | + | |
1017 | 1042 | | |
| 1043 | + | |
1018 | 1044 | | |
1019 | 1045 | | |
1020 | 1046 | | |
| |||
1025 | 1051 | | |
1026 | 1052 | | |
1027 | 1053 | | |
| 1054 | + | |
1028 | 1055 | | |
1029 | 1056 | | |
1030 | 1057 | | |
| |||
1144 | 1171 | | |
1145 | 1172 | | |
1146 | 1173 | | |
| 1174 | + | |
1147 | 1175 | | |
| 1176 | + | |
1148 | 1177 | | |
1149 | 1178 | | |
1150 | 1179 | | |
| |||
1155 | 1184 | | |
1156 | 1185 | | |
1157 | 1186 | | |
| 1187 | + | |
1158 | 1188 | | |
1159 | 1189 | | |
1160 | 1190 | | |
| |||
1239 | 1269 | | |
1240 | 1270 | | |
1241 | 1271 | | |
| 1272 | + | |
1242 | 1273 | | |
| 1274 | + | |
1243 | 1275 | | |
1244 | 1276 | | |
1245 | 1277 | | |
| |||
1248 | 1280 | | |
1249 | 1281 | | |
1250 | 1282 | | |
| 1283 | + | |
1251 | 1284 | | |
1252 | 1285 | | |
| 1286 | + | |
1253 | 1287 | | |
1254 | 1288 | | |
1255 | 1289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | 283 | | |
293 | 284 | | |
294 | 285 | | |
| |||
406 | 397 | | |
407 | 398 | | |
408 | 399 | | |
409 | | - | |
410 | | - | |
411 | | - | |
| 400 | + | |
412 | 401 | | |
413 | 402 | | |
414 | 403 | | |
| |||
433 | 422 | | |
434 | 423 | | |
435 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
436 | 428 | | |
437 | 429 | | |
438 | 430 | | |
439 | 431 | | |
440 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
441 | 436 | | |
442 | 437 | | |
443 | 438 | | |
| |||
472 | 467 | | |
473 | 468 | | |
474 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
475 | 474 | | |
476 | 475 | | |
477 | 476 | | |
478 | 477 | | |
479 | | - | |
| 478 | + | |
480 | 479 | | |
481 | 480 | | |
482 | 481 | | |
| |||
0 commit comments