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

#531 Temporary fix for BottomSheet to show also when ReducedMotion is on #604

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

radoslavzeman
Copy link
Contributor

@radoslavzeman radoslavzeman commented Jul 24, 2024

The issue is probably caused when ReducedMotion is enabled. Note that ReducedMotion is also enabled when battery is <10% (on ios).

Quick explanation of the problem and the fix:
With newer version of react-native-reanimated that included support for ReducedMotion, BottomSheet has problem to appear if ReducedMotion is enabled. It's supposed to be fixed in BottomSheet version 4.6.3 (latests at this time), but people write it's still buggy, and the upgrade to newer version should be done with proper testing, not as quick fix.
So I decided to use the hot-fix: disable animateOnMount when ReducedMotion is used.
People also mentioned problem with this hot-fix with .dismiss(), but we use .close() instead of .dismiss() and it worked okay when I tested it.

Tested locally on iphone 15 on physical device with ReducedMotion enabled ✅

See more in the issue thread: gorhom/react-native-bottom-sheet#1560

Copy link
Collaborator

@PavelFilo PavelFilo left a comment

Choose a reason for hiding this comment

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

in future we should move BottomSheetModal with default values to separate component

@github-actions github-actions bot added pr: fix & ship 🚢 No additional review needed before merge - some work may be required, if specified in last review and removed pr: needs review 🙏 labels Jul 25, 2024
@radoslavzeman radoslavzeman merged commit 7bc36dd into master Jul 25, 2024
10 checks passed
@radoslavzeman radoslavzeman deleted the 531-bottomsheet-not-appearing branch July 25, 2024 08:08
@radoslavzeman radoslavzeman linked an issue Jul 26, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix & ship 🚢 No additional review needed before merge - some work may be required, if specified in last review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Bottom Sheets when ReducedMotion is enabled Android + iOS: nejde kliknut na 3 bodky pri edite vozidla
2 participants