Skip to content

Commit 77342f1

Browse files
authored
chore(runway): cherry-pick fix: left aligned account picker in all cases for wallet homepage (#19617)
- fix: left aligned account picker in all cases for wallet homepage (#19426) <!-- 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** This PR updated the Wallet header to left aligned the AccountPicker for when RemoveGNS is not available, providing more space for the AccountPicker to render the account name <!-- 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: ## **Related issues** Fixes: #19409 ## **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** <img width="1290" height="2796" alt="Simulator Screenshot - iPhone 15 Pro Max - 2025-09-08 at 10 09 51" src="https://github.com/user-attachments/assets/f9589c71-8e28-45f2-b67e-d0fe6b6cbcd2" /> <!-- [screenshots/recordings] --> ### **After** https://github.com/user-attachments/assets/3d96d9af-40a5-4b86-9b5a-9bed254cc013 <!-- [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. [984c15b](984c15b)
2 parents 087a6b0 + 37a7b16 commit 77342f1

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

app/components/UI/Navbar/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,9 @@ export function getWalletNavbarOptions(
10041004
left: 12,
10051005
right: 12,
10061006
},
1007+
accountPickerStyle: {
1008+
marginRight: 16,
1009+
},
10071010
});
10081011

10091012
const onScanSuccess = (data, content) => {
@@ -1104,11 +1107,7 @@ export function getWalletNavbarOptions(
11041107
header: () => (
11051108
<HeaderBase
11061109
includesTopInset
1107-
variant={
1108-
isFeatureFlagEnabled
1109-
? HeaderBaseVariant.Display
1110-
: HeaderBaseVariant.Compact
1111-
}
1110+
variant={HeaderBaseVariant.Display}
11121111
style={innerStyles.headerContainer}
11131112
startAccessory={
11141113
!isFeatureFlagEnabled && (
@@ -1193,6 +1192,7 @@ export function getWalletNavbarOptions(
11931192
}}
11941193
testID={WalletViewSelectorsIDs.ACCOUNT_ICON}
11951194
hitSlop={innerStyles.touchAreaSlop}
1195+
style={innerStyles.accountPickerStyle}
11961196
/>
11971197
</HeaderBase>
11981198
),

app/components/Views/Wallet/__snapshots__/index.test.tsx.snap

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ exports[`Wallet Conditional Rendering should render banner when basic functional
167167
<View
168168
style={
169169
{
170-
"alignItems": "center",
170+
"alignItems": "flex-start",
171171
"flex": 1,
172172
}
173173
}
@@ -193,6 +193,7 @@ exports[`Wallet Conditional Rendering should render banner when basic functional
193193
"borderRadius": 4,
194194
"borderWidth": 0,
195195
"flexDirection": "row",
196+
"marginRight": 16,
196197
"padding": 16,
197198
}
198199
}
@@ -1116,7 +1117,7 @@ exports[`Wallet Conditional Rendering should render loader when no selected acco
11161117
<View
11171118
style={
11181119
{
1119-
"alignItems": "center",
1120+
"alignItems": "flex-start",
11201121
"flex": 1,
11211122
}
11221123
}
@@ -1142,6 +1143,7 @@ exports[`Wallet Conditional Rendering should render loader when no selected acco
11421143
"borderRadius": 4,
11431144
"borderWidth": 0,
11441145
"flexDirection": "row",
1146+
"marginRight": 16,
11451147
"padding": 16,
11461148
}
11471149
}
@@ -1983,7 +1985,7 @@ exports[`Wallet should render correctly 1`] = `
19831985
<View
19841986
style={
19851987
{
1986-
"alignItems": "center",
1988+
"alignItems": "flex-start",
19871989
"flex": 1,
19881990
}
19891991
}
@@ -2009,6 +2011,7 @@ exports[`Wallet should render correctly 1`] = `
20092011
"borderRadius": 4,
20102012
"borderWidth": 0,
20112013
"flexDirection": "row",
2014+
"marginRight": 16,
20122015
"padding": 16,
20132016
}
20142017
}
@@ -2850,7 +2853,7 @@ exports[`Wallet should render correctly when Solana support is enabled 1`] = `
28502853
<View
28512854
style={
28522855
{
2853-
"alignItems": "center",
2856+
"alignItems": "flex-start",
28542857
"flex": 1,
28552858
}
28562859
}
@@ -2876,6 +2879,7 @@ exports[`Wallet should render correctly when Solana support is enabled 1`] = `
28762879
"borderRadius": 4,
28772880
"borderWidth": 0,
28782881
"flexDirection": "row",
2882+
"marginRight": 16,
28792883
"padding": 16,
28802884
}
28812885
}
@@ -3717,7 +3721,7 @@ exports[`Wallet should render correctly when there are no detected tokens 1`] =
37173721
<View
37183722
style={
37193723
{
3720-
"alignItems": "center",
3724+
"alignItems": "flex-start",
37213725
"flex": 1,
37223726
}
37233727
}
@@ -3743,6 +3747,7 @@ exports[`Wallet should render correctly when there are no detected tokens 1`] =
37433747
"borderRadius": 4,
37443748
"borderWidth": 0,
37453749
"flexDirection": "row",
3750+
"marginRight": 16,
37463751
"padding": 16,
37473752
}
37483753
}

0 commit comments

Comments
 (0)