Skip to content

Commit

Permalink
Back out "Plumbing to get boxSizing prop to Yoga" (#46794)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #46794

Original commit changeset: f57e9a51236c

Original Phabricator Diff: D63430964

Seeing some issues with this so gonna turn it off for the meantime.

Changelog: [Internal]

Differential Revision: D63777437

fbshipit-source-id: fe8abd0110b2cf7296911c5b1e95ada40d30994c
  • Loading branch information
joevilches authored and facebook-github-bot committed Oct 2, 2024
1 parent 32dd52e commit 5e47ef9
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
borderRightWidth: true,
borderStartWidth: true,
borderTopWidth: true,
boxSizing: true,
columnGap: true,
borderWidth: true,
bottom: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ const validAttributesForNonEventProps = {
justifyContent: true,
overflow: true,
display: true,
boxSizing: true,

margin: true,
marginBlock: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ const validAttributesForNonEventProps = {
alignContent: true,
position: true,
aspectRatio: true,
boxSizing: true,

// Also declared as ViewProps
// overflow: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export interface FlexStyle {
borderTopWidth?: number | undefined;
borderWidth?: number | undefined;
bottom?: DimensionValue | undefined;
boxSizing?: 'border-box' | 'content-box' | undefined;
display?: 'none' | 'flex' | undefined;
end?: DimensionValue | undefined;
flex?: number | undefined;
Expand Down
13 changes: 0 additions & 13 deletions packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -612,19 +612,6 @@ type ____LayoutStyle_Internal = $ReadOnly<{
*/
aspectRatio?: number | string,

/**
* Box sizing controls whether certain size properties apply to the node's
* content box or border box. The size properties in question include `width`,
* `height`, `minWidth`, `minHeight`, `maxWidth`, `maxHeight`, and `flexBasis`.
*
* e.g: Say a node has 10px of padding and 10px of borders on all
* sides and a defined `width` and `height` of 100px and 50px. Then the total
* size of the node (content area + padding + border) would be 100px by 50px
* under `boxSizing: border-box` and 120px by 70px under
* `boxSizing: content-box`.
*/
boxSizing?: 'border-box' | 'content-box',

/** `zIndex` controls which components display on top of others.
* Normally, you don't use `zIndex`. Components render according to
* their order in the document tree, so later components draw over
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8003,7 +8003,6 @@ type ____LayoutStyle_Internal = $ReadOnly<{
flexShrink?: number,
flexBasis?: number | string,
aspectRatio?: number | string,
boxSizing?: \\"border-box\\" | \\"content-box\\",
zIndex?: number,
direction?: \\"inherit\\" | \\"ltr\\" | \\"rtl\\",
rowGap?: number | string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,6 @@ YogaStylableProps::YogaStylableProps(
sourceProps.yogaStyle.aspectRatio(),
yogaStyle.aspectRatio()));

yogaStyle.setBoxSizing(convertRawProp(
context,
rawProps,
"boxSizing",
sourceProps.yogaStyle.boxSizing(),
yogaStyle.boxSizing()));

convertRawPropAliases(context, sourceProps, rawProps);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,28 +226,6 @@ inline void fromRawValue(
LOG(ERROR) << "Could not parse yoga::FlexDirection: " << stringValue;
}

inline void fromRawValue(
const PropsParserContext& /*context*/,
const RawValue& value,
yoga::BoxSizing& result) {
result = yoga::BoxSizing::BorderBox;
react_native_expect(value.hasType<std::string>());
if (!value.hasType<std::string>()) {
return;
}
auto stringValue = (std::string)value;
if (stringValue == "border-box") {
result = yoga::BoxSizing::BorderBox;
return;
}
if (stringValue == "content-box") {
result = yoga::BoxSizing::ContentBox;
return;
}

LOG(ERROR) << "Could not parse yoga::BoxSizing: " << stringValue;
}

inline void fromRawValue(
const PropsParserContext& context,
const RawValue& value,
Expand Down

0 comments on commit 5e47ef9

Please sign in to comment.