-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
[NavigationTransitioner] Fix animation in fast navigation between scenes #10761
Conversation
By analyzing the blame information on this pull request, we identified @hedgerwang and @ericvicenti to be potential reviewers. |
Thanks for looking into this! Could you possibly post a gist of a sample app that demonstrates this issue? I'd like to look into this further because I'm slightly surprised that this fixes the problem. |
Yes, sure. I created a separate app https://github.com/gitim/NavigationExperimentalAnimation, it is almost the same as an example from UIExplorer. |
Hmm, it is strange, not adding |
cc @janicduplessis, I think this might be a race condition with animated values. Has this changed in recent versions of RN, or has the issue always been there? |
Is it using native animations? There are some race conditions that can happen on iOS, you can test out #10663 if it's the case. |
@ericvicenti I noticed this in 0.31 I think, when NavigationAnimatedView was removed, and I had to transition to NavigationTransitioner. |
@janicduplessis @ericvicenti I checked this with patch from #10663, it doesn't fix the animation. upd: @janicduplessis it is not using native animations |
Ok, seems like this is a minor issue that has been here for a while. The fix makes sense @facebook-github-bot shipit |
Something went wrong when importing this pull request. Please cc someone from the team at fb to help with importing this. |
@facebook-github-bot shipit |
@mkonicek has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: There is a bug in navigation animation: ![-05-2016 16-04-23](https://cloud.githubusercontent.com/assets/3778452/20030228/8d93bc3e-a371-11e6-87d6-2c5c994733b5.gif) navigation animation from route-2 was awful, route-3 scene appeared without any animation, I pushed above example to gitim@46dd8c9. This bug can be reproduced when user navigates to the next scene immediately after navigation to the current one or when navigating between scenes programmatically (e.g. between loading scene and whatever next scene). I made some investigation and It looks like that `progress` should be reseted before building the new _transitionProps. The above example after applying this patch: ![-05-2016 16-12-16](https://cloud.githubusercontent.com/assets/3778452/20030259/a800681e-a372-11e6-847a-991d355a5940.gif) Closes facebook#10761 Differential Revision: D4226864 Pulled By: mkonicek fbshipit-source-id: 31dceb6c8e497b2cbd891bbda4cb3add01cbcca0
There is a bug in navigation animation:
navigation animation from route-2 was awful, route-3 scene appeared without any animation, I pushed above example to gitim@46dd8c9.
This bug can be reproduced when user navigates to the next scene immediately after navigation to the current one or when navigating between scenes programmatically (e.g. between loading scene and whatever next scene). I made some investigation and It looks like that
progress
should be reseted before building the new _transitionProps.The above example after applying this patch: