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: adds support for changing orientations #235

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

proohit
Copy link
Contributor

@proohit proohit commented Aug 12, 2024

Description

Currently, BottomSheet uses Dimensions API in order to calculate the default max height. However, using Dimensions is discouraged as it does not reflect changes (see https://reactnative.dev/docs/dimensions), which is necessary if users change from portrait to landscape and vice versa. This PR replaces Dimensions with useWindowDimensions in BottomSheet, so that changes in orientation can be handled to calculate the default max height.

Fixes # (issue)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Use BottomSheet and change orientation of device while app is running.

Checklist: (Feel free to delete this section upon completion)

  • I have included a changeset if this change will require a version change to one of the packages.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run all builds, tests, and linting and all checks pass
  • I have added tests that prove my fix is effective or that my feature works
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Aug 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-ama ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 12, 2024 7:42am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant