Skip to content

Commit

Permalink
fix: Remove isFullscreen from AddAccount, AccountPermissions, and Add…
Browse files Browse the repository at this point in the history
…ChainApproval (#8504)

## **Description**
- Remove `isFullscreen` from AddAccount, AccountPermissions, and
AddChainApproval so the view can dynamically grow to maxHeight instead
of setting it to maxHeight

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to MM Portfolio
2. Connect to an account
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

https://github.com/MetaMask/metamask-mobile/assets/14355083/c4989789-9a4d-439d-8e21-a247601ed74d

<!-- [screenshots/recordings] -->

### **After**

https://github.com/MetaMask/metamask-mobile/assets/14355083/eb37c70b-e6c9-4aa9-b4d8-48aadcb9fed1

https://github.com/MetaMask/metamask-mobile/assets/14355083/1133ad7f-d098-40ab-b05c-219be50cad3b

https://github.com/MetaMask/metamask-mobile/assets/14355083/5c91f31d-bca3-4c56-aa5c-f835df3bca03


<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [x] I've linked related issues
- [ ] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [ ] 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.
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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: Cal Leung <[email protected]>
  • Loading branch information
brianacnguyen and Cal-L authored Feb 1, 2024
1 parent 0a60d7d commit ff8e9b0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const AddChainApproval = () => {
if (approvalRequest?.type !== ApprovalTypes.ADD_ETHEREUM_CHAIN) return null;

return (
<BottomSheet onClose={onReject} shouldNavigateBack={false} isFullscreen>
<BottomSheet onClose={onReject} shouldNavigateBack={false}>
<BottomSheetHeader>
<Text variant={TextVariant.HeadingMD}>
{strings('add_custom_network.title')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`AddChainApproval renders 1`] = `
<ForwardRef
isFullscreen={true}
shouldNavigateBack={false}
>
<BottomSheetHeader>
Expand Down
2 changes: 1 addition & 1 deletion app/components/Views/AccountConnect/AccountConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ const AccountConnect = (props: AccountConnectProps) => {
]);

return (
<BottomSheet onClose={handleSheetDismiss} isFullscreen ref={sheetRef}>
<BottomSheet onClose={handleSheetDismiss} ref={sheetRef}>
{renderConnectScreens()}
</BottomSheet>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,7 @@ const AccountPermissions = (props: AccountPermissionsProps) => {
renderRevokeScreen,
]);

return (
<BottomSheet isFullscreen ref={sheetRef}>
{renderPermissionsScreens()}
</BottomSheet>
);
return <BottomSheet ref={sheetRef}>{renderPermissionsScreens()}</BottomSheet>;
};

export default AccountPermissions;

0 comments on commit ff8e9b0

Please sign in to comment.