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: don't break layout after an iOS pageSheet dismissal by swipe #20

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

matthieugicquel
Copy link
Collaborator

@matthieugicquel matthieugicquel commented Oct 5, 2023

When opening an iOS UIViewController in pageSheet mode, the screen(s) behind it gets resized.

→ In a typical RN app, this includes the main UIViewController
→ The top-level SafeAreaProvider sees this resizing
→ The values returned by useSafeAreaFrame change
→ rerenders of screen-sizer occur

Problem : when dismissing the pageSheet by swiping, there are many of these resizing events and at some point something breaks, leaving the "screen behind" in a broken state (with white zones on the right and at the bottom) when the dismissal is over

There's probably a fix to be made in useSafeAreaFrame too, but the issue is not visible without screen-sizer, and we should try to ensure it behaves as if it's not present when disabled

@matthieugicquel matthieugicquel marked this pull request as ready for review October 6, 2023 13:58
@matthieugicquel matthieugicquel merged commit 32b5ef6 into main Oct 12, 2023
3 checks passed
@matthieugicquel matthieugicquel deleted the fix-pageSheet-swipe-to-dismiss branch October 12, 2023 09:20
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.

None yet

2 participants