Sync Modal system bars visibility with current activity#48516
Closed
mateoguzmana wants to merge 2 commits into
Closed
Sync Modal system bars visibility with current activity#48516mateoguzmana wants to merge 2 commits into
mateoguzmana wants to merge 2 commits into
Conversation
…x/37801-hiding-system-bars-not-respected-in-modal
Contributor
|
@alanleedev has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
@mateoguzmana Thanks for submitting the PR. I'm looking into a few things;
|
Collaborator
Author
Thanks for looking into this! if there is anything I can help with among those lines just let me know. |
|
My react native is 0.76.6, the system navigation bar still appear, the system bar still appear when modal display thanks |
Contributor
|
@alanleedev merged this pull request in 7016225. |
Collaborator
|
This pull request was successfully merged by @mateoguzmana in 7016225 When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes #37801
This PR fixes the system bars visibility not being in sync as with the activity it is displayed on.
Here I am also taking into account the feedback given in this PR which was also aiming to address this issue. Unfortunately, I tried in multiple ways to get this to work by simply extending the whole system bars behaviour in the dialog with the activity system bars behaviour but found out that that solution won't work as we currently clear the flag "FLAG_NOT_FOCUSABLE" and unless we remove that line, extending the behaviour won't work. Removing that line is not an option as it would cause other side effects in the dialog itself.
With the above said, I ended up doing this in a more explicit way, by checking whether the status or navigation bars are hidden in the activity and then hiding then as well in the dialog or otherwise, similar as we are currently doing with the status bars appearance.
Changelog:
[ANDROID] [FIXED] - Sync Modal system bars visibility with current activity
Test Plan:
In order to test this, you need to trigger any method that hides or shows the system bars using
window.insetsController. Here a very small example of it:You can do this optionally from JS to make testing different cases easier. Below is a screen recording of how the solutions looks like:
Screen recording showcasing the solution in the test plan
Screen.Recording.2024-12-20.at.23.34.09.mov