Updates the logic for applying the layout metrics, which needs to be customized due to nested structure of the button on the new architecture - instead of being just a button view, it's a button view inside a custom ViewComponentView.
Previously all metrics were applied to the wrapper view (including padding and border insets) which caused the button to be offset in the wrapper and it's content was offset again (due to children being mounted under the button instead of the wrapper and their layout metrics containing frame position).
This PR changes that so that insets are not applied to the wrapper view at all and the button always fills the container. This way the layout of the children remains correct.
Test plan
Tested on the FabricExample app and on the reproducer from the issue.
Description
Fixes https://github.com/software-mansion/react-native-gesture-handler/issues/3100
Updates the logic for applying the layout metrics, which needs to be customized due to nested structure of the button on the new architecture - instead of being just a button view, it's a button view inside a custom
ViewComponentView
.Previously all metrics were applied to the wrapper view (including padding and border insets) which caused the button to be offset in the wrapper and it's content was offset again (due to children being mounted under the button instead of the wrapper and their layout metrics containing frame position).
This PR changes that so that insets are not applied to the wrapper view at all and the button always fills the container. This way the layout of the children remains correct.
Test plan
Tested on the FabricExample app and on the reproducer from the issue.