Commit 554270b
chore(runway): cherry-pick fix(perps): watchlist and explore header and list padding fix cp-7.64.0 (#25422)
- fix(perps): watchlist and explore header and list padding fix
cp-7.64.0 (#25407)
<!--
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?
-->
- Fix header font weight to match Figma design specs (500 Medium instead
of 700
Bold)
- Implement dynamic header padding based on context (balance visibility,
watchlist
presence)
- Remove redundant horizontal padding from Watchlist component
(inherited from
parent)
- Increase explore market row vertical padding from 6px to 16px
- Add horizontal margin to "See All Perps" button
Changes
Font Weight:
- Changed Watchlist and Explore headers from TextVariant.HeadingMD to
TextVariant.BodyLGMedium
Dynamic Header Padding:
- Watchlist header: 16px/4px (no balance) or 24px/4px (with balance)
- Explore header: 16px/4px (no balance), 24px/4px (with balance), or
20px/8px (below
watchlist)
Padding Cleanup:
- Removed duplicate paddingHorizontal: 16 from watchlist header/list
(inherits from
parent)
- Updated explore market row paddingVertical from 6px to 16px
- Added marginHorizontal: 16 to "See All Perps" button
## **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: Fix watchlist and explore header and list padding
## **Related issues**
Fixes:
## **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]
```
- Verify Watchlist/Explore headers display with Medium font weight (500)
- Verify header padding adjusts correctly when balance is empty vs
non-empty
- Verify Explore header spacing changes when Watchlist is visible vs
hidden
- Verify market row spacing matches Figma spec
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [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
- [ ] 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]
> **Medium Risk**
> Mostly UI/layout refactors, but it changes how the Perps tab renders
the watchlist and removes the pressable watchlist header in
`PerpsWatchlistMarkets`, which could impact navigation/interaction if
relied on elsewhere.
>
> **Overview**
> Aligns Perps home/tab UI spacing with updated design specs by
switching section headers to `TextVariant.BodyLGMedium`, increasing
header bottom margins, and adjusting row/button padding.
>
> Refactors `PerpsTabView` to render the watchlist inline (using
`PerpsMarketRowItem`) and apply *dynamic* explore header padding based
on balance visibility and whether the watchlist is present; also adds
horizontal margin to the "See all perps" button.
>
> Simplifies `PerpsWatchlistMarkets` by removing the pressable
header/chevron navigation and updating header spacing, and updates
tests/mocks (including `usePerpsLivePrices` and market row selectors) to
match the new rendering.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0350f76. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
[74f8159](74f8159)
Co-authored-by: Matt D. <85914066+geositta@users.noreply.github.com>1 parent 0ee7328 commit 554270b
8 files changed
Lines changed: 98 additions & 140 deletions
File tree
- app/components/UI/Perps
- Views/PerpsTabView
- components
- PerpsHomeSection
- PerpsMarketTypeSection
- PerpsWatchlistMarkets
Lines changed: 19 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 110 | | |
122 | 111 | | |
123 | 112 | | |
124 | 113 | | |
125 | | - | |
126 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | | - | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
178 | 181 | | |
179 | 182 | | |
180 | 183 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
168 | 174 | | |
169 | 175 | | |
170 | 176 | | |
| |||
Lines changed: 61 additions & 84 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 48 | | |
| 49 | + | |
58 | 50 | | |
59 | 51 | | |
60 | 52 | | |
| |||
117 | 109 | | |
118 | 110 | | |
119 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
| |||
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
| 299 | + | |
| 300 | + | |
305 | 301 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
354 | 306 | | |
355 | 307 | | |
356 | | - | |
| 308 | + | |
| 309 | + | |
357 | 310 | | |
358 | | - | |
359 | | - | |
360 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
361 | 341 | | |
362 | 342 | | |
363 | 343 | | |
364 | 344 | | |
365 | 345 | | |
366 | | - | |
367 | | - | |
| 346 | + | |
| 347 | + | |
368 | 348 | | |
369 | 349 | | |
370 | 350 | | |
| |||
379 | 359 | | |
380 | 360 | | |
381 | 361 | | |
382 | | - | |
383 | | - | |
| 362 | + | |
| 363 | + | |
384 | 364 | | |
385 | 365 | | |
386 | 366 | | |
387 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
388 | 374 | | |
389 | 375 | | |
390 | 376 | | |
| |||
399 | 385 | | |
400 | 386 | | |
401 | 387 | | |
402 | | - | |
| 388 | + | |
| 389 | + | |
403 | 390 | | |
404 | 391 | | |
405 | 392 | | |
| |||
425 | 412 | | |
426 | 413 | | |
427 | 414 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
| 415 | + | |
| 416 | + | |
440 | 417 | | |
441 | 418 | | |
442 | 419 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
Lines changed: 8 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 2 | + | |
9 | 3 | | |
10 | 4 | | |
11 | 5 | | |
12 | 6 | | |
13 | 7 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 8 | | |
20 | 9 | | |
21 | 10 | | |
| |||
93 | 82 | | |
94 | 83 | | |
95 | 84 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 85 | + | |
104 | 86 | | |
105 | 87 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
121 | 93 | | |
122 | | - | |
| 94 | + | |
123 | 95 | | |
124 | 96 | | |
125 | 97 | | |
| |||
0 commit comments