Skip to content

Return final animation values to JS when animation completes#37886

Closed
genkikondo wants to merge 1 commit into
facebook:mainfrom
genkikondo:export-D46709214
Closed

Return final animation values to JS when animation completes#37886
genkikondo wants to merge 1 commit into
facebook:mainfrom
genkikondo:export-D46709214

Conversation

@genkikondo
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@analysis-bot
Copy link
Copy Markdown

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

Summary:
Pull Request resolved: #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
Copy Markdown
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
Copy Markdown
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