-
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
[NativeAnimated][iOS] Add support for value listener #9194
[NativeAnimated][iOS] Add support for value listener #9194
Conversation
@janicduplessis oh snap, thanks for doing this! |
Circle is unhappy, but otherwise looks good to me. Will wait until #8844 is landed. |
@janicduplessis updated the pull request. |
Ok tests should pass now, NativeEventEmitter triggered an invariant because native modules are not defined during tests so I just mocked it. |
6bb8973
to
90ede19
Compare
@janicduplessis updated the pull request. |
@janicduplessis can you rebase? #8844 has been merged too. |
90ede19
to
5e19eea
Compare
@janicduplessis updated the pull request. |
@ide Done! |
@facebook-github-bot shipit |
@facebook-github-bot shipit |
Thanks for importing.If you are an FB employee go to Phabricator to review internal test results. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
@javache Could you check why the import failed? There is no conflict and OSS tests all passed. |
@@ -166,5 +164,5 @@ module.exports = { | |||
generateNewNodeTag, | |||
generateNewAnimationId, | |||
assertNativeAnimatedModule, | |||
supportsNativeListener, |
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.
@janicduplessis just a guess, maybe FB is relying on this. We could stub it out as return true
and try to merge.
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 don't think so, I added it in the Android PR a few days ago.
@foghina maybe :) |
Had a look but this is too iOS-y for me. A build seems to be failing with (I think) this error:
Not sure if this is useful in any way. Leaving this up to @javache to figure out. |
I think I figured out why, some internal apps probably don't include the native |
Thanks @foghina, that stack trace is helpful. "evalmachine" is part of Node's vm module, perhaps this is failing in a Jest test? |
e596fb6
to
98d0553
Compare
@janicduplessis updated the pull request. |
@janicduplessis updated the pull request. |
@ide Looks like it, I had to mock NativeEventEmitter in a test to make it pass but now I changed the NativeEventEmitter creation to be lazy so it won't need to be mocked unless the test uses an animated value listener for a native driven node. |
@facebook-github-bot shipit |
Thanks for importing.If you are an FB employee go to Phabricator to review internal test results. |
0e204e1
Summary: Adds support for `Animated.Value#addListener` for native driven animated values. Same as facebook#8844 but for iOS. This depends on some JS code in facebook#8844 so only review the 2nd commit and let's wait for facebook#8844 to land first. **Test plan** Tested using the UIExplorer example. Closes facebook#9194 Differential Revision: D3681749 fbshipit-source-id: 521a61e2221c1ad1f6f40c75dd2dc957361d0271
Summary: Adds support for `Animated.Value#addListener` for native driven animated values. Same as #8844 but for iOS. This depends on some JS code in #8844 so only review the 2nd commit and let's wait for #8844 to land first. **Test plan** Tested using the UIExplorer example. Closes facebook/react-native#9194 Differential Revision: D3681749 fbshipit-source-id: 521a61e2221c1ad1f6f40c75dd2dc957361d0271
Adds support for
Animated.Value#addListener
for native driven animated values. Same as #8844 but for iOS. This depends on some JS code in #8844 so only review the 2nd commit and let's wait for #8844 to land first.Test plan
Tested using the UIExplorer example.