-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
feat(iOS): Add slide_from_left
transition
#2057
feat(iOS): Add slide_from_left
transition
#2057
Conversation
slide_from_left
on iOSslide_from_left
transition
@tboba I see android build can not be created due to heap size - I don't know if increasing heap size in gradle properties will help or we should simply switch to Anyway this failure is not because of my changes, since I modified only iOS part 😅 |
@kirillzyusko Yep, you're right - in Screens we have some E2E test case that randomly fails, because of the event when user clicks back button 😅 |
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 left some small comments there. Great job!
ios/RNSScreenStack.mm
Outdated
(topScreen.stackAnimation == RNSScreenStackAnimationSlideFromLeft && | ||
((RNSScreenEdgeGestureRecognizer *)gestureRecognizer).edges == UIRectEdgeRight) || |
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.
Why is this needed? I can't see any issues on RTL mode with and without this case 🤔
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.
@tboba this is needed to activate the gesture from the right side if "slide_from_left" transition is used.
But I guess this condition needs to be slightly modified to support gesture from left side if RTL is active, right?
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.
Yeah, probably it needs to be modified, since on RTL, the default behavior to dismiss the screen is to swipe from the right side, but unfortunately I can't make the reversed slide work 🤔 For some reason, I can still dismiss that screen from the left side. Does it work for you?
8mb.video-TVO-VuQVHAmi.mp4
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.
Yeah, probably it needs to be modified, since on RTL, the default behavior to dismiss the screen is to swipe from the right side, but unfortunately I can't make the reversed slide work 🤔
@tboba I think in normal mode (not RTL) if "slide_from_left" is specified, then the gesture to dismiss should be "right_to_left".
If RTL is active, then we reverse everything - so "slide_from_left" will actually move screen from right to left (as default iOS transition) and the gesture for dismissing should be from left corner (saying shorter - if RTL + "slide_from_left" is specified, then it should work as usual/default iOS transition, because it's kind of double inversion).
Is my understanding correct?
On your video - did you specify customAnimationOnSwipe
property? Because without this property you're right - the gesture to close should start from left corner and should have default transition (even if custom transition was specified).
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.
On your video - did you specify customAnimationOnSwipe property?
I'm asking because this condition can be executed only if customAnimationOnSwipe
specified.
// Now we're dealing with RNSScreenEdgeGestureRecognizer (or _UIParallaxTransitionPanGestureRecognizer)
if (topScreen.customAnimationOnSwipe && [RNSScreenStackAnimator isCustomAnimation:topScreen.stackAnimation]) {
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.
@tboba I re-worked this condition according to my comment - feel free to test it 🙌
I also added named variables to simplify condition and made it more readable 😊
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.
Great, I'll try to test them today! Thanks 🙌
If RTL is active, then we reverse everything - so "slide_from_left" will actually move screen from right to left (as default iOS transition) and the gesture for dismissing should be from left corner (saying shorter - if RTL + "slide_from_left" is specified, then it should work as usual/default iOS transition, because it's kind of double inversion).
Yep, you're right - currently, the default animation comes from the right side to the left and is rotated when user is in RTL mode - I think in slide_to_left
transition it should be opposite!
I also forgot about the customAnimationOnSwipe
prop 😅 I'll check it out 👍
@tboba tests are failing because ANR popup is shown: I think if you want to make your tests more reliable you should follow this guide https://wix.github.io/Detox/docs/19.x/introduction/android/#8-test-butler-support-optional I added it my RNKC package and Android tests are more stable now than iOS 😂 Let me know if you need my help - I can try to submit a PR with a fix 👀 |
@kirillzyusko Yeah, sure! I didn't know about a Test Butler yet, so if you think this may help our CIs, and you have some free time, then why not 🙌 |
@tboba cool, will handle it in separate PR then 👀 |
@kirillzyusko Since PR with CI is already merged, could you merge main to this PR? 🙏 |
1deddf8
to
ce5dc7d
Compare
@tboba just rebased it 👀 |
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 work 🎉
## Description Before `slide_from_left` transition was resolved to default transition on iOS. Now this transition will make screen to appear from left side to right. ## Changes - updated docs; - added `RNSScreenStackAnimationSlideFromLeft` to enum value; - added `animateSlideFromLeftWithTransitionContext` method; - added support for reverse gestures (from right to left to close a screen); ## Screenshots / GIFs https://github.com/software-mansion/react-native-screens/assets/22820318/e0a71147-0aea-47ef-9d4b-319d7fd8dd81 ## Test code and steps to reproduce - Open `Animations` screen - select `slide_from_left` animation - open "New screen" - if you want to test gesture for dismissing the screen, you'll need to specify `<Stack.Screen name="Screen" options={{ customAnimationOnSwipe: true }}>` ## Checklist - [x] Included code example that can be used to test this change - [x] Updated TS types - [x] Updated documentation: <!-- For adding new props to native-stack --> - [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [x] Ensured that CI passes
[![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://github.com/software-mansion/react-native-screens) | [`^3.29.0` -> `^3.30.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.29.0/3.30.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.30.1`](https://github.com/software-mansion/react-native-screens/releases/tag/3.30.1) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.30.0...3.30.1) Patch release addressing an issue with building a package due to the missing submodule from `postinstall` command. #### 🔢 Miscellaneous - Remove postinstall step from package.json by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2081](https://github.com/software-mansion/react-native-screens/pull/2081) **Full Changelog**: software-mansion/react-native-screens@3.30.0...3.30.1 ### [`v3.30.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.30.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.29.0...3.30.0) Minor release including custom screen transitions, adding support for VisionOS, supporting `slide_from_left` animation on iOS and fixing other aspects (including wrong targets for touchable components on Fabric). Thanks for following along! 💙 **Note**: Please note that support for React Native versions lower than 0.68 have been **dropped**. Older versions may still continue to work with this and newer releases of react-native-screens, but bugs from deprecated versions will not be considered for repair. #### What's Changed #### 👍 Improvements - **Custom screen transitions** - In 3.30.0, we've introduced a support for custom transition animations while making a "go back" gesture. Made by [@​piaskowyk](https://github.com/piaskowyk) and [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1913](https://github.com/software-mansion/react-native-screens/pull/1913) - **Support for VisionOS is here!** - From now, react-native-screens offers bundled support for VisionOS platform. Made by [@​okwasniewski](https://github.com/okwasniewski) in [https://github.com/software-mansion/react-native-screens/pull/2025](https://github.com/software-mansion/react-native-screens/pull/2025) - **`slide_from_left` transition on iOS** - You can use `slide_from_left` animation that will be used for pushing or popping a new screen. Made by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/2057](https://github.com/software-mansion/react-native-screens/pull/2057) - Add `cancelSearch` command on SearchBar by [@​Jasonzj](https://github.com/Jasonzj) in [https://github.com/software-mansion/react-native-screens/pull/1987](https://github.com/software-mansion/react-native-screens/pull/1987) - Fixed Android screen stack animation by [@​janicduplessis](https://github.com/janicduplessis) in [https://github.com/software-mansion/react-native-screens/pull/2019](https://github.com/software-mansion/react-native-screens/pull/2019) #### 🐛 Bug fixes - Not working hitslop for headerRight/Left views by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1995](https://github.com/software-mansion/react-native-screens/pull/1995) - App freeze when navigating back from any modal nested in contained modal by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1996](https://github.com/software-mansion/react-native-screens/pull/1996) - Incorrect safe area on transparent modals using landscape orientation by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2008](https://github.com/software-mansion/react-native-screens/pull/2008) - Invalid orientation of contained modals by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2011](https://github.com/software-mansion/react-native-screens/pull/2011) - Modify the decorFitsSystemWindow parameter in setNavigationBarHidden by [@​jiyong1](https://github.com/jiyong1) in [https://github.com/software-mansion/react-native-screens/pull/1988](https://github.com/software-mansion/react-native-screens/pull/1988) - Avoid race condition related to state on the new arch by [@​j-piasecki](https://github.com/j-piasecki) in [https://github.com/software-mansion/react-native-screens/pull/2024](https://github.com/software-mansion/react-native-screens/pull/2024) - Check for multiple screens while changing screen orientation by [@​uzegonemad](https://github.com/uzegonemad) in [https://github.com/software-mansion/react-native-screens/pull/2035](https://github.com/software-mansion/react-native-screens/pull/2035) - Fix setting incorrect measure with native header by [@​WoLewicki](https://github.com/WoLewicki) and [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2028](https://github.com/software-mansion/react-native-screens/pull/2028) - Add notifying for header height change, fix header height values by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2075](https://github.com/software-mansion/react-native-screens/pull/2075) - Change context while running `runOnUiQueueThread` on 0.73 with Bridgeless by [@​cortinico](https://github.com/cortinico) in [https://github.com/software-mansion/react-native-screens/pull/2022](https://github.com/software-mansion/react-native-screens/pull/2022) - Use reactApplicationContext in onScreenChanged by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2046](https://github.com/software-mansion/react-native-screens/pull/2046) - Remove calculating status bar height in useAnimatedHeaderHeight when header is not shown by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2033](https://github.com/software-mansion/react-native-screens/pull/2033) - Handle setting `display` for `_viewConfig` attribute by [@​WoLewicki](https://github.com/WoLewicki) and [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2071](https://github.com/software-mansion/react-native-screens/pull/2071) - Fix crash with searchResultsController in RNSSearchBar by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2004](https://github.com/software-mansion/react-native-screens/pull/2004) - Add constraints for velocity in `goBackGesture` screen transition by [@​piaskowyk](https://github.com/piaskowyk) in [https://github.com/software-mansion/react-native-screens/pull/2061](https://github.com/software-mansion/react-native-screens/pull/2061) - Add view check for getting StackView in `goBackGesture` by [@​piaskowyk](https://github.com/piaskowyk) in [https://github.com/software-mansion/react-native-screens/pull/2060](https://github.com/software-mansion/react-native-screens/pull/2060) - Change default value of context of ScreenGestureDetector, add warning for goBackGesture by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2013](https://github.com/software-mansion/react-native-screens/pull/2013) - Move GHContext from gesture-handler to native-stack by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2017](https://github.com/software-mansion/react-native-screens/pull/2017) - Change default gesture from Tap to Fling, fix failing CI by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2023](https://github.com/software-mansion/react-native-screens/pull/2023) #### 🔢 Miscellaneous - **Drop React Native 0.64 - 0.67 since 3.30.0** by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2036](https://github.com/software-mansion/react-native-screens/pull/2036) - Remove mixed CJS/ESM, refactorize index.native.tsx by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1982](https://github.com/software-mansion/react-native-screens/pull/1982) - Add react-navigation as submodule & use it in test applications by [@​kkafar](https://github.com/kkafar) and [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1993](https://github.com/software-mansion/react-native-screens/pull/1993) - Unify member-field naming convention in Kotlin by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1999](https://github.com/software-mansion/react-native-screens/pull/1999) - Update compatibility table with supported RN versions with Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/2001](https://github.com/software-mansion/react-native-screens/pull/2001) - Change name of `headerBackButtonClicked` event by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2015](https://github.com/software-mansion/react-native-screens/pull/2015) - Stabilize Android E2E tests by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/2062](https://github.com/software-mansion/react-native-screens/pull/2062) - Update Podfiles in Example projects, update RN in FabricExample to 0.73 by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1989](https://github.com/software-mansion/react-native-screens/pull/1989) - Update React Native to 0.73.4, change Cocoapods version by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2032](https://github.com/software-mansion/react-native-screens/pull/2032) - Configure yarn version in package.json by [@​bakkerjoeri](https://github.com/bakkerjoeri) in [https://github.com/software-mansion/react-native-screens/pull/2077](https://github.com/software-mansion/react-native-screens/pull/2077) - Bump ip from 1.1.8 to 1.1.9 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/2038](https://github.com/software-mansion/react-native-screens/pull/2038) - Bump ip from 1.1.8 to 1.1.9 in example apps by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2044](https://github.com/software-mansion/react-native-screens/pull/2044) #### New Contributors - [@​jiyong1](https://github.com/jiyong1) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1988](https://github.com/software-mansion/react-native-screens/pull/1988) - [@​Jasonzj](https://github.com/Jasonzj) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1987](https://github.com/software-mansion/react-native-screens/pull/1987) - [@​j-piasecki](https://github.com/j-piasecki) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2024](https://github.com/software-mansion/react-native-screens/pull/2024) - [@​cortinico](https://github.com/cortinico) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2022](https://github.com/software-mansion/react-native-screens/pull/2022) - [@​okwasniewski](https://github.com/okwasniewski) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2025](https://github.com/software-mansion/react-native-screens/pull/2025) - [@​uzegonemad](https://github.com/uzegonemad) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2035](https://github.com/software-mansion/react-native-screens/pull/2035) - [@​bakkerjoeri](https://github.com/bakkerjoeri) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2077](https://github.com/software-mansion/react-native-screens/pull/2077) #### 🙌 Thank you for your contributions! **Full Changelog**: software-mansion/react-native-screens@3.29.0...3.30.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com>
…inc#5239) [![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://github.com/software-mansion/react-native-screens) | [`^3.29.0` -> `^3.30.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.29.0/3.30.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.30.1`](https://github.com/software-mansion/react-native-screens/releases/tag/3.30.1) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.30.0...3.30.1) Patch release addressing an issue with building a package due to the missing submodule from `postinstall` command. #### 🔢 Miscellaneous - Remove postinstall step from package.json by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2081](https://github.com/software-mansion/react-native-screens/pull/2081) **Full Changelog**: software-mansion/react-native-screens@3.30.0...3.30.1 ### [`v3.30.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.30.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.29.0...3.30.0) Minor release including custom screen transitions, adding support for VisionOS, supporting `slide_from_left` animation on iOS and fixing other aspects (including wrong targets for touchable components on Fabric). Thanks for following along! 💙 **Note**: Please note that support for React Native versions lower than 0.68 have been **dropped**. Older versions may still continue to work with this and newer releases of react-native-screens, but bugs from deprecated versions will not be considered for repair. #### What's Changed #### 👍 Improvements - **Custom screen transitions** - In 3.30.0, we've introduced a support for custom transition animations while making a "go back" gesture. Made by [@​piaskowyk](https://github.com/piaskowyk) and [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1913](https://github.com/software-mansion/react-native-screens/pull/1913) - **Support for VisionOS is here!** - From now, react-native-screens offers bundled support for VisionOS platform. Made by [@​okwasniewski](https://github.com/okwasniewski) in [https://github.com/software-mansion/react-native-screens/pull/2025](https://github.com/software-mansion/react-native-screens/pull/2025) - **`slide_from_left` transition on iOS** - You can use `slide_from_left` animation that will be used for pushing or popping a new screen. Made by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/2057](https://github.com/software-mansion/react-native-screens/pull/2057) - Add `cancelSearch` command on SearchBar by [@​Jasonzj](https://github.com/Jasonzj) in [https://github.com/software-mansion/react-native-screens/pull/1987](https://github.com/software-mansion/react-native-screens/pull/1987) - Fixed Android screen stack animation by [@​janicduplessis](https://github.com/janicduplessis) in [https://github.com/software-mansion/react-native-screens/pull/2019](https://github.com/software-mansion/react-native-screens/pull/2019) #### 🐛 Bug fixes - Not working hitslop for headerRight/Left views by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1995](https://github.com/software-mansion/react-native-screens/pull/1995) - App freeze when navigating back from any modal nested in contained modal by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1996](https://github.com/software-mansion/react-native-screens/pull/1996) - Incorrect safe area on transparent modals using landscape orientation by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2008](https://github.com/software-mansion/react-native-screens/pull/2008) - Invalid orientation of contained modals by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2011](https://github.com/software-mansion/react-native-screens/pull/2011) - Modify the decorFitsSystemWindow parameter in setNavigationBarHidden by [@​jiyong1](https://github.com/jiyong1) in [https://github.com/software-mansion/react-native-screens/pull/1988](https://github.com/software-mansion/react-native-screens/pull/1988) - Avoid race condition related to state on the new arch by [@​j-piasecki](https://github.com/j-piasecki) in [https://github.com/software-mansion/react-native-screens/pull/2024](https://github.com/software-mansion/react-native-screens/pull/2024) - Check for multiple screens while changing screen orientation by [@​uzegonemad](https://github.com/uzegonemad) in [https://github.com/software-mansion/react-native-screens/pull/2035](https://github.com/software-mansion/react-native-screens/pull/2035) - Fix setting incorrect measure with native header by [@​WoLewicki](https://github.com/WoLewicki) and [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2028](https://github.com/software-mansion/react-native-screens/pull/2028) - Add notifying for header height change, fix header height values by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2075](https://github.com/software-mansion/react-native-screens/pull/2075) - Change context while running `runOnUiQueueThread` on 0.73 with Bridgeless by [@​cortinico](https://github.com/cortinico) in [https://github.com/software-mansion/react-native-screens/pull/2022](https://github.com/software-mansion/react-native-screens/pull/2022) - Use reactApplicationContext in onScreenChanged by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2046](https://github.com/software-mansion/react-native-screens/pull/2046) - Remove calculating status bar height in useAnimatedHeaderHeight when header is not shown by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2033](https://github.com/software-mansion/react-native-screens/pull/2033) - Handle setting `display` for `_viewConfig` attribute by [@​WoLewicki](https://github.com/WoLewicki) and [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2071](https://github.com/software-mansion/react-native-screens/pull/2071) - Fix crash with searchResultsController in RNSSearchBar by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2004](https://github.com/software-mansion/react-native-screens/pull/2004) - Add constraints for velocity in `goBackGesture` screen transition by [@​piaskowyk](https://github.com/piaskowyk) in [https://github.com/software-mansion/react-native-screens/pull/2061](https://github.com/software-mansion/react-native-screens/pull/2061) - Add view check for getting StackView in `goBackGesture` by [@​piaskowyk](https://github.com/piaskowyk) in [https://github.com/software-mansion/react-native-screens/pull/2060](https://github.com/software-mansion/react-native-screens/pull/2060) - Change default value of context of ScreenGestureDetector, add warning for goBackGesture by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2013](https://github.com/software-mansion/react-native-screens/pull/2013) - Move GHContext from gesture-handler to native-stack by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2017](https://github.com/software-mansion/react-native-screens/pull/2017) - Change default gesture from Tap to Fling, fix failing CI by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2023](https://github.com/software-mansion/react-native-screens/pull/2023) #### 🔢 Miscellaneous - **Drop React Native 0.64 - 0.67 since 3.30.0** by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2036](https://github.com/software-mansion/react-native-screens/pull/2036) - Remove mixed CJS/ESM, refactorize index.native.tsx by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1982](https://github.com/software-mansion/react-native-screens/pull/1982) - Add react-navigation as submodule & use it in test applications by [@​kkafar](https://github.com/kkafar) and [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1993](https://github.com/software-mansion/react-native-screens/pull/1993) - Unify member-field naming convention in Kotlin by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1999](https://github.com/software-mansion/react-native-screens/pull/1999) - Update compatibility table with supported RN versions with Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/2001](https://github.com/software-mansion/react-native-screens/pull/2001) - Change name of `headerBackButtonClicked` event by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/2015](https://github.com/software-mansion/react-native-screens/pull/2015) - Stabilize Android E2E tests by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/2062](https://github.com/software-mansion/react-native-screens/pull/2062) - Update Podfiles in Example projects, update RN in FabricExample to 0.73 by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1989](https://github.com/software-mansion/react-native-screens/pull/1989) - Update React Native to 0.73.4, change Cocoapods version by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2032](https://github.com/software-mansion/react-native-screens/pull/2032) - Configure yarn version in package.json by [@​bakkerjoeri](https://github.com/bakkerjoeri) in [https://github.com/software-mansion/react-native-screens/pull/2077](https://github.com/software-mansion/react-native-screens/pull/2077) - Bump ip from 1.1.8 to 1.1.9 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/2038](https://github.com/software-mansion/react-native-screens/pull/2038) - Bump ip from 1.1.8 to 1.1.9 in example apps by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/2044](https://github.com/software-mansion/react-native-screens/pull/2044) #### New Contributors - [@​jiyong1](https://github.com/jiyong1) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1988](https://github.com/software-mansion/react-native-screens/pull/1988) - [@​Jasonzj](https://github.com/Jasonzj) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1987](https://github.com/software-mansion/react-native-screens/pull/1987) - [@​j-piasecki](https://github.com/j-piasecki) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2024](https://github.com/software-mansion/react-native-screens/pull/2024) - [@​cortinico](https://github.com/cortinico) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2022](https://github.com/software-mansion/react-native-screens/pull/2022) - [@​okwasniewski](https://github.com/okwasniewski) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2025](https://github.com/software-mansion/react-native-screens/pull/2025) - [@​uzegonemad](https://github.com/uzegonemad) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2035](https://github.com/software-mansion/react-native-screens/pull/2035) - [@​bakkerjoeri](https://github.com/bakkerjoeri) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/2077](https://github.com/software-mansion/react-native-screens/pull/2077) #### 🙌 Thank you for your contributions! **Full Changelog**: software-mansion/react-native-screens@3.29.0...3.30.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com>
## Description Before `slide_from_left` transition was resolved to default transition on iOS. Now this transition will make screen to appear from left side to right. ## Changes - updated docs; - added `RNSScreenStackAnimationSlideFromLeft` to enum value; - added `animateSlideFromLeftWithTransitionContext` method; - added support for reverse gestures (from right to left to close a screen); ## Screenshots / GIFs https://github.com/software-mansion/react-native-screens/assets/22820318/e0a71147-0aea-47ef-9d4b-319d7fd8dd81 ## Test code and steps to reproduce - Open `Animations` screen - select `slide_from_left` animation - open "New screen" - if you want to test gesture for dismissing the screen, you'll need to specify `<Stack.Screen name="Screen" options={{ customAnimationOnSwipe: true }}>` ## Checklist - [x] Included code example that can be used to test this change - [x] Updated TS types - [x] Updated documentation: <!-- For adding new props to native-stack --> - [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [x] Ensured that CI passes
Description
Before
slide_from_left
transition was resolved to default transition on iOS. Now this transition will make screen to appear from left side to right.Changes
RNSScreenStackAnimationSlideFromLeft
to enum value;animateSlideFromLeftWithTransitionContext
method;Screenshots / GIFs
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-05.at.17.44.39.mp4
Test code and steps to reproduce
Animations
screenslide_from_left
animation<Stack.Screen name="Screen" options={{ customAnimationOnSwipe: true }}>
Checklist