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

refactor: QOL update for BottomSheet and BottomSheetDialog #8437

Merged
merged 9 commits into from
Jan 30, 2024

Conversation

brianacnguyen
Copy link
Contributor

@brianacnguyen brianacnguyen commented Jan 29, 2024

Description

  • Aligned onDismiss/onClose/onHidden to onClose-related functions
  • Added onOpen functions
  • Added more comments to BottomSheetDialog logic and updated const names to be more intuitive
  • Added test to BottomSheetDialog

Related issues

Fixes: N/A

Manual testing steps

  1. Change pointer to Storybook in index.js
  2. Open app
  3. Click on Component Library -> BottomSheet

Screenshots/Recordings

Before

After

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-01-28.at.18.43.44.mp4

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) team-design-system All issues relating to design system in Mobile labels Jan 29, 2024
@brianacnguyen brianacnguyen self-assigned this Jan 29, 2024
@brianacnguyen brianacnguyen requested review from a team as code owners January 29, 2024 02:45
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.

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2024

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (97682bc) 40.41% compared to head (a7b3c60) 40.52%.

Files Patch % Lines
...foundation/BottomSheetDialog/BottomSheetDialog.tsx 50.00% 15 Missing ⚠️
...omponents/BottomSheets/BottomSheet/BottomSheet.tsx 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8437      +/-   ##
==========================================
+ Coverage   40.41%   40.52%   +0.11%     
==========================================
  Files        1239     1239              
  Lines       29974    29978       +4     
  Branches     2868     2868              
==========================================
+ Hits        12114    12150      +36     
+ Misses      17168    17133      -35     
- Partials      692      695       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

sonarcloud bot commented Jan 30, 2024

@brianacnguyen brianacnguyen merged commit 60819af into main Jan 30, 2024
26 checks passed
@brianacnguyen brianacnguyen deleted the morph/bottomsheet-update branch January 30, 2024 00:34
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2024
@metamaskbot metamaskbot added the release-7.16.0 Issue or pull request that will be included in release 7.16.0 label Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.16.0 Issue or pull request that will be included in release 7.16.0 team-design-system All issues relating to design system in Mobile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants