Commit fe55bb5
authored
fix(TMCU-539): add horizontal padding to NFT skeleton in full view (#27077)
## **Description**
The NFT grid skeleton loading state had minimal padding (`p-1`)
regardless of context, while the actual NFT grid `FlatList` uses `px-4`
horizontal padding in full view mode. This caused an inconsistent layout
jump when loading finished and the skeleton was replaced by real
content.
The fix threads `isFullView` from `NftGrid` through `NftGridContent` to
`NftGridSkeleton`, so the skeleton conditionally applies `px-4` in full
view and `px-1` in tab/homepage view -- matching the padding of the
content it replaces in each context.
## **Changelog**
CHANGELOG entry: Fixed missing horizontal padding on NFT skeleton
loading state in full view
## **Related issues**
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-539
## **Manual testing steps**
```gherkin
Feature: NFT skeleton padding in full view
Scenario: user sees skeleton with correct padding in NFTs full view
Given user navigates to the NFTs full view
And NFTs are being fetched
When the skeleton loading state is displayed
Then the skeleton has the same horizontal padding as the NFT grid content
Scenario: skeleton padding is unchanged in tab/homepage view
Given user is on the homepage with the NFTs section visible
And NFTs are being fetched
When the skeleton loading state is displayed
Then the skeleton retains minimal horizontal padding (matching tab layout)
```
## **Screenshots/Recordings**
N/A -- padding-only fix, verified via tests.
### **Before**
<img width="300"
src="https://github.com/user-attachments/assets/1fb110de-ed76-4a41-8c8f-be1202db4e12"
/>
### **After**
<img width="300"
src="https://github.com/user-attachments/assets/3c7730bd-76ca-4973-a11a-d8eedf53d1c7"
/>
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk UI-only change that adjusts loading-state layout; no business
logic, data handling, or navigation behavior is modified.
>
> **Overview**
> Fixes a layout jump in the NFT grid loading state by **matching
`NftGridSkeleton` horizontal padding to the rendered grid**.
>
> Threads `isFullView` from `NftGrid` through `NftGridContent` into
`NftGridSkeleton`, where the container now applies `px-4` in full view
and `px-1` otherwise (replacing the previous fixed `p-1`).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
afdbe36. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 1a22eb4 commit fe55bb5
2 files changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | | - | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
| 305 | + | |
303 | 306 | | |
304 | 307 | | |
305 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments