-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Replace redesign confirmation BottomModal with BottomSheet (#…
…13268) <!-- 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** Updates: - Replaces BottomModal with BottomSheet in redesign Confirm page - Remove min height to prevent redesign Confirm page from showing excess space - Allow BottomSheet styles (rounded corners, footer bottom styles, and device padding detection padding) rather than custom BottomModal styles - Update BlockaidBanner to remove surrounding margin to allow for better reusability - Replace BlockaidBanner instances margin overrides with surrounding container margins - Update BottomSheet to pass style to BottomSheetDialog sheet cc: @brianacnguyen - Note: I think we don't need the additional background colors for header and footer since the parent, BottomSheet animated view sets the background color. Once I removed them, it triggered many snapshot tests and code owner reviews from 5 additional teams. Instead of making this change, we will continue to update the bottomsheet, footer, and header when applicable Fixes: - Fix TransactionReview BlockaidBanner negative padding → turn to positive padding to allow space between next element - Fix Confirm.test console.errors ## **Related issues** Fixes: #13267 Todo follow-up - Related Issue: #12656 ## **Manual testing steps** Test BottomSheets and BlockaidBanner alerts work as expected. Test redesign confirmation page works as expected ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### Before using BottomModal and no scroll behavior https://github.com/user-attachments/assets/0d4c5453-5824-47fd-8aa5-7405cf19de53 ### After using BottomSheet with scroll behavior <img width="320" src="https://github.com/user-attachments/assets/a908f81f-1a28-4e8c-966a-a390430dc7d9"> https://github.com/user-attachments/assets/8f8e2344-7706-49a4-b773-a5226b7826d4 ### Before 70% min height <img width="320" src="https://github.com/user-attachments/assets/94509d26-5e20-414d-942f-56938620f90a"> ### After remove 70% min height <img width="320" src="https://github.com/user-attachments/assets/641022c5-6f23-47a5-9f00-4e9358a96d3b"> ### **Before Transaction Review BlockaidBanner negative padding** <img width="320" src="https://github.com/user-attachments/assets/c057c4e7-c7a7-42f2-8251-b4f2c075a802"> ### **After Transaction Review BlockaidBanner positive padding ** <img width="320" src="https://github.com/user-attachments/assets/de1ecadb-c7ef-49e1-8ae2-6ce1b5d16997"> ### Before Confirm.test console errors   ### After Confirm.test no console.errors  ## **Pre-merge author checklist** - [ ] 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). - [ ] 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-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. --------- Co-authored-by: Brian Nguyen <[email protected]>
- Loading branch information
1 parent
dcf67aa
commit a13b9af
Showing
22 changed files
with
187 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.