Add native view config for {margin,padding}{block,inline} props

Summary:
The margin/padding props were introduced in this diff: D41267765

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D56846578

fbshipit-source-id: 396cab3fdd63d9c630690157a385f1ae53208bb7
This commit is contained in:
Ramanpreet Nara
2024-05-02 12:46:05 -07:00
committed by Facebook GitHub Bot
parent 063ae7d3e8
commit 457372c87e
3 changed files with 128 additions and 0 deletions
@@ -541,6 +541,48 @@ RCT_EXPORT_SHADOW_PROPERTY(marginVertical, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(marginHorizontal, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(margin, YGValue)
RCT_CUSTOM_SHADOW_PROPERTY(marginBlock, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(marginBlockEnd, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(marginBlockStart, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(marginInline, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(marginInlineEnd, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(marginInlineStart, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_EXPORT_SHADOW_PROPERTY(paddingTop, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(paddingRight, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(paddingBottom, YGValue)
@@ -551,6 +593,48 @@ RCT_EXPORT_SHADOW_PROPERTY(paddingVertical, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(paddingHorizontal, YGValue)
RCT_EXPORT_SHADOW_PROPERTY(padding, YGValue)
RCT_CUSTOM_SHADOW_PROPERTY(paddingBlock, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(paddingBlockEnd, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(paddingBlockStart, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(paddingInline, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(paddingInlineEnd, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_CUSTOM_SHADOW_PROPERTY(paddingInlineStart, YGValue, RCTView)
{
// Property is only to be used in the new renderer.
// It is necessary to add it here, otherwise it gets
// filtered by view configs.
}
RCT_EXPORT_SHADOW_PROPERTY(flex, float)
RCT_EXPORT_SHADOW_PROPERTY(flexGrow, float)
RCT_EXPORT_SHADOW_PROPERTY(flexShrink, float)
@@ -4150,12 +4150,16 @@ public class com/facebook/react/uimanager/LayoutShadowNode : com/facebook/react/
public fun setInsetInline (ILcom/facebook/react/bridge/Dynamic;)V
public fun setJustifyContent (Ljava/lang/String;)V
public fun setLayoutConformance (Ljava/lang/String;)V
public fun setMarginBlock (ILcom/facebook/react/bridge/Dynamic;)V
public fun setMarginInline (ILcom/facebook/react/bridge/Dynamic;)V
public fun setMargins (ILcom/facebook/react/bridge/Dynamic;)V
public fun setMaxHeight (Lcom/facebook/react/bridge/Dynamic;)V
public fun setMaxWidth (Lcom/facebook/react/bridge/Dynamic;)V
public fun setMinHeight (Lcom/facebook/react/bridge/Dynamic;)V
public fun setMinWidth (Lcom/facebook/react/bridge/Dynamic;)V
public fun setOverflow (Ljava/lang/String;)V
public fun setPaddingBlock (ILcom/facebook/react/bridge/Dynamic;)V
public fun setPaddingInline (ILcom/facebook/react/bridge/Dynamic;)V
public fun setPaddings (ILcom/facebook/react/bridge/Dynamic;)V
public fun setPosition (Ljava/lang/String;)V
public fun setPositionValues (ILcom/facebook/react/bridge/Dynamic;)V
@@ -717,6 +717,46 @@ public class LayoutShadowNode extends ReactShadowNodeImpl {
}
}
@ReactPropGroup(
names = {
"marginBlock",
"marginBlockEnd",
"marginBlockStart",
})
public void setMarginBlock(int index, Dynamic margin) {
// Do Nothing: Align with static ViewConfigs
}
@ReactPropGroup(
names = {
"marginInline",
"marginInlineEnd",
"marginInlineStart",
})
public void setMarginInline(int index, Dynamic margin) {
// Do Nothing: Align with static ViewConfigs
}
@ReactPropGroup(
names = {
"paddingBlock",
"paddingBlockEnd",
"paddingBlockStart",
})
public void setPaddingBlock(int index, Dynamic padding) {
// Do Nothing: Align with static ViewConfigs
}
@ReactPropGroup(
names = {
"paddingInline",
"paddingInlineEnd",
"paddingInlineStart",
})
public void setPaddingInline(int index, Dynamic padding) {
// Do Nothing: Align with static ViewConfigs
}
@ReactPropGroup(
names = {
"insetBlock",