-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Unify platform behavior of processTransform #33579
Conversation
Base commit: a21a1f8 |
Base commit: a21a1f8 |
Does React Native Web need this code? |
Ah, Is that the other platform? Was trying to work out why this if existed at all. -- Shouldn't that be something that react-native-web can change? This will likely be a change for many out of tree platforms. But I'd rather have the default match ios/android, and platforms can fork this code back if they want to maintain the old behavior or update their projection to native to handle the new format. As it stands, we have to fork the code to align with core, which seems like the wrong way around. |
I couldn't find anything related in the react native web repository. They have their own implementation of the StyleSheet API. Much more now in the new version that is about to be deployed in necolas/react-native-web#2248 |
cc @cortinico |
Can we get a rebase + have the CI green before we import/merge this @acoates-ms ? |
@cortinico - Done. |
It would be great if you could also remove the MatrixMath.js helper, it was only used by the processTransform.js |
@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This pull request was successfully merged by @acoates-ms in ee33385. When will my fix make it into a release? | Upcoming Releases |
Summary: Currently both iOS and Android send over the list of transforms as an array. But there is an if statement that causes other platforms to get a matrix. This prevents other platforms from being able to use the fabric ViewProps class and the conversion functions as they exist in core, as those expect the transforms to be an array. Stop special casing iOS and android. - Which will allow for example Windows to be able to share more fabric code. ## Changelog [Internal] [Changed] - All platforms should get transform sent to native as an array of transform operations instead of a matrix Pull Request resolved: facebook#33579 Test Plan: Similar change made in react-native-windows. microsoft/react-native-windows#9797 Reviewed By: NickGerleman Differential Revision: D38615676 Pulled By: cortinico fbshipit-source-id: 8861afe6bf34bebb09dd82f7365faf007dd79cbf
Summary: Currently both iOS and Android send over the list of transforms as an array. But there is an if statement that causes other platforms to get a matrix. This prevents other platforms from being able to use the fabric ViewProps class and the conversion functions as they exist in core, as those expect the transforms to be an array. Stop special casing iOS and android. - Which will allow for example Windows to be able to share more fabric code. ## Changelog [Internal] [Changed] - All platforms should get transform sent to native as an array of transform operations instead of a matrix Pull Request resolved: facebook#33579 Test Plan: Similar change made in react-native-windows. microsoft/react-native-windows#9797 Reviewed By: NickGerleman Differential Revision: D38615676 Pulled By: cortinico fbshipit-source-id: 8861afe6bf34bebb09dd82f7365faf007dd79cbf
Currently both iOS and Android send over the list of transforms as an array. But there is an if statement that causes other platforms to get a matrix. This prevents other platforms from being able to use the fabric ViewProps class and the conversion functions as they exist in core, as those expect the transforms to be an array.
Summary
Stop special casing iOS and android. - Which will allow for example Windows to be able to share more fabric code.
Changelog
[Internal] [Changed] - All platforms should get transform sent to native as an array of transform operations instead of a matrix
Test Plan
Similar change made in react-native-windows.
microsoft/react-native-windows#9797