-
-
Notifications
You must be signed in to change notification settings - Fork 527
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: don't use AnimatedNativeScreen when stackPresentation prop is not set #2107
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.
Just tested it out on both architectures, LGTM! 🎉
verified this fixed the problem in a release build of the Expensify app |
@@ -79,6 +79,7 @@ export class InnerScreen extends React.Component<ScreenProps> { | |||
// Due to how Yoga resolves layout, we need to have different components for modal nad non-modal screens | |||
const AnimatedScreen = | |||
Platform.OS === 'android' || | |||
stackPresentation === undefined || |
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.
Wouldn't it be better to do something like stackPresentation === 'modal' ? AnimatedNativeModalScreen : AnimatedNativeScreen
- use modal when necessary and regular screen for rest, instead of specifying all the cases where it won't be a modal?
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.
This check will probably be updated when modals on Android
and other types of modals on iOS
by @kkafar will be merged. I'd leave it like that for now and come back to it when it's done but if you feel like it should be done here, then we can do it 🤷♂️
[![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.30.1` -> `^3.31.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.30.1/3.31.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.31.1`](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...7aa5e7b022d2aa55d05f752f7127a6d142b2b44b) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...3.31.1) ### [`v3.31.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.31.0) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.30.1...3.31.0) Minor release including adding support for React Native 0.74 and fixing targets of the touchables on the JS Stack. Thanks for following along! 💙 #### What's Changed #### 🐛 Bug fixes - Don't use AnimatedNativeScreen when stackPresentation prop is not set by [@​WoLewicki](https://togithub.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2107](https://togithub.com/software-mansion/react-native-screens/pull/2107) - Change retrieving window in FullWindowOverlay by [@​tboba](https://togithub.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2031](https://togithub.com/software-mansion/react-native-screens/pull/2031) #### 🔢 Miscellaneous - Bump yarn to latest stable (4.1.1) by [@​maciekstosio](https://togithub.com/maciekstosio) in [https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097) - Add RCT-Image to RNScreens.podspec by [@​WoLewicki](https://togithub.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2089](https://togithub.com/software-mansion/react-native-screens/pull/2089) - Fix emit type parameters by [@​mym0404](https://togithub.com/mym0404) in [https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087) #### New Contributors - [@​mym0404](https://togithub.com/mym0404) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087) - [@​maciekstosio](https://togithub.com/maciekstosio) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097) #### 🙌 Thank you for your contributions! **Full Changelog**: software-mansion/react-native-screens@3.31.0-rc.1...3.31.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <[email protected]>
[![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.30.1` -> `^3.31.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.30.1/3.31.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.31.1`](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...7aa5e7b022d2aa55d05f752f7127a6d142b2b44b) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...3.31.1) ### [`v3.31.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.31.0) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.30.1...3.31.0) Minor release including adding support for React Native 0.74 and fixing targets of the touchables on the JS Stack. Thanks for following along! 💙 #### What's Changed #### 🐛 Bug fixes - Don't use AnimatedNativeScreen when stackPresentation prop is not set by [@​WoLewicki](https://togithub.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2107](https://togithub.com/software-mansion/react-native-screens/pull/2107) - Change retrieving window in FullWindowOverlay by [@​tboba](https://togithub.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2031](https://togithub.com/software-mansion/react-native-screens/pull/2031) #### 🔢 Miscellaneous - Bump yarn to latest stable (4.1.1) by [@​maciekstosio](https://togithub.com/maciekstosio) in [https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097) - Add RCT-Image to RNScreens.podspec by [@​WoLewicki](https://togithub.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2089](https://togithub.com/software-mansion/react-native-screens/pull/2089) - Fix emit type parameters by [@​mym0404](https://togithub.com/mym0404) in [https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087) #### New Contributors - [@​mym0404](https://togithub.com/mym0404) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087) - [@​maciekstosio](https://togithub.com/maciekstosio) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097) #### 🙌 Thank you for your contributions! **Full Changelog**: software-mansion/react-native-screens@3.31.0-rc.1...3.31.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <[email protected]>
…inc#5309) [![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.30.1` -> `^3.31.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.30.1/3.31.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.30.1/3.31.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.31.1`](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...7aa5e7b022d2aa55d05f752f7127a6d142b2b44b) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.31.0...3.31.1) ### [`v3.31.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.31.0) [Compare Source](https://togithub.com/software-mansion/react-native-screens/compare/3.30.1...3.31.0) Minor release including adding support for React Native 0.74 and fixing targets of the touchables on the JS Stack. Thanks for following along! 💙 #### What's Changed #### 🐛 Bug fixes - Don't use AnimatedNativeScreen when stackPresentation prop is not set by [@​WoLewicki](https://togithub.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2107](https://togithub.com/software-mansion/react-native-screens/pull/2107) - Change retrieving window in FullWindowOverlay by [@​tboba](https://togithub.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2031](https://togithub.com/software-mansion/react-native-screens/pull/2031) #### 🔢 Miscellaneous - Bump yarn to latest stable (4.1.1) by [@​maciekstosio](https://togithub.com/maciekstosio) in [https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097) - Add RCT-Image to RNScreens.podspec by [@​WoLewicki](https://togithub.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2089](https://togithub.com/software-mansion/react-native-screens/pull/2089) - Fix emit type parameters by [@​mym0404](https://togithub.com/mym0404) in [https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087) #### New Contributors - [@​mym0404](https://togithub.com/mym0404) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2087](https://togithub.com/software-mansion/react-native-screens/pull/2087) - [@​maciekstosio](https://togithub.com/maciekstosio) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2097](https://togithub.com/software-mansion/react-native-screens/pull/2097) #### 🙌 Thank you for your contributions! **Full Changelog**: software-mansion/react-native-screens@3.31.0-rc.1...3.31.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <[email protected]>
…t set (software-mansion#2107) ## Description All navigators except `native-stack` does not set `stackPresentation` so it resolved in `AnimatedNativeModalScreen` making all navigators that are nested or under some views not work with pressability. Follow-up to software-mansion#2028 ## Changes - Added `undefined` case for setting AnimatedNativeScreen ## Test code and steps to reproduce You can check `Test1214.tsx` or `Test2028.tsx` (after changing import to `@react-navigation/stack`) in order to test targets of touchables. ## Checklist - [x] Ensured that CI passes
Description
All navigators except
native-stack
does not setstackPresentation
so it resolved inAnimatedNativeModalScreen
making all navigators that are nested or under some views not work with pressability. Follow-up to #2028Changes
undefined
case for setting AnimatedNativeScreenTest code and steps to reproduce
You can check
Test1214.tsx
orTest2028.tsx
(after changing import to@react-navigation/stack
) in order to test targets of touchables.Checklist