-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 NavigationCardStackPanResponder to work with native animations #10642
Closed
janicduplessis
wants to merge
1
commit into
facebook:master
from
janicduplessis:native-driver-gesture-fix
Closed
Fix NavigationCardStackPanResponder to work with native animations #10642
janicduplessis
wants to merge
1
commit into
facebook:master
from
janicduplessis:native-driver-gesture-fix
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
By analyzing the blame information on this pull request, we identified @hedgerwang and @ahanriat to be potential reviewers. |
facebook-github-bot
added
GH Review: review-needed
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
labels
Oct 31, 2016
janicduplessis
force-pushed
the
native-driver-gesture-fix
branch
from
November 1, 2016 09:06
0072f44
to
c536093
Compare
cc @ericvicenti |
Looks pretty safe. Sorry for the late review! |
@facebook-github-bot shipit |
facebook-github-bot
added
GH Review: accepted
Import Started
This pull request has been imported. This does not imply the PR has been approved.
and removed
GH Review: review-needed
labels
Nov 5, 2016
@ericvicenti has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 5, 2016
…rdStackPanResponder Summary: Since native and non-native animations do not work together check if the animated value is native and set useNativeDriver accordingly. So untill we move to always using the native driver this is needed. This and another fix in NativeAnimations module will allow using native animations to transitions with gestures. **Test plan** Tested in an app that uses native driven animations with a back gesture. This also needs #10643 and #10642 for everything to work properly. Closes #10641 Differential Revision: D4135972 Pulled By: ericvicenti fbshipit-source-id: 8e65574ebb296da044f4d03bf1eedee4a37ebdac
mlguys
pushed a commit
to mlguys/react-native
that referenced
this pull request
Nov 8, 2016
…rdStackPanResponder Summary: Since native and non-native animations do not work together check if the animated value is native and set useNativeDriver accordingly. So untill we move to always using the native driver this is needed. This and another fix in NativeAnimations module will allow using native animations to transitions with gestures. **Test plan** Tested in an app that uses native driven animations with a back gesture. This also needs facebook#10643 and facebook#10642 for everything to work properly. Closes facebook#10641 Differential Revision: D4135972 Pulled By: ericvicenti fbshipit-source-id: 8e65574ebb296da044f4d03bf1eedee4a37ebdac
mlguys
pushed a commit
to mlguys/react-native
that referenced
this pull request
Nov 8, 2016
Summary: `NavigationCardStackPanResponder` uses `__getValue` and the `stopAnimation` callback value which both doesn't work with native driven animation. The workaround here is to add a value listener so the JS value of the AnimatedValue gets updated too so `__getValue` has a relatively up to date value. This value should be good unless JS lags behind native a lot but that should not happen during a navigation gesture. Also added a comment that explains the hack. **Test plan** Tested in an app that uses native driven animations with a back gesture. This also needs facebook#10643 and facebook#10641 for everything to work properly. Closes facebook#10642 Differential Revision: D4135496 Pulled By: ericvicenti fbshipit-source-id: 395aff78b16a37ad9407207a05504fdd6311f733
DanielMSchmidt
pushed a commit
to DanielMSchmidt/react-native
that referenced
this pull request
Jan 4, 2017
…rdStackPanResponder Summary: Since native and non-native animations do not work together check if the animated value is native and set useNativeDriver accordingly. So untill we move to always using the native driver this is needed. This and another fix in NativeAnimations module will allow using native animations to transitions with gestures. **Test plan** Tested in an app that uses native driven animations with a back gesture. This also needs facebook#10643 and facebook#10642 for everything to work properly. Closes facebook#10641 Differential Revision: D4135972 Pulled By: ericvicenti fbshipit-source-id: 8e65574ebb296da044f4d03bf1eedee4a37ebdac
DanielMSchmidt
pushed a commit
to DanielMSchmidt/react-native
that referenced
this pull request
Jan 4, 2017
Summary: `NavigationCardStackPanResponder` uses `__getValue` and the `stopAnimation` callback value which both doesn't work with native driven animation. The workaround here is to add a value listener so the JS value of the AnimatedValue gets updated too so `__getValue` has a relatively up to date value. This value should be good unless JS lags behind native a lot but that should not happen during a navigation gesture. Also added a comment that explains the hack. **Test plan** Tested in an app that uses native driven animations with a back gesture. This also needs facebook#10643 and facebook#10641 for everything to work properly. Closes facebook#10642 Differential Revision: D4135496 Pulled By: ericvicenti fbshipit-source-id: 395aff78b16a37ad9407207a05504fdd6311f733
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Import Started
This pull request has been imported. This does not imply the PR has been approved.
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.
NavigationCardStackPanResponder
uses__getValue
and thestopAnimation
callback value which both doesn't work with native driven animation. The workaround here is to add a value listener so the JS value of the AnimatedValue gets updated too so__getValue
has a relatively up to date value. This value should be good unless JS lags behind native a lot but that should not happen during a navigation gesture. Also added a comment that explains the hack.Test plan
Tested in an app that uses native driven animations with a back gesture. This also needs #10643 and #10641 for everything to work properly.