Commit 5ca2553
fix: asset layout cp-13.12.0 (#38537)
<!--
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**
Fix asset page layout from getting shrinked
[](https://codespaces.new/MetaMask/metamask-extension/pull/38537?quickstart=1)
## **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: asset page layout
## **Related issues**
Fixes:
## **Manual testing steps**
1. Home screen
2. Tokens tab
3. click on an asset
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
|Before|After|
|---|---|
|<img width="443" height="407" alt="image"
src="https://github.com/user-attachments/assets/b662ab2a-ab20-4478-8cc7-6bb4942f94bd"
/>|<img width="430" height="383" alt="image"
src="https://github.com/user-attachments/assets/370243e1-f152-4578-89b1-81db4a5416b4"
/>|
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/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]
> Remove horizontal auto margins from the AssetPage root container and
update snapshots accordingly.
>
> - **Frontend**
> - **Asset layout**: In `ui/pages/asset/components/asset-page.tsx`,
remove `marginLeft="auto"` and `marginRight="auto"` from the root `Box`
(`asset__content`), keeping only `marginTop={4}`.
> - **Tests**
> - Update Jest snapshots in
`ui/pages/asset/components/__snapshots__/asset-page.test.tsx.snap` to
reflect removed `mm-box--margin-right-auto` and
`mm-box--margin-left-auto` classes.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
7dabfe3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Nidhi Kumari <[email protected]>1 parent 4f6037d commit 5ca2553
File tree
2 files changed
+4
-9
lines changed- ui/pages/asset/components
- __snapshots__
2 files changed
+4
-9
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
| 872 | + | |
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 330 | + | |
336 | 331 | | |
337 | 332 | | |
338 | 333 | | |
| |||
0 commit comments