-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
iOS: Screen
with { presentation: "modal" }
navigated to from within another react-native's Modal
doesn't open
#2048
Comments
yeah, I see why that's happening, thanks for reporting! We will include a fix in incoming release |
@kkafar Any news on an incoming fix ? I have a similar issue that I think could be related to this one :) |
The issue I described (#2085) is similar to this issue. Any news on the potential fix? |
@kkafar Can you please let us know when a possible fix is planned? Thanks! |
Excuse me for late response, @hollanderbart, #2113 should resolve the issue. You can test out the patch by installing "react-native-screens": "software-mansion/react-native-screens#@kkafar/fix-presenting-from-react-native-modal" (watch for typos, as I'm writing from memory 😅) |
Thanks @kkafar I will test it out and come back to you on this. |
I've tested it and your fix works! 🎉 Thanks again @kkafar |
Great, thanks for checking it out! |
## Description Basically this is another edition of the issue #1829 (handled by #1912). The issue comes down to the fact, that our `ScreenStack` is not aware of all modal view controllers being in presentation, but this time it is not aware of third-party modal view controllers (I've named them "foreign" modals in opposite to "owned" modals). This PR is not a comprehensive solution but rather just a patch aiming at fixing one particular interaction reported in #2048. I've left verbose code comments explaining the issue and suggesting solution in the source code, including: ``` // TODO: Find general way to manage owned and foreign modal view controllers and refactor this code. Consider building // model first (data structue, attempting to be aware of all modals in presentation and some text-like algorithm for // computing required operations). ``` Closes #2048 Closes #2085 ## Changes Trigger dissmisal of foreign modal if it is presented above `changeRoot` modal (last modal that is to stay on stack after the updates). ## Test code and steps to reproduce `Test2048` in `TestsExample` & `FabricTestExample`. ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
…mansion#2113) ## Description Basically this is another edition of the issue software-mansion#1829 (handled by software-mansion#1912). The issue comes down to the fact, that our `ScreenStack` is not aware of all modal view controllers being in presentation, but this time it is not aware of third-party modal view controllers (I've named them "foreign" modals in opposite to "owned" modals). This PR is not a comprehensive solution but rather just a patch aiming at fixing one particular interaction reported in software-mansion#2048. I've left verbose code comments explaining the issue and suggesting solution in the source code, including: ``` // TODO: Find general way to manage owned and foreign modal view controllers and refactor this code. Consider building // model first (data structue, attempting to be aware of all modals in presentation and some text-like algorithm for // computing required operations). ``` Closes software-mansion#2048 Closes software-mansion#2085 ## Changes Trigger dissmisal of foreign modal if it is presented above `changeRoot` modal (last modal that is to stay on stack after the updates). ## Test code and steps to reproduce `Test2048` in `TestsExample` & `FabricTestExample`. ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
Description
https://github.com/software-mansion/react-native-screens/releases/tag/3.29.0 and #1912 are causing breaking change in behaviour of
'@react-navigation/native-stack'
'sScreen
that is mounted with{ presentation: "modal" }
.Hiding the
react-native
'sModal
that is the most top component in the view hierarchy preventsScreen
with{ presentation: "modal" }
from showing.My scenario:
BottomSheet
that is based onreact-native
'sModal
with an action buttonBottomSheet
and navigate to{ presentation: "modal" }
individual Screen3.29.0
(3.28.0
here) - desired behaviour3.29.0
- breaking change3.29.0
- withoutBottomSheet
autohideScreen.Recording.2024-02-22.at.16.17.37.mov
RPReplay_Final1708615160.mov
RPReplay_Final1708615180.MP4
Steps to reproduce
3.29.0
) on either physical iPhone or SimulatorBottomSheet
modal & openScreen
modal - seeScreen
is not visible. It's probably mounted using dismissedBottomSheet
modal as an anchor component.setVisible(false)
from line 51 and repeat the process. See the modalScreen
properly mounts.Snack or a link to a repository
https://snack.expo.dev/@bbarthec/react-native-screens-modal-in-modal-issues
Screens version
3.29.0
React Native version
0.73
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: