Skip to content
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

Return final animation values to JS when animation completes #37886

Closed
wants to merge 1 commit into from

Conversation

genkikondo
Copy link
Contributor

Summary:
When using the native driver for animations that involve layout changes (ie. translateY and other transforms, but not styles such as opacity), because it bypasses Fabric, the new coordinates are not updated so the Pressability responder region/tap target is incorrect

This diff:

  • Returning the final values from the native side, at the same place it sets the "finished" flag. This gets sent to JS in animated/animations/Animation.js.

Changelog:
[iOS][Changed] - return animated values to JS for natively driven animations

Reviewed By: rshest

Differential Revision: D46709214

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Jun 14, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46709214

@analysis-bot
Copy link

analysis-bot commented Jun 14, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,757,669 +3
android hermes armeabi-v7a 8,070,237 +0
android hermes x86 9,250,266 +1
android hermes x86_64 9,099,405 +1
android jsc arm64-v8a 9,318,869 -1
android jsc armeabi-v7a 8,508,774 +0
android jsc x86 9,382,361 +2
android jsc x86_64 9,635,606 +1

Base commit: 377a8b7
Branch: main

genkikondo added a commit to genkikondo/react-native that referenced this pull request Jun 14, 2023
…k#37886)

Summary:
Pull Request resolved: facebook#37886

When using the native driver for animations that involve layout changes (ie. translateY and other transforms, but not styles such as opacity), because it bypasses Fabric, the new coordinates are not updated so the Pressability responder region/tap target is incorrect

**This diff:**
- Returning the final values from the native side, at the same place it sets the "finished" flag. This gets sent to JS in `animated/animations/Animation.js`.

Changelog:
[iOS][Changed] - return animated values to JS for natively driven animations

Reviewed By: rshest

Differential Revision: D46709214

fbshipit-source-id: ac1d1b3d1d4b0453d84ef03c898c09a8a4d9b7c1
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46709214

…k#37886)

Summary:
Pull Request resolved: facebook#37886

When using the native driver for animations that involve layout changes (ie. translateY and other transforms, but not styles such as opacity), because it bypasses Fabric, the new coordinates are not updated so the Pressability responder region/tap target is incorrect

**This diff:**
- Returning the final values from the native side, at the same place it sets the "finished" flag. This gets sent to JS in `animated/animations/Animation.js`.

Changelog:
[iOS][Changed] - return animated values to JS for natively driven animations

Reviewed By: rshest

Differential Revision: D46709214

fbshipit-source-id: 00e149cde4c17d76609aa3c3d29e8747d6d16d10
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46709214

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 14, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b0485be.

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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants