Skip to content

Commit

Permalink
fix: sticky footer UI issue on Snaps Home Page in extended view (#27799)
Browse files Browse the repository at this point in the history
## **Description**
Fix issue with sticky Snaps UI Footer component in extended view.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27799?quickstart=1)

## **Related issues**
Fixes: n/a

## **Manual testing steps**
1. Try all the Snaps that use custom footer (Home Page Snap, Custom
Dialog Snap with custom UI, etc.).
2. Make sure that footer has correct width matching the width of the
content view.

## **Screenshots/Recordings**

### **Before**

![image](https://github.com/user-attachments/assets/f2a2c924-2bd9-451e-9b26-aadda9e94b22)

### **After**
![Screenshot 2024-10-11 at 20 38
13](https://github.com/user-attachments/assets/644d97f6-89b3-4971-bc8e-d51322888788)
![Screenshot 2024-10-11 at 20 38
48](https://github.com/user-attachments/assets/b65b113c-8aa1-4d54-b70c-ab88dad41505)
![Screenshot 2024-10-11 at 20 40
55](https://github.com/user-attachments/assets/215ae7a8-4e20-4a6b-a2ff-f4276515ded4)
![Screenshot 2024-10-11 at 20 41
15](https://github.com/user-attachments/assets/fa3f324d-3fc3-473b-81ea-bc4ce65ebaf3)
![Screenshot 2024-10-11 at 20 56
29](https://github.com/user-attachments/assets/6ad44d4b-a869-4f2a-9043-397e5730e757)

## **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/develop/.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/develop/.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.
  • Loading branch information
david0xd authored Oct 14, 2024
1 parent f9ec0e0 commit a4b1555
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ui/components/app/snaps/snap-ui-renderer/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
@use "design-system";

.snap-ui-renderer {
$width-screen-sm-min: 85vw;
$width-screen-md-min: 80vw;
$width-screen-lg-min: 62vw;

&__content {
margin-bottom: 0 !important;
}
Expand Down Expand Up @@ -69,5 +75,17 @@

&__footer {
margin-top: auto;

@include design-system.screen-sm-min {
max-width: $width-screen-sm-min;
}

@include design-system.screen-md-min {
max-width: $width-screen-md-min;
}

@include design-system.screen-lg-min {
max-width: $width-screen-lg-min;
}
}
}

0 comments on commit a4b1555

Please sign in to comment.