-
-
Notifications
You must be signed in to change notification settings - Fork 521
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(iOS): select correct VC for nested modal presentation #1912
Merged
Conversation
This file contains 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
kkafar
force-pushed
the
@kkafar/modal-issues
branch
from
October 18, 2023 16:03
7c463a1
to
2022c76
Compare
kkafar
force-pushed
the
@kkafar/modal-issues
branch
from
November 14, 2023 11:40
2022c76
to
efdd12f
Compare
tboba
approved these changes
Dec 7, 2023
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.
LGTM! Great job 🚀
renovate bot
referenced
this pull request
in valora-inc/wallet
Jan 8, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-screens](https://togithub.com/software-mansion/react-native-screens) | [`^3.27.0` -> `^3.29.0`](https://renovatebot.com/diffs/npm/react-native-screens/3.27.0/3.29.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.29.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.29.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.27.0/3.29.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.27.0/3.29.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.29.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.29.0) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.28.0...3.29.0) Minor release including fix for iOS that was accidentally omitted from 3.28.0. It should be now possible to present modal in outer stack, from modal in nested stack (😄 ) #### What's Changed #### 🐛 Bug fixes - fix(iOS): select correct VC for nested modal presentation by [@​kkafar](https://togithub.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1912](https://togithub.com/software-mansion/react-native-screens/pull/1912) **Full Changelog**: software-mansion/react-native-screens@3.28.0...3.29.0 ### [`v3.28.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.28.0) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.27.0...3.28.0) Minor release adding a support for **React Native 0.73**, adding new iOS-like slide animation, fixing crashes with AVPlayer on iOS and resolving build issues on Android. #### What's Changed #### 🐛 Bug fixes - Update status bar & orientation in screen stack fragment by [@​delphinebugner](https://togithub.com/delphinebugner) in [https://github.com/software-mansion/react-native-screens/pull/1934](https://togithub.com/software-mansion/react-native-screens/pull/1934) - Set stateWrapper in ScreenViewManager in Fabric by [@​joemun](https://togithub.com/joemun) in [https://github.com/software-mansion/react-native-screens/pull/1944](https://togithub.com/software-mansion/react-native-screens/pull/1944) - Don't include AVPlayerView in `traverseForScrollView` method by [@​tboba](https://togithub.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1969](https://togithub.com/software-mansion/react-native-screens/pull/1969) - Fix error about duplicate class ViewModelLazy by [@​tboba](https://togithub.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1977](https://togithub.com/software-mansion/react-native-screens/pull/1977) - Move DelayedFreeze setImmediate into an effect by [@​amadeus](https://togithub.com/amadeus) in [https://github.com/software-mansion/react-native-screens/pull/1980](https://togithub.com/software-mansion/react-native-screens/pull/1980) #### 👍 Improvements - Add ios like slide animation by [@​alexandrius](https://togithub.com/alexandrius) in [https://github.com/software-mansion/react-native-screens/pull/1945](https://togithub.com/software-mansion/react-native-screens/pull/1945) #### 🔢 Miscellaneous - Support for RN 0.73 by [@​kkafar](https://togithub.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1956](https://togithub.com/software-mansion/react-native-screens/pull/1956) - Use JDK 17 for CI builds as required for RN 0.73 by [@​kkafar](https://togithub.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1957](https://togithub.com/software-mansion/react-native-screens/pull/1957) - Update Podfile.lock files in example projects by [@​tboba](https://togithub.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1979](https://togithub.com/software-mansion/react-native-screens/pull/1979) #### New Contributors - [@​delphinebugner](https://togithub.com/delphinebugner) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1934](https://togithub.com/software-mansion/react-native-screens/pull/1934) - [@​joemun](https://togithub.com/joemun) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1944](https://togithub.com/software-mansion/react-native-screens/pull/1944) - [@​alexandrius](https://togithub.com/alexandrius) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1945](https://togithub.com/software-mansion/react-native-screens/pull/1945) - [@​amadeus](https://togithub.com/amadeus) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1980](https://togithub.com/software-mansion/react-native-screens/pull/1980) **Full Changelog**: software-mansion/react-native-screens@3.27.0...3.28.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone America/Los_Angeles. 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/valora-inc/wallet). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com>
2 tasks
kkafar
added a commit
that referenced
this pull request
Apr 27, 2024
## 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
This was referenced May 30, 2024
This was referenced Jun 6, 2024
ja1ns
pushed a commit
to WiseOwlTech/react-native-screens
that referenced
this pull request
Oct 9, 2024
…ansion#1912) ## Description Closes software-mansion#1829 Currently it is not possible to navigate to a modal from another modal view that is mounted in JS under nested stack (see software-mansion#1829 description for better context). This is the case, because modal is presented by `RNSNavigationController` corresponding to the stack under which it is mounted in JS ==> UIKit reports that such controller is already presenting. IMO the last presented modal should be the one, to present new one. ## Changes Added code handling above case, by checking whether modals from other stacks are present & using top-most modal for presentation in such case. ## Test code and steps to reproduce See `Test1829` in test example apps ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes (merged only comments after final CI checks)
ja1ns
pushed a commit
to WiseOwlTech/react-native-screens
that referenced
this pull request
Oct 9, 2024
…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
This was referenced Oct 27, 2024
This was referenced Nov 5, 2024
Open
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.
Description
Closes #1829
Currently it is not possible to navigate to a modal from another modal view that is mounted in JS under nested stack (see #1829 description for better context).
This is the case, because modal is presented by
RNSNavigationController
corresponding to the stack under which it is mounted in JS ==> UIKit reports that such controller is already presenting.IMO the last presented modal should be the one, to present new one.
Changes
Added code handling above case, by checking whether modals from other stacks are present & using top-most modal for presentation in such case.
Test code and steps to reproduce
See
Test1829
in test example appsChecklist