Do not bring app out of immersive mode when a modal is presented#21078
Do not bring app out of immersive mode when a modal is presented#21078olfek wants to merge 1 commit intofacebook:masterfrom elderstudios:fix-dialog-rn-modal-brings-app-permanently-out-of-immersive-mode
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Looks like you have a bad rebase |
|
@TheSavior So will this commit: bd668d72e84b7582f8931738ec47466c31562c79 be accepted? |
hramos
left a comment
There was a problem hiding this comment.
Can you fix the PR? It looks like a lot of unrelated changes made it in. We can't review the PR in its current state.
|
@hramos Okay, I'll do it tomorrow, I'll place my commit on the I can only confirm that the changes I made work on top of |
|
We'll let Circle CI run the tests then. It's your responsibility as the author of the PR to make sure your code does not break anything. |
|
@hramos The original PR was tested with |
|
We do not take pull requests against any of the release branches. React Native is continuously developed on master. If you're not willing to support your change on top of master, that's fine -- I'm letting you know what maintainers look for when deciding which pull requests to merge into core. |
See the following link: https://stackoverflow.com/a/23207365 for more info. This does fix the issue, however, another, perhaps related issue persists, the dialog/modal occasionally uses what would be the height of the app in non-immersive mode, in immersive mode. Meaning that the background, what ever it is set as, does not use the full available height.
|
@hramos I've updated the MR |
Generated by 🚫 dangerJS |
|
@hramos Hello, could I get an update on this, thanks. |
|
Would you mind adding a test plan to your PR? |
|
What do you mean by test plan? please be more specific. |
|
The pull request template provides a "Test Plan" section: https://github.com/facebook/react-native/blob/master/.github/PULL_REQUEST_TEMPLATE.md The general idea is to describe, in plain language, how you verified that your change works as intended. It's an important element of a code review, as it lets the reviewer know if there might be a blind spot in your testing where additional bugs may be introduced. |
This comment has been minimized.
This comment has been minimized.
|
@hramos I've added a test plan |
|
This is how to start the app in immersive mode. |
|
|
@hramos ... |
|
Thanks for adding the test plan. It looks like it's lacking a bit of detail. I'm looking for a list of steps you followed to ensure your change fixes the issue, as well as steps followed to ensure no side effects or bugs are introduced. We also will need a CLA to be signed before the code can be merged. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
My testing produced no evidence of any side effects or bugs being introduced. I discovered this issue when attempting to display a dialog (RN Modal) in an immersive (full screen) application I was building. When opening a dialog, it would bring the application out of immersive mode until the dialog was closed again. After a quick Google search, I found that the issue was with Android and not RN (more info). So I applied the fix mentioned in the q&a linked above which resolved the problem. So no specific dedicated testing has been done apart from being able to see that the problem went away after applying the fix. Regarding my previous attempt at writing a test plan, the 'Known Problems' section lists other issues that are similar to this one but are unrelated and are not as a result of this MR.
|
facebook-github-bot
left a comment
There was a problem hiding this comment.
@cpojer has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
…ebook#21078) Summary: This does fix the issue, however, another, perhaps related issue persists, the dialog/modal occasionally uses what would be the height of the app in non-immersive mode, in immersive mode. Meaning that the background, what ever it is set as, does not use the full available height. See https://stackoverflow.com/a/23207365 for more info. Known Problems: --------- * [Date/time picker](https://facebook.github.io/react-native/docs/datepickerandroid) still brings app out of immersive mode - The date/time picker dialog needs the same treatment (this MR) as `RN Modal` using a wrapper. * Focusing on text input, which brings up keyboard, also brings app out of immersive mode. Sometimes temporarily, sometimes permanently - Needs investigating. I have tried [this](https://stackoverflow.com/a/25129542), unfortunately it doesn't work. **Workaround I'm using for this, is to call a native module method to re-apply immersive mode flags after `keyboardDidHide` on JS side.** Changelog: ---------- [Android] [Fixed] - Dialog (RN Modal) brings app permanently out of immersive mode Pull Request resolved: facebook#21078 Differential Revision: D14163127 Pulled By: cpojer fbshipit-source-id: e0b67c91fa81880b19438a939bca26c128309799
This does fix the issue, however, another, perhaps related issue persists, the dialog/modal occasionally uses what would be the height of the app in non-immersive mode, in immersive mode. Meaning that the background, what ever it is set as, does not use the full available height.
See https://stackoverflow.com/a/23207365 for more info.
Known Problems:
RN Modalusing a wrapper.keyboardDidHideon JS side.Changelog:
[Android] [Fixed] - Dialog (RN Modal) brings app permanently out of immersive mode
Test Plan: