Migrate excludeYogaFromRawProps to ReactNativeFeatureFlags (#45586)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45586

Migrate excludeYogaFromRawProps to ReactNativeFeatureFlags

changelog: [internal] internal

Reviewed By: NickGerleman

Differential Revision: D60022939

fbshipit-source-id: 150ecc98aa3323d5adea3a41a3d91d404c99e5a7
This commit is contained in:
David Vacca
2024-07-22 14:20:40 -07:00
committed by Facebook GitHub Bot
parent 4d77c35584
commit 700b403e06
22 changed files with 140 additions and 42 deletions
@@ -1969,7 +1969,6 @@ public class com/facebook/react/config/ReactFeatureFlags {
public static field enableFabricLogs Z
public static field enableFabricRenderer Z
public static field enableViewRecycling Z
public static field excludeYogaFromRawProps Z
public static field traceTurboModulePromiseRejections Z
public static field unstable_enableTurboModuleSyncVoidMethods Z
public static field unstable_useFabricInterop Z
@@ -76,9 +76,6 @@ public class ReactFeatureFlags {
*/
public static boolean enableCppPropsIteratorSetter = false;
/** When enabled, rawProps in Props will not include Yoga specific props. */
public static boolean excludeYogaFromRawProps = false;
/**
* Enables storing js caller stack when creating promise in native module. This is useful in case
* of Promise rejection and tracing the cause.
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<74d986b082e44be1b358d5442f4d133d>>
* @generated SignedSource<<0a9e1aa23c685e58456bb80f8ee9ef10>>
*/
/**
@@ -124,6 +124,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableUIConsistency(): Boolean = accessor.enableUIConsistency()
/**
* When enabled, rawProps in Props will not include Yoga specific props.
*/
@JvmStatic
public fun excludeYogaFromRawProps(): Boolean = accessor.excludeYogaFromRawProps()
/**
* Start image fetching during view preallocation instead of waiting for layout pass
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<375e752a672912488b52e34f39b5ed8c>>
* @generated SignedSource<<d201dcea30257e1fe545f0c795f4127a>>
*/
/**
@@ -36,6 +36,7 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableSynchronousStateUpdatesCache: Boolean? = null
private var enableUIConsistencyCache: Boolean? = null
private var excludeYogaFromRawPropsCache: Boolean? = null
private var fetchImagesInViewPreallocationCache: Boolean? = null
private var fixIncorrectScrollViewStateUpdateOnAndroidCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
@@ -199,6 +200,15 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}
override fun excludeYogaFromRawProps(): Boolean {
var cached = excludeYogaFromRawPropsCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.excludeYogaFromRawProps()
excludeYogaFromRawPropsCache = cached
}
return cached
}
override fun fetchImagesInViewPreallocation(): Boolean {
var cached = fetchImagesInViewPreallocationCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<143e35723bffbb6ba5be2cfa4a497f0b>>
* @generated SignedSource<<6e715e118c8e41d7a4b3a8ce02c62d4d>>
*/
/**
@@ -60,6 +60,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun enableUIConsistency(): Boolean
@DoNotStrip @JvmStatic public external fun excludeYogaFromRawProps(): Boolean
@DoNotStrip @JvmStatic public external fun fetchImagesInViewPreallocation(): Boolean
@DoNotStrip @JvmStatic public external fun fixIncorrectScrollViewStateUpdateOnAndroid(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<841edbe102ebbd78040892cf76f79bba>>
* @generated SignedSource<<6763616cc6266115d83a59f2aa957662>>
*/
/**
@@ -55,6 +55,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun enableUIConsistency(): Boolean = false
override fun excludeYogaFromRawProps(): Boolean = false
override fun fetchImagesInViewPreallocation(): Boolean = false
override fun fixIncorrectScrollViewStateUpdateOnAndroid(): Boolean = false
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<58cd9d65067ed758ecad65ad22737b6c>>
* @generated SignedSource<<0a1e1cdc3861ba113ce05a80f989fdc5>>
*/
/**
@@ -40,6 +40,7 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null
private var enableSynchronousStateUpdatesCache: Boolean? = null
private var enableUIConsistencyCache: Boolean? = null
private var excludeYogaFromRawPropsCache: Boolean? = null
private var fetchImagesInViewPreallocationCache: Boolean? = null
private var fixIncorrectScrollViewStateUpdateOnAndroidCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
@@ -219,6 +220,16 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun excludeYogaFromRawProps(): Boolean {
var cached = excludeYogaFromRawPropsCache
if (cached == null) {
cached = currentProvider.excludeYogaFromRawProps()
accessedFeatureFlags.add("excludeYogaFromRawProps")
excludeYogaFromRawPropsCache = cached
}
return cached
}
override fun fetchImagesInViewPreallocation(): Boolean {
var cached = fetchImagesInViewPreallocationCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7f753a763c3f4c0bcbdad268e32b21fb>>
* @generated SignedSource<<9eef72f825f596873e59e4fe8c00fdbe>>
*/
/**
@@ -55,6 +55,8 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun enableUIConsistency(): Boolean
@DoNotStrip public fun excludeYogaFromRawProps(): Boolean
@DoNotStrip public fun fetchImagesInViewPreallocation(): Boolean
@DoNotStrip public fun fixIncorrectScrollViewStateUpdateOnAndroid(): Boolean
@@ -398,7 +398,7 @@ void Binding::installFabricUIManager(
CoreFeatures::enablePropIteratorSetter =
getFeatureFlagValue("enableCppPropsIteratorSetter");
CoreFeatures::excludeYogaFromRawProps =
getFeatureFlagValue("excludeYogaFromRawProps");
ReactNativeFeatureFlags::excludeYogaFromRawProps();
auto toolbox = SchedulerToolbox{};
toolbox.contextContainer = contextContainer;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d6b1fc3721972fd7f9286bf6140d46e7>>
* @generated SignedSource<<071a086e05e9f98555961052f70e81df>>
*/
/**
@@ -135,6 +135,12 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool excludeYogaFromRawProps() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("excludeYogaFromRawProps");
return method(javaProvider_);
}
bool fetchImagesInViewPreallocation() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fetchImagesInViewPreallocation");
@@ -327,6 +333,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableUIConsistency(
return ReactNativeFeatureFlags::enableUIConsistency();
}
bool JReactNativeFeatureFlagsCxxInterop::excludeYogaFromRawProps(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::excludeYogaFromRawProps();
}
bool JReactNativeFeatureFlagsCxxInterop::fetchImagesInViewPreallocation(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fetchImagesInViewPreallocation();
@@ -482,6 +493,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableUIConsistency",
JReactNativeFeatureFlagsCxxInterop::enableUIConsistency),
makeNativeMethod(
"excludeYogaFromRawProps",
JReactNativeFeatureFlagsCxxInterop::excludeYogaFromRawProps),
makeNativeMethod(
"fetchImagesInViewPreallocation",
JReactNativeFeatureFlagsCxxInterop::fetchImagesInViewPreallocation),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e55e568ed63f298253d863935068197a>>
* @generated SignedSource<<f5a5eac6a144b6d60e56641f67c7b09c>>
*/
/**
@@ -78,6 +78,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableUIConsistency(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool excludeYogaFromRawProps(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool fetchImagesInViewPreallocation(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ce67d7e79b3aceb449ee3b178f4e425b>>
* @generated SignedSource<<9018edcc813f79df51c2417214b428c0>>
*/
/**
@@ -85,6 +85,10 @@ bool ReactNativeFeatureFlags::enableUIConsistency() {
return getAccessor().enableUIConsistency();
}
bool ReactNativeFeatureFlags::excludeYogaFromRawProps() {
return getAccessor().excludeYogaFromRawProps();
}
bool ReactNativeFeatureFlags::fetchImagesInViewPreallocation() {
return getAccessor().fetchImagesInViewPreallocation();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9a8e9432a444aaa9d997a91a77e17fa9>>
* @generated SignedSource<<b7ca52cd4fe82dcbc65f071a0792a885>>
*/
/**
@@ -117,6 +117,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableUIConsistency();
/**
* When enabled, rawProps in Props will not include Yoga specific props.
*/
RN_EXPORT static bool excludeYogaFromRawProps();
/**
* Start image fetching during view preallocation instead of waiting for layout pass
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7a2df536af010a897cf36295fccb9040>>
* @generated SignedSource<<ebd4adfa182da5d0de69ef3ceef4103b>>
*/
/**
@@ -317,6 +317,24 @@ bool ReactNativeFeatureFlagsAccessor::enableUIConsistency() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() {
auto flagValue = excludeYogaFromRawProps_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(16, "excludeYogaFromRawProps");
flagValue = currentProvider_->excludeYogaFromRawProps();
excludeYogaFromRawProps_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::fetchImagesInViewPreallocation() {
auto flagValue = fetchImagesInViewPreallocation_.load();
@@ -326,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::fetchImagesInViewPreallocation() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(16, "fetchImagesInViewPreallocation");
markFlagAsAccessed(17, "fetchImagesInViewPreallocation");
flagValue = currentProvider_->fetchImagesInViewPreallocation();
fetchImagesInViewPreallocation_ = flagValue;
@@ -344,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::fixIncorrectScrollViewStateUpdateOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(17, "fixIncorrectScrollViewStateUpdateOnAndroid");
markFlagAsAccessed(18, "fixIncorrectScrollViewStateUpdateOnAndroid");
flagValue = currentProvider_->fixIncorrectScrollViewStateUpdateOnAndroid();
fixIncorrectScrollViewStateUpdateOnAndroid_ = flagValue;
@@ -362,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(18, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
markFlagAsAccessed(19, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
@@ -380,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMissedFabricStateUpdatesOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(19, "fixMissedFabricStateUpdatesOnAndroid");
markFlagAsAccessed(20, "fixMissedFabricStateUpdatesOnAndroid");
flagValue = currentProvider_->fixMissedFabricStateUpdatesOnAndroid();
fixMissedFabricStateUpdatesOnAndroid_ = flagValue;
@@ -398,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::forceBatchingMountItemsOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(20, "forceBatchingMountItemsOnAndroid");
markFlagAsAccessed(21, "forceBatchingMountItemsOnAndroid");
flagValue = currentProvider_->forceBatchingMountItemsOnAndroid();
forceBatchingMountItemsOnAndroid_ = flagValue;
@@ -416,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledDebug() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(21, "fuseboxEnabledDebug");
markFlagAsAccessed(22, "fuseboxEnabledDebug");
flagValue = currentProvider_->fuseboxEnabledDebug();
fuseboxEnabledDebug_ = flagValue;
@@ -434,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(22, "fuseboxEnabledRelease");
markFlagAsAccessed(23, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -452,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::initEagerTurboModulesOnNativeModulesQueueA
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(23, "initEagerTurboModulesOnNativeModulesQueueAndroid");
markFlagAsAccessed(24, "initEagerTurboModulesOnNativeModulesQueueAndroid");
flagValue = currentProvider_->initEagerTurboModulesOnNativeModulesQueueAndroid();
initEagerTurboModulesOnNativeModulesQueueAndroid_ = flagValue;
@@ -470,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::lazyAnimationCallbacks() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(24, "lazyAnimationCallbacks");
markFlagAsAccessed(25, "lazyAnimationCallbacks");
flagValue = currentProvider_->lazyAnimationCallbacks();
lazyAnimationCallbacks_ = flagValue;
@@ -488,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::loadVectorDrawablesOnImages() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(25, "loadVectorDrawablesOnImages");
markFlagAsAccessed(26, "loadVectorDrawablesOnImages");
flagValue = currentProvider_->loadVectorDrawablesOnImages();
loadVectorDrawablesOnImages_ = flagValue;
@@ -506,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::setAndroidLayoutDirection() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(26, "setAndroidLayoutDirection");
markFlagAsAccessed(27, "setAndroidLayoutDirection");
flagValue = currentProvider_->setAndroidLayoutDirection();
setAndroidLayoutDirection_ = flagValue;
@@ -524,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::useImmediateExecutorInAndroidBridgeless()
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(27, "useImmediateExecutorInAndroidBridgeless");
markFlagAsAccessed(28, "useImmediateExecutorInAndroidBridgeless");
flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless();
useImmediateExecutorInAndroidBridgeless_ = flagValue;
@@ -542,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(28, "useModernRuntimeScheduler");
markFlagAsAccessed(29, "useModernRuntimeScheduler");
flagValue = currentProvider_->useModernRuntimeScheduler();
useModernRuntimeScheduler_ = flagValue;
@@ -560,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(29, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(30, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -578,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::useNewReactImageViewBackgroundDrawing() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(30, "useNewReactImageViewBackgroundDrawing");
markFlagAsAccessed(31, "useNewReactImageViewBackgroundDrawing");
flagValue = currentProvider_->useNewReactImageViewBackgroundDrawing();
useNewReactImageViewBackgroundDrawing_ = flagValue;
@@ -596,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(31, "useRuntimeShadowNodeReferenceUpdate");
markFlagAsAccessed(32, "useRuntimeShadowNodeReferenceUpdate");
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
@@ -614,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdateOnLayou
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(32, "useRuntimeShadowNodeReferenceUpdateOnLayout");
markFlagAsAccessed(33, "useRuntimeShadowNodeReferenceUpdateOnLayout");
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdateOnLayout();
useRuntimeShadowNodeReferenceUpdateOnLayout_ = flagValue;
@@ -632,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::useStateAlignmentMechanism() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(33, "useStateAlignmentMechanism");
markFlagAsAccessed(34, "useStateAlignmentMechanism");
flagValue = currentProvider_->useStateAlignmentMechanism();
useStateAlignmentMechanism_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8ba2e36038a0158a9bcfa5ba7603f2f5>>
* @generated SignedSource<<ad2f5694448a89cb1e3fce22e302a8bd>>
*/
/**
@@ -47,6 +47,7 @@ class ReactNativeFeatureFlagsAccessor {
bool enablePropsUpdateReconciliationAndroid();
bool enableSynchronousStateUpdates();
bool enableUIConsistency();
bool excludeYogaFromRawProps();
bool fetchImagesInViewPreallocation();
bool fixIncorrectScrollViewStateUpdateOnAndroid();
bool fixMappingOfEventPrioritiesBetweenFabricAndReact();
@@ -75,7 +76,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 34> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 35> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> allowCollapsableChildren_;
@@ -93,6 +94,7 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> enablePropsUpdateReconciliationAndroid_;
std::atomic<std::optional<bool>> enableSynchronousStateUpdates_;
std::atomic<std::optional<bool>> enableUIConsistency_;
std::atomic<std::optional<bool>> excludeYogaFromRawProps_;
std::atomic<std::optional<bool>> fetchImagesInViewPreallocation_;
std::atomic<std::optional<bool>> fixIncorrectScrollViewStateUpdateOnAndroid_;
std::atomic<std::optional<bool>> fixMappingOfEventPrioritiesBetweenFabricAndReact_;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2442bf826489b9fcc06afa172efa8d9d>>
* @generated SignedSource<<71de31447eb8cbc20c817ce5e8e6f8b1>>
*/
/**
@@ -91,6 +91,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool excludeYogaFromRawProps() override {
return false;
}
bool fetchImagesInViewPreallocation() override {
return false;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<4cbbd04eb5f72a2e5f5414276c3561a5>>
* @generated SignedSource<<1f293d8fed626226d5aa77e389312ae9>>
*/
/**
@@ -41,6 +41,7 @@ class ReactNativeFeatureFlagsProvider {
virtual bool enablePropsUpdateReconciliationAndroid() = 0;
virtual bool enableSynchronousStateUpdates() = 0;
virtual bool enableUIConsistency() = 0;
virtual bool excludeYogaFromRawProps() = 0;
virtual bool fetchImagesInViewPreallocation() = 0;
virtual bool fixIncorrectScrollViewStateUpdateOnAndroid() = 0;
virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact() = 0;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8f5a7c45dad6a49355e0823bb6e16b3e>>
* @generated SignedSource<<08bf79de492959b1c8df2e3267077c0a>>
*/
/**
@@ -117,6 +117,11 @@ bool NativeReactNativeFeatureFlags::enableUIConsistency(
return ReactNativeFeatureFlags::enableUIConsistency();
}
bool NativeReactNativeFeatureFlags::excludeYogaFromRawProps(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::excludeYogaFromRawProps();
}
bool NativeReactNativeFeatureFlags::fetchImagesInViewPreallocation(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::fetchImagesInViewPreallocation();
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<929fb57602a8fe468707047daa05a8a7>>
* @generated SignedSource<<9287647f27c592eaa608762c4309601a>>
*/
/**
@@ -67,6 +67,8 @@ class NativeReactNativeFeatureFlags
bool enableUIConsistency(jsi::Runtime& runtime);
bool excludeYogaFromRawProps(jsi::Runtime& runtime);
bool fetchImagesInViewPreallocation(jsi::Runtime& runtime);
bool fixIncorrectScrollViewStateUpdateOnAndroid(jsi::Runtime& runtime);
@@ -113,6 +113,11 @@ const definitions: FeatureFlagDefinitions = {
description:
'Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).',
},
excludeYogaFromRawProps: {
defaultValue: false,
description:
'When enabled, rawProps in Props will not include Yoga specific props.',
},
fetchImagesInViewPreallocation: {
defaultValue: false,
description:
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f3fa2b5cb97472b33e4ddce837f860e2>>
* @generated SignedSource<<3ddf6ec6b530797e56609a4ee37dc4fc>>
* @flow strict-local
*/
@@ -59,6 +59,7 @@ export type ReactNativeFeatureFlags = {
enablePropsUpdateReconciliationAndroid: Getter<boolean>,
enableSynchronousStateUpdates: Getter<boolean>,
enableUIConsistency: Getter<boolean>,
excludeYogaFromRawProps: Getter<boolean>,
fetchImagesInViewPreallocation: Getter<boolean>,
fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean>,
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
@@ -198,6 +199,10 @@ export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGe
* Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).
*/
export const enableUIConsistency: Getter<boolean> = createNativeFlagGetter('enableUIConsistency', false);
/**
* When enabled, rawProps in Props will not include Yoga specific props.
*/
export const excludeYogaFromRawProps: Getter<boolean> = createNativeFlagGetter('excludeYogaFromRawProps', false);
/**
* Start image fetching during view preallocation instead of waiting for layout pass
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<20f7827abf86b1c39f676486bcf03d92>>
* @generated SignedSource<<5f09364e48d037c932428c0486290730>>
* @flow strict-local
*/
@@ -39,6 +39,7 @@ export interface Spec extends TurboModule {
+enablePropsUpdateReconciliationAndroid?: () => boolean;
+enableSynchronousStateUpdates?: () => boolean;
+enableUIConsistency?: () => boolean;
+excludeYogaFromRawProps?: () => boolean;
+fetchImagesInViewPreallocation?: () => boolean;
+fixIncorrectScrollViewStateUpdateOnAndroid?: () => boolean;
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;