Commit 9be12a6
authored
chore: cp-7.59.0 input fixes (MetaMask#22508)
## **Description**
This PR isolates input-related fixes that were originally bundled in
MetaMask#21199 (which was reverted in MetaMask#22342). These specific fixes did not
cause any issues and should be preserved.
The main changes include:
1. **Font weight fix for Input component** - Added explicit `fontWeight`
property to ensure proper text rendering in TextField inputs
2. **ImportSRP modal overlay fix** - Fixed overlay style interpolation
to prevent visual artifacts during the seed phrase import modal
animation
3. **Card delegation improvements** - Enhanced delegation logic to
properly handle zero-value delegations and checksum addresses for EVM
networks
These fixes improve the overall stability and user experience of input
fields and related UI components across the app.
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Related to MetaMask#21199 (original PR with font preloader changes)
Related to MetaMask#22342 (revert of MetaMask#21199)
## **Manual testing steps**
```gherkin
Feature: Input component rendering and functionality
Scenario: user enters text in TextField components
Given user is on any screen with text input fields
When user types text into input fields
Then text should render correctly with proper font weight and styling
Scenario: user imports wallet via seed phrase
Given user is on the import wallet flow
When user opens the seed phrase modal
Then modal should display without overlay artifacts
Scenario: user manages card delegation
Given user has external wallet details configured
When user sets a delegation amount of zero
Then system should not call updateTokenPriority
And delegation should complete successfully
```
## **Screenshots/Recordings**
N/A - These are fixes for existing functionality
## **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
- [ ] 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]
> Adds consistent input lineHeight and applies Geist font styles to
password-related views, updating snapshots accordingly.
>
> - **Frontend**:
> - **Input/TextField**: Set explicit `lineHeight` in
`components/Form/TextField/foundation/Input/Input.styles.ts` for
consistent baseline alignment across platforms.
> - **Password Screens**:
> - `Views/EnterPasswordSimple/index.js`: Apply `fontStyles.normal` to
prompt text.
> - `Views/RevealPrivateCredential/styles.ts`: Apply `fontStyles.normal`
to `input` style.
> - **Tests**:
> - Update snapshots across multiple views to reflect added `lineHeight`
and `fontFamily` styling on inputs.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7bb6459. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent dd54be0 commit 9be12a6
29 files changed
Lines changed: 135 additions & 2 deletions
File tree
- app
- component-library/components/Form/TextField/foundation/Input
- __snapshots__
- components
- Snaps
- SnapUIAddressInput/__snapshots__
- SnapUIRenderer
- __snapshots__
- components/__snapshots__
- UI
- Bridge/components
- BridgeDestTokenSelector/__snapshots__
- BridgeSourceTokenSelector/__snapshots__
- Card/Views/CardAuthentication/__snapshots__
- Ramp
- Aggregator
- Views/Settings/__snapshots__
- components
- FiatSelectorModal/__snapshots__
- RegionSelectorModal/__snapshots__
- TokenSelectModal/__snapshots__
- Deposit
- Views
- BasicInfo/__snapshots__
- EnterAddress/__snapshots__
- EnterEmail/__snapshots__
- Modals
- RegionSelectorModal/__snapshots__
- StateSelectorModal/__snapshots__
- TokenSelectorModal/__snapshots__
- components/DepositPhoneField/__snapshots__
- components/TokenSelection/__snapshots__
- Views
- ChoosePassword/__snapshots__
- EditAccountName/__snapshots__
- EnterPasswordSimple
- __snapshots__
- Login/__snapshots__
- ResetPassword/__snapshots__
- RevealPrivateCredential
- __snapshots__
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
app/component-library/components/Form/TextField/foundation/Input/__snapshots__/Input.test.tsx.snap
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| |||
451 | 452 | | |
452 | 453 | | |
453 | 454 | | |
| 455 | + | |
454 | 456 | | |
455 | 457 | | |
456 | 458 | | |
| |||
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
| 550 | + | |
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
| |||
702 | 705 | | |
703 | 706 | | |
704 | 707 | | |
| 708 | + | |
705 | 709 | | |
706 | 710 | | |
707 | 711 | | |
| |||
795 | 799 | | |
796 | 800 | | |
797 | 801 | | |
| 802 | + | |
798 | 803 | | |
799 | 804 | | |
800 | 805 | | |
| |||
1944 | 1949 | | |
1945 | 1950 | | |
1946 | 1951 | | |
| 1952 | + | |
1947 | 1953 | | |
1948 | 1954 | | |
1949 | 1955 | | |
| |||
2139 | 2145 | | |
2140 | 2146 | | |
2141 | 2147 | | |
| 2148 | + | |
2142 | 2149 | | |
2143 | 2150 | | |
2144 | 2151 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
| |||
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
| 369 | + | |
368 | 370 | | |
369 | 371 | | |
370 | 372 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| 875 | + | |
875 | 876 | | |
876 | 877 | | |
877 | 878 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| 880 | + | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
| 664 | + | |
664 | 665 | | |
665 | 666 | | |
666 | 667 | | |
| |||
774 | 775 | | |
775 | 776 | | |
776 | 777 | | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
| |||
698 | 699 | | |
699 | 700 | | |
700 | 701 | | |
| 702 | + | |
701 | 703 | | |
702 | 704 | | |
703 | 705 | | |
| |||
0 commit comments