-
Notifications
You must be signed in to change notification settings - Fork 3k
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 Page Animations #2956
Fix Page Animations #2956
Conversation
@marcaaron I finally get the chance to look at it. But it seems |
Can you elaborate on this some more? The snack you shared doesn't use the drawer navigator, doesn't have animations enabled, etc. So I'm not getting what it proves. Thanks! |
Oh, Yeah. I checked somewhere the issue is linked with StackNavigator. but let me try to completely mimic the code first and grab more intel on it. 🕵️ |
@marcaaron I have not found any strong reason why its not working on IOS. But it seems this could be it software-mansion/react-native-screens#713. I have another solution here. We can use In short, Please let me know, what should be the best away forward here. Thanks. |
Ok. That seems fine to me, but it would be nice if we can avoid creating two separate
this.unsubscribeScreenTransitionHandler = onScreenTransition(navigation, this.callback);
componentWillUnmount() {
this.unsubscribeScreenTransitionHandler();
} I think if we go this route we should also create a new issue to track this open issue so we can clean up the exception made for iOS. |
Yeah, I was planning to create a common event listener instead of ScreenWrapper. Thanks for directions. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
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 leaving a couple follow up comments.
navigation: PropTypes.shape({ | ||
/** Returns to the previous navigation state e.g. if this is inside a Modal we will dismiss it */ | ||
// Method to attach listner to Navigaton state. |
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.
listener to Navigation state.
* @returns {Function} | ||
*/ | ||
function onScreenTransitionEnd(navigation, callback) { | ||
return navigation.addListener('transitionEnd', evt => Str.result(callback, evt)); |
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 Str.result()
vs navigation.addListener('transitionEnd', callback)
?
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 to skip the test if callback is present. But yeah we can jus pass the callback directly.
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.
I will add these in a new PR.
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.
dropped a PR #3228. Thanks.
Please review.
Details
Details can be read #2335 (comment)
Fixed Issues
Fixes #2335Tests / QA Steps
Tested On
Screenshots
Web
animation.mp4
Mobile Web
animation-mWeb.mp4
Desktop
animation-des.mp4
iOS
Not able to record it as I have MAC VM but the animation on IOS works smoothly.
Android
1620411237903.mp4