-
-
Notifications
You must be signed in to change notification settings - Fork 514
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(Android): modal insets not applying #2371
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look promising, however let's make sure we test this change on various stackPresentation
& combinations. Also it might be important to test this in bottom-tabs
environment.
Please confirm if you have tested these cases.
@kkafar tested it with Example app's "Stack Presentation" and "Bottom tabs and native stack" + some test cases and can confirm it works as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still worried, that removing InsetObserverProxy
from the decor view might interfere with formSheet
presentation.
Imagine case where you have tab navigator, each screen is a native stack, you present formSheet in one of them & open keyboard. I see it not working. I'll try to test it as well before merging.
@kkafar I prepared a snack that can be used to test that: snack
|
9758d45
to
f61d608
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quickly tested this, did not saw any regression, however this is sensitive code, which I do not understand completely.
We need to do some deeper research on inset management in our apps.
Description
This PR fixes the insets not applying on modal screens.
I brought back the missing logic, that was removed here to
InsetsObserverProxy
Note: Without this change the insets are applied correctly after navigating to a screen with
presentation: formSheet
at least once.Changes
unregister
fun from InsetsObserverProxyunregisterOnView
that resembles the previously removed logicScreenshots / GIFs
Before
After
Test code and steps to reproduce
Stack Presentation
in the Example appheaderShown: false
for the modal screenChecklist