mirror of
https://github.com/status-im/react-native.git
synced 2025-02-09 16:14:47 +00:00
[React Native] Update code comments about layout-only view
This commit is contained in:
parent
875ab073ea
commit
eb06659711
@ -44,6 +44,12 @@ var AccessibilityTraits = [
|
|||||||
'pageTurn',
|
'pageTurn',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// <<<<< WARNING >>>>>
|
||||||
|
// If adding any properties to View that could change the way layout-only status
|
||||||
|
// works on iOS, make sure to update ReactNativeViewAttributes.js and
|
||||||
|
// RCTShadowView.m (in the -[RCTShadowView isLayoutOnly] method).
|
||||||
|
// <<<<< WARNING >>>>>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The most fundamental component for building UI, `View` is a
|
* The most fundamental component for building UI, `View` is a
|
||||||
* container that supports layout with flexbox, style, some touch handling, and
|
* container that supports layout with flexbox, style, some touch handling, and
|
||||||
|
@ -26,7 +26,11 @@ ReactNativeViewAttributes.UIView = {
|
|||||||
onMagicTap: true,
|
onMagicTap: true,
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
|
|
||||||
// If any below are set, view should not be collapsible!
|
// If editing layout-only view attributes, make sure
|
||||||
|
// -[RCTShadowView isLayoutOnly] in RCTShadowView.m
|
||||||
|
// is up-to-date! If any property below is set, the
|
||||||
|
// view should not be collapsible, but this is done
|
||||||
|
// on the native side.
|
||||||
onMoveShouldSetResponder: true,
|
onMoveShouldSetResponder: true,
|
||||||
onResponderGrant: true,
|
onResponderGrant: true,
|
||||||
onResponderMove: true,
|
onResponderMove: true,
|
||||||
|
@ -439,12 +439,15 @@ static void RCTProcessMetaProps(const float metaProps[META_PROP_COUNT], float st
|
|||||||
@"flex",
|
@"flex",
|
||||||
};
|
};
|
||||||
layoutKeys = [NSSet setWithObjects:layoutKeyStrings count:sizeof(layoutKeyStrings)/sizeof(*layoutKeyStrings)];
|
layoutKeys = [NSSet setWithObjects:layoutKeyStrings count:sizeof(layoutKeyStrings)/sizeof(*layoutKeyStrings)];
|
||||||
|
// layoutKeys are the only keys whose presence does not reject layout-only status.
|
||||||
|
|
||||||
static NSString *const specialKeyStrings[] = {
|
static NSString *const specialKeyStrings[] = {
|
||||||
@"accessible",
|
@"accessible",
|
||||||
@"collapsible",
|
@"collapsible",
|
||||||
};
|
};
|
||||||
specialKeys = [NSSet setWithObjects:specialKeyStrings count:sizeof(specialKeyStrings)/sizeof(*specialKeyStrings)];
|
specialKeys = [NSSet setWithObjects:specialKeyStrings count:sizeof(specialKeyStrings)/sizeof(*specialKeyStrings)];
|
||||||
|
// specialKeys are keys whose presence does not indicate whether layout-only or not
|
||||||
|
// their values must be tested below
|
||||||
}
|
}
|
||||||
|
|
||||||
NSNumber *collapsible = self.allProps[@"collapsible"];
|
NSNumber *collapsible = self.allProps[@"collapsible"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user