-
Notifications
You must be signed in to change notification settings - Fork 25k
Fix Native Rotation Android #18872
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 Native Rotation Android #18872
Conversation
|
@scisci I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
|
I am waiting for this PR :) |
|
@scisci I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
janicduplessis
left a comment
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.
Awesome work, sorry this got lost in my github notifications.
Just one small change to avoid some duplication of the deg parsing logic.
|
@scisci it seems there are some problems with your PR. Would you mind rebasing it on master and making sure the JS tests pass? |
…rpolation and AnimatedTransform
1ceaf73 to
243ca50
Compare
analysis-bot
left a comment
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.
Code analysis results:
eslintfound some issues.
|
@cpojer, I rebased and tests are now passing |
|
@scisci Could you just address the lint issues that the bot pointed out? Especially the one about prettier since it might block landing this. |
|
@janicduplessis I've fixed the eslint errors. |
cpojer
left a comment
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.
Thanks so much for this fix, and bonus points to you for writing a test!
facebook-github-bot
left a comment
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.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Fixes #14161 Android crashes in some cases if an animated transform config contains a string value, like a rotation. This PR fixes that by ensuring all values sent to the native side are doubles. It adds `__transformDataType` to AnimatedTransform.js. Added integration test `ReactAndroid/src/androidText/js/AnimatedTransformTestModule.js` This test fails with the following error `INSTRUMENTATION_RESULT: longMsg=java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double`, if the changes to AnimatedTransform.js are reverted. [Android] [Fixed] - Fixes Android crash on animated style with string rotation Pull Request resolved: #18872 Differential Revision: D13894676 Pulled By: cpojer fbshipit-source-id: 297e8132563460802e53f3ac551c3ba9ed943736
Summary: Fixes facebook#14161 Android crashes in some cases if an animated transform config contains a string value, like a rotation. This PR fixes that by ensuring all values sent to the native side are doubles. It adds `__transformDataType` to AnimatedTransform.js. Added integration test `ReactAndroid/src/androidText/js/AnimatedTransformTestModule.js` This test fails with the following error `INSTRUMENTATION_RESULT: longMsg=java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double`, if the changes to AnimatedTransform.js are reverted. [Android] [Fixed] - Fixes Android crash on animated style with string rotation Pull Request resolved: facebook#18872 Differential Revision: D13894676 Pulled By: cpojer fbshipit-source-id: 297e8132563460802e53f3ac551c3ba9ed943736
Summary: Fixes facebook#14161 Android crashes in some cases if an animated transform config contains a string value, like a rotation. This PR fixes that by ensuring all values sent to the native side are doubles. It adds `__transformDataType` to AnimatedTransform.js. Added integration test `ReactAndroid/src/androidText/js/AnimatedTransformTestModule.js` This test fails with the following error `INSTRUMENTATION_RESULT: longMsg=java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double`, if the changes to AnimatedTransform.js are reverted. [Android] [Fixed] - Fixes Android crash on animated style with string rotation Pull Request resolved: facebook#18872 Differential Revision: D13894676 Pulled By: cpojer fbshipit-source-id: 297e8132563460802e53f3ac551c3ba9ed943736
Fixes #14161
Android crashes in some cases if an animated transform config contains a string value, like a rotation.
This PR fixes that by ensuring all values sent to the native side are doubles. It adds
__transformDataTypeto AnimatedTransform.js.Test Plan
Added integration test
ReactAndroid/src/androidText/js/AnimatedTransformTestModule.jsThis test fails with the following errorINSTRUMENTATION_RESULT: longMsg=java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double, if the changes to AnimatedTransform.js are reverted.changelog
[Android] [Fixed] - Fixes Android crash on animated style with string rotation