-
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 setAnimatedNodeValue in Native Animated on iOS #10643
Closed
janicduplessis
wants to merge
1
commit into
facebook:master
from
janicduplessis:animated-ios-set-value
Closed
Fix setAnimatedNodeValue in Native Animated on iOS #10643
janicduplessis
wants to merge
1
commit into
facebook:master
from
janicduplessis:animated-ios-set-value
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 @buba447 and @ryangomba to be potential reviewers. |
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Oct 31, 2016
Looks good to me. Do I have the power to @facebook-github-bot shipit ? |
You can try :) |
@facebook-github-bot shipit |
Looks like not :( @ide can you ship this |
@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
Oct 31, 2016
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
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 5, 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 #10643 and #10641 for everything to work properly. Closes #10642 Differential Revision: D4135496 Pulled By: ericvicenti fbshipit-source-id: 395aff78b16a37ad9407207a05504fdd6311f733
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
aleclarson
pushed a commit
to aleclarson/react-native
that referenced
this pull request
Nov 15, 2016
Summary: `setAnimatedNodeValue` currently does not update views if there is no animation currently running. This simply updates the view immediately instead of relying on the animation loop. Extracted it out in a function to be able to use it for native `Animated.event` too. **Test plan** Tested this in an app using native driven animations with `NavigationCardStackPanResponder` that makes use of `setValue` to update `Animated.Values` during the back gesture. Closes facebook#10643 Differential Revision: D4106346 fbshipit-source-id: 7c639e03ded87058354340f1179f8b75be423e84
ide
pushed a commit
to expo/react-native
that referenced
this pull request
Nov 23, 2016
Summary: `setAnimatedNodeValue` currently does not update views if there is no animation currently running. This simply updates the view immediately instead of relying on the animation loop. Extracted it out in a function to be able to use it for native `Animated.event` too. **Test plan** Tested this in an app using native driven animations with `NavigationCardStackPanResponder` that makes use of `setValue` to update `Animated.Values` during the back gesture. Closes facebook#10643 Differential Revision: D4106346 fbshipit-source-id: 7c639e03ded87058354340f1179f8b75be423e84
ide
pushed a commit
to expo/react-native
that referenced
this pull request
Nov 30, 2016
Summary: `setAnimatedNodeValue` currently does not update views if there is no animation currently running. This simply updates the view immediately instead of relying on the animation loop. Extracted it out in a function to be able to use it for native `Animated.event` too. **Test plan** Tested this in an app using native driven animations with `NavigationCardStackPanResponder` that makes use of `setValue` to update `Animated.Values` during the back gesture. Closes facebook#10643 Differential Revision: D4106346 fbshipit-source-id: 7c639e03ded87058354340f1179f8b75be423e84
DanielMSchmidt
pushed a commit
to DanielMSchmidt/react-native
that referenced
this pull request
Jan 4, 2017
Summary: `setAnimatedNodeValue` currently does not update views if there is no animation currently running. This simply updates the view immediately instead of relying on the animation loop. Extracted it out in a function to be able to use it for native `Animated.event` too. **Test plan** Tested this in an app using native driven animations with `NavigationCardStackPanResponder` that makes use of `setValue` to update `Animated.Values` during the back gesture. Closes facebook#10643 Differential Revision: D4106346 fbshipit-source-id: 7c639e03ded87058354340f1179f8b75be423e84
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.
Platform: iOS
iOS applications.
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.
setAnimatedNodeValue
currently does not update views if there is no animation currently running. This simply updates the view immediately instead of relying on the animation loop. Extracted it out in a function to be able to use it for nativeAnimated.event
too.Test plan
Tested this in an app using native driven animations with
NavigationCardStackPanResponder
that makes use ofsetValue
to updateAnimated.Values
during the back gesture.