Skip to content

Commit 2053a55

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Remove gated Yoga flex-basis behavior
Summary: X-link: react/yoga#1980 Remove the runtime-gated Yoga flex-basis fit-content behavior and its app-side overrides now that this behavior is no longer being shipped. This restores the ungated Yoga path and removes the related generated feature-flag surface. Changelog: [Internal] Reviewed By: javache Differential Revision: D108598973
1 parent 2f325e2 commit 2053a55

28 files changed

Lines changed: 65 additions & 355 deletions

packages/react-native/Libraries/Components/View/__tests__/View-flexBasisFitContent-itest.js

Lines changed: 0 additions & 87 deletions
This file was deleted.

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<00bb39539f4fc2dc0ad85a346bdee22b>>
7+
* @generated SignedSource<<6e5d11227a493c56e2e132b4bc5ed4aa>>
88
*/
99

1010
/**
@@ -342,12 +342,6 @@ public object ReactNativeFeatureFlags {
342342
@JvmStatic
343343
public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = accessor.fixMappingOfEventPrioritiesBetweenFabricAndReact()
344344

345-
/**
346-
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
347-
*/
348-
@JvmStatic
349-
public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = accessor.fixYogaFlexBasisFitContentInMainAxis()
350-
351345
/**
352346
* Enable system assertion validating that Fusebox is configured with a single host. When set, the CDP backend will dynamically disable features (Perf and Network) in the event that multiple hosts are registered (undefined behaviour), and broadcast this over `ReactNativeApplication.systemStateChanged`.
353347
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<731e92ecac8dbdf0a4b204b763a2c8c7>>
7+
* @generated SignedSource<<73a3842f757634b1efebd4cc6c868604>>
88
*/
99

1010
/**
@@ -72,7 +72,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
7272
private var enableVirtualViewContainerStateExperimentalCache: Boolean? = null
7373
private var fixDifferentiatorParentTagForUnflattenCaseCache: Boolean? = null
7474
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
75-
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
7675
private var fuseboxAssertSingleHostStateCache: Boolean? = null
7776
private var fuseboxEnabledReleaseCache: Boolean? = null
7877
private var fuseboxFrameRecordingEnabledCache: Boolean? = null
@@ -573,15 +572,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
573572
return cached
574573
}
575574

576-
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
577-
var cached = fixYogaFlexBasisFitContentInMainAxisCache
578-
if (cached == null) {
579-
cached = ReactNativeFeatureFlagsCxxInterop.fixYogaFlexBasisFitContentInMainAxis()
580-
fixYogaFlexBasisFitContentInMainAxisCache = cached
581-
}
582-
return cached
583-
}
584-
585575
override fun fuseboxAssertSingleHostState(): Boolean {
586576
var cached = fuseboxAssertSingleHostStateCache
587577
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<4d0952ded695aec4a52b7b581ad19979>>
7+
* @generated SignedSource<<d443b231258e6a537a52bff74107dc26>>
88
*/
99

1010
/**
@@ -132,8 +132,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
132132

133133
@DoNotStrip @JvmStatic public external fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
134134

135-
@DoNotStrip @JvmStatic public external fun fixYogaFlexBasisFitContentInMainAxis(): Boolean
136-
137135
@DoNotStrip @JvmStatic public external fun fuseboxAssertSingleHostState(): Boolean
138136

139137
@DoNotStrip @JvmStatic public external fun fuseboxEnabledRelease(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<4c0b09eb9df8e4580dc4778a91591236>>
7+
* @generated SignedSource<<c3b5dcf41183f8d769d397a983ffdf59>>
88
*/
99

1010
/**
@@ -127,8 +127,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
127127

128128
override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = false
129129

130-
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = false
131-
132130
override fun fuseboxAssertSingleHostState(): Boolean = true
133131

134132
override fun fuseboxEnabledRelease(): Boolean = false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<156af11c13257170355284118e400435>>
7+
* @generated SignedSource<<5405a946b6292fc00d8408b0bcc1f956>>
88
*/
99

1010
/**
@@ -76,7 +76,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
7676
private var enableVirtualViewContainerStateExperimentalCache: Boolean? = null
7777
private var fixDifferentiatorParentTagForUnflattenCaseCache: Boolean? = null
7878
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
79-
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
8079
private var fuseboxAssertSingleHostStateCache: Boolean? = null
8180
private var fuseboxEnabledReleaseCache: Boolean? = null
8281
private var fuseboxFrameRecordingEnabledCache: Boolean? = null
@@ -629,16 +628,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
629628
return cached
630629
}
631630

632-
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
633-
var cached = fixYogaFlexBasisFitContentInMainAxisCache
634-
if (cached == null) {
635-
cached = currentProvider.fixYogaFlexBasisFitContentInMainAxis()
636-
accessedFeatureFlags.add("fixYogaFlexBasisFitContentInMainAxis")
637-
fixYogaFlexBasisFitContentInMainAxisCache = cached
638-
}
639-
return cached
640-
}
641-
642631
override fun fuseboxAssertSingleHostState(): Boolean {
643632
var cached = fuseboxAssertSingleHostStateCache
644633
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<b1dd783c9075c9a35cbd06aa812e56c9>>
7+
* @generated SignedSource<<0f69f2d1b8b7ea6b7b07a57cfd969bdc>>
88
*/
99

1010
/**
@@ -127,8 +127,6 @@ public interface ReactNativeFeatureFlagsProvider {
127127

128128
@DoNotStrip public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
129129

130-
@DoNotStrip public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean
131-
132130
@DoNotStrip public fun fuseboxAssertSingleHostState(): Boolean
133131

134132
@DoNotStrip public fun fuseboxEnabledRelease(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
package com.facebook.yoga
1111

1212
public enum class YogaExperimentalFeature(public val intValue: Int) {
13-
WEB_FLEX_BASIS(0),
14-
FIX_FLEX_BASIS_FIT_CONTENT(1);
13+
WEB_FLEX_BASIS(0);
1514

1615
public fun intValue(): Int = intValue
1716

@@ -20,7 +19,6 @@ public enum class YogaExperimentalFeature(public val intValue: Int) {
2019
public fun fromInt(value: Int): YogaExperimentalFeature =
2120
when (value) {
2221
0 -> WEB_FLEX_BASIS
23-
1 -> FIX_FLEX_BASIS_FIT_CONTENT
2422
else -> throw IllegalArgumentException("Unknown enum value: $value")
2523
}
2624
}

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<671da9c60f7c7331ece553327ee3ab33>>
7+
* @generated SignedSource<<87799cfdce19b332fd1ef3a9a41e27c4>>
88
*/
99

1010
/**
@@ -351,12 +351,6 @@ class ReactNativeFeatureFlagsJavaProvider
351351
return method(javaProvider_);
352352
}
353353

354-
bool fixYogaFlexBasisFitContentInMainAxis() override {
355-
static const auto method =
356-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixYogaFlexBasisFitContentInMainAxis");
357-
return method(javaProvider_);
358-
}
359-
360354
bool fuseboxAssertSingleHostState() override {
361355
static const auto method =
362356
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fuseboxAssertSingleHostState");
@@ -807,11 +801,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabri
807801
return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact();
808802
}
809803

810-
bool JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis(
811-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
812-
return ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis();
813-
}
814-
815804
bool JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState(
816805
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
817806
return ReactNativeFeatureFlags::fuseboxAssertSingleHostState();
@@ -1154,9 +1143,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
11541143
makeNativeMethod(
11551144
"fixMappingOfEventPrioritiesBetweenFabricAndReact",
11561145
JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact),
1157-
makeNativeMethod(
1158-
"fixYogaFlexBasisFitContentInMainAxis",
1159-
JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis),
11601146
makeNativeMethod(
11611147
"fuseboxAssertSingleHostState",
11621148
JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState),

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<ee7368466ea9e4ede93a0c1b0df005c5>>
7+
* @generated SignedSource<<d953aeeb78265715e27d567bc4e28716>>
88
*/
99

1010
/**
@@ -186,9 +186,6 @@ class JReactNativeFeatureFlagsCxxInterop
186186
static bool fixMappingOfEventPrioritiesBetweenFabricAndReact(
187187
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
188188

189-
static bool fixYogaFlexBasisFitContentInMainAxis(
190-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
191-
192189
static bool fuseboxAssertSingleHostState(
193190
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
194191

0 commit comments

Comments
 (0)