microsoft / microsoft/react-native-windows
TransformOrigin Props not parsed or updated
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
### Problem Description
I can see that while applying transform and transformOrigin props, the transform prop is propagated into the platform but transformOrigin is not being propagated into the platform.
Steps To Reproduce
Use the below tsx file and notice the transformOrigin not taking effect:
import` React from 'react';
import { AppRegistry, View, Animated, StyleSheet } from 'react-native';
export default class Bootstrap extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={styles.transformOriginWrapper} >
<Animated.View
style={styles.transformOriginView} />
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center', // Center vertically
alignItems: 'center', // Center horizontally
backgroundColor: 'white', // Optional: set a background color for the parent container
},
transformOriginWrapper: {
borderWidth: 1
},
transformOriginView: {
backgroundColor: 'gray',
width: 100,
height: 100,
transform: [
{ rotate: '-45deg' }
],
transformOrigin: 'bottom right'
},
});
AppRegistry.registerComponent('Bootstrap', () => Bootstrap);
Expected Results
Expected: 45 deg transform should happen at bottom right
CLI version
14.0.0-alpha.2
Environment
info Fetching system and libraries information...
System:
OS: Windows 11 10.0.26252
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
Memory: 14.55 GB / 31.85 GB
Binaries:
Node:
version: 18.18.0
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 1.22.19
path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm:
version: 9.8.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions:
- 10.0.17763.0
- 10.0.18362.0
- 10.0.19041.0
- 10.0.22000.0
- 10.0.22621.0
IDEs:
Android Studio: Not Found
Visual Studio:
- 17.10.35013.160 (Visual Studio Enterprise 2022)
Languages:
Java: Not Found
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Community Modules
No response
Target Platform Version
10.0.22621
Target Device(s)
Desktop
Visual Studio Version
Visual Studio 2022
Build Configuration
Debug
Snack, code example, screenshot, or link to a repository
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the provided TSX example on the React Native Windows desktop target, then trace how transform and transformOrigin styles are parsed and propagated to the platform. Done means transformOrigin is applied so the 45-degree rotation occurs around the bottom-right corner.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100