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

feat: Remove gap from maxHeight calculation in bottomsheet #8755

Merged
merged 5 commits into from
Feb 28, 2024

Conversation

brianacnguyen
Copy link
Contributor

Description

  • This PR removes the marginTop calculation from the maxHeight calculation in BottomSheet

Related issues

Fixes: #8754

Manual testing steps

  1. Go to any bottomsheet

Screenshots/Recordings

Before

Simulator Screenshot - iPhone 15 Pro - 2024-02-25 at 17 44 12

After

Simulator Screenshot - iPhone 15 Pro - 2024-02-25 at 17 44 22

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • 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.

@brianacnguyen brianacnguyen added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking team-design-system All issues relating to design system in Mobile labels Feb 27, 2024
@brianacnguyen brianacnguyen self-assigned this Feb 27, 2024
@brianacnguyen brianacnguyen requested a review from a team as a code owner February 27, 2024 17:57
Copy link
Contributor

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.

@wachunei
Copy link
Member

I think the reference to that deleted constant must be deleted as well in app/component-library/components/BottomSheets/BottomSheet/foundation/BottomSheetDialog/BottomSheetDialog.tsx

const maxSheetHeight = isFullscreen
      ? screenHeight - screenTopPadding
      : screenHeight - screenTopPadding - DEFAULT_BOTTOMSHEETDIALOG_MARGINTOP;

@wachunei
Copy link
Member

wachunei commented Feb 27, 2024

Just to confirm, the reference to the deleted variable must be deleted otherwise the app crashes:

@wachunei wachunei mentioned this pull request Feb 27, 2024
13 tasks
@brianacnguyen brianacnguyen requested a review from a team as a code owner February 27, 2024 19:45
@brianacnguyen
Copy link
Contributor Author

I think the reference to that deleted constant must be deleted as well in app/component-library/components/BottomSheets/BottomSheet/foundation/BottomSheetDialog/BottomSheetDialog.tsx

const maxSheetHeight = isFullscreen
      ? screenHeight - screenTopPadding
      : screenHeight - screenTopPadding - DEFAULT_BOTTOMSHEETDIALOG_MARGINTOP;

Somehow the change to the main file was not committed. Updated PR

wachunei
wachunei previously approved these changes Feb 27, 2024
Copy link

sonarcloud bot commented Feb 27, 2024

@brianacnguyen brianacnguyen merged commit 28d6580 into main Feb 28, 2024
28 checks passed
@brianacnguyen brianacnguyen deleted the morph/bs-margintop branch February 28, 2024 15:41
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2024
@metamaskbot metamaskbot added the release-7.18.0 Issue or pull request that will be included in release 7.18.0 label Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.18.0 Issue or pull request that will be included in release 7.18.0 Spot Check on the Release Build If a ticket doesn't require feature QA, but does require some form of manual spot checking team-design-system All issues relating to design system in Mobile
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[MOB] Remove top spacing maxHeight restriction for BottomSheet
4 participants