feat: replace OnLayoutEvent with SvgOnLayoutEvent#2738
feat: replace OnLayoutEvent with SvgOnLayoutEvent#2738WoLewicki merged 9 commits intosoftware-mansion:mainfrom
Conversation
4e34ac9 to
c7b0311
Compare
9541ccb to
89543b6
Compare
|
We'd love to see it merged as |
| x: Int32; | ||
| y: Int32; | ||
| width: Int32; | ||
| height: Int32; |
There was a problem hiding this comment.
Are you sure it should be Int instead of Float?
There was a problem hiding this comment.
During implementation I was looking at official RN code: https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/OnLayoutEvent.kt
And there they have ints
There was a problem hiding this comment.
Also when we look at the creation of SVGOnLayoutEvent inside VirtualView we pass to this event Ints:
https://github.com/software-mansion/react-native-svg/pull/2738/files#diff-b99e5fc93019444c57df66f6135a6ff9c28d881abe126fc0adb12773b24a7193R608
1996b31 to
62b9d78
Compare
WoLewicki
left a comment
There was a problem hiding this comment.
LGTM! Please make sure that it works on both archs and platforms and I think we are good with merging it.
Summary
This PR creates
SvgOnLayoutEventand replaces usage ofOnLayoutEventfor Android because React Native Android team will remove this event from their codebase in near future.Test Plan
Verified that the onLayout event emitted by Svg produces the same payload before and after this change.
Steps:
Result:
Event payload structure and values remained identical
Compatibility
Checklist