Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [cherry-pick | 7.42.0] refactor: Replace redesign confirmation BottomModal with BottomSheet #13914

Merged

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Mar 7, 2025

Description

Cherry-picks 1/3 BottomSheet fix #13268 into 7.42.0

Related issues

Fixes: #13870 (release bug)
Fixes: #13267 (original)

Cherry-pick PRs:
1/3: #13914 (BottomModal → BottomSheet)
2/3: #13926 (bitrise failure testID)
3/3: #13927 (scroll and close on swipe down & backdrop click)

Manual testing steps

Open any redesign signature in Android to test related bug fix

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

…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

![CleanShot 2025-02-09 at 01 35
46@2x](https://github.com/user-attachments/assets/2653a073-b0de-4c2d-bcea-dfbc11d38246)
![CleanShot 2025-02-09 at 01 35
54@2x](https://github.com/user-attachments/assets/f9ce410c-42c5-4738-b99f-f871456eb82f)

### After Confirm.test no console.errors

![CleanShot 2025-02-09 at 01 49
47@2x](https://github.com/user-attachments/assets/d3bf6580-553d-4b14-96ab-3f529d17db67)


## **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 <brianacnguyen@gmail.com>
@digiwand digiwand requested review from a team as code owners March 7, 2025 07:20
Copy link
Contributor

github-actions bot commented Mar 7, 2025

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-confirmations Push issues to confirmations team label Mar 7, 2025
@OGPoyraz OGPoyraz merged commit dcf5047 into release/7.42.0 Mar 7, 2025
38 of 39 checks passed
@OGPoyraz OGPoyraz deleted the fix-cp-7.42.0-refactor-signature-use-bottom-sheet branch March 7, 2025 16:54
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2025
@digiwand digiwand changed the title fix: cherry-pick 7.42.0 refactor: Replace redesign confirmation BottomModal with BottomSheet fix: [cherry-pick | 7.42.0] refactor: Replace redesign confirmation BottomModal with BottomSheet Mar 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: [Android Specific] Splash screen appears when confirmation resign bottom sheets are triggered
3 participants