mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add a feature flag for (#54777)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54777 This will be needed so we can properly experiment around https://github.com/facebook/react-native/pull/54721 Changelog: [Internal] [Changed] - Reviewed By: javache Differential Revision: D88286589 fbshipit-source-id: e0ebc454798388f55f3c68f80a4c92d55791a74b
This commit is contained in:
1 parent
5634e8a601
commit
d23502b517
20 files changed
+169
-52
No files matched your search
+7
-1
@@ -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<<5685f79f9b08afe94f5b3e8ec8ff6748>>
|
||||
* @generated SignedSource<<adc6b24ae04487d2b82a2bac35f027a7>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -372,6 +372,12 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = accessor.fixMappingOfEventPrioritiesBetweenFabricAndReact()
|
||||
|
||||
/**
|
||||
* Fix text clipping starting in Android 15 due to usage of useBoundsForWidth
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = accessor.fixTextClippingAndroid15useBoundsForWidth()
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
|
||||
+11
-1
@@ -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<<6645323047d21e58469de0d385954eab>>
|
||||
* @generated SignedSource<<3ebb3c265193b4f61e5bf43082c5be54>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -77,6 +77,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var enableVirtualViewWindowFocusDetectionCache: Boolean? = null
|
||||
private var enableWebPerformanceAPIsByDefaultCache: Boolean? = null
|
||||
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
|
||||
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
|
||||
private var fuseboxAssertSingleHostStateCache: Boolean? = null
|
||||
private var fuseboxEnabledReleaseCache: Boolean? = null
|
||||
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
|
||||
@@ -623,6 +624,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean {
|
||||
var cached = fixTextClippingAndroid15useBoundsForWidthCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.fixTextClippingAndroid15useBoundsForWidth()
|
||||
fixTextClippingAndroid15useBoundsForWidthCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun fuseboxAssertSingleHostState(): Boolean {
|
||||
var cached = fuseboxAssertSingleHostStateCache
|
||||
if (cached == null) {
|
||||
|
||||
+3
-1
@@ -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<<3da42d9ffdbba52e9e1d11a4e4dac8c4>>
|
||||
* @generated SignedSource<<eb11cf643c4e94eddc5d7985a8a7a03a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -142,6 +142,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun fixTextClippingAndroid15useBoundsForWidth(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun fuseboxAssertSingleHostState(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun fuseboxEnabledRelease(): Boolean
|
||||
|
||||
+3
-1
@@ -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<<46e1f708d91d5ec45c866b8192192e72>>
|
||||
* @generated SignedSource<<58cb08dbd188ec64d3738f548567bcde>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -137,6 +137,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = false
|
||||
|
||||
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = false
|
||||
|
||||
override fun fuseboxAssertSingleHostState(): Boolean = true
|
||||
|
||||
override fun fuseboxEnabledRelease(): Boolean = false
|
||||
|
||||
+12
-1
@@ -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<<c19ea5e9ad6435b1f8587287cacf020b>>
|
||||
* @generated SignedSource<<f9ee0d1f23024b026d065ffc3d48cfcf>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -81,6 +81,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var enableVirtualViewWindowFocusDetectionCache: Boolean? = null
|
||||
private var enableWebPerformanceAPIsByDefaultCache: Boolean? = null
|
||||
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
|
||||
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
|
||||
private var fuseboxAssertSingleHostStateCache: Boolean? = null
|
||||
private var fuseboxEnabledReleaseCache: Boolean? = null
|
||||
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
|
||||
@@ -684,6 +685,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean {
|
||||
var cached = fixTextClippingAndroid15useBoundsForWidthCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.fixTextClippingAndroid15useBoundsForWidth()
|
||||
accessedFeatureFlags.add("fixTextClippingAndroid15useBoundsForWidth")
|
||||
fixTextClippingAndroid15useBoundsForWidthCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun fuseboxAssertSingleHostState(): Boolean {
|
||||
var cached = fuseboxAssertSingleHostStateCache
|
||||
if (cached == null) {
|
||||
|
||||
+3
-1
@@ -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<<17400be6ee20befd9eafb094455dfb63>>
|
||||
* @generated SignedSource<<09cef8cedd515f477a32c2ed77d86fc4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -137,6 +137,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
|
||||
|
||||
@DoNotStrip public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean
|
||||
|
||||
@DoNotStrip public fun fuseboxAssertSingleHostState(): Boolean
|
||||
|
||||
@DoNotStrip public fun fuseboxEnabledRelease(): Boolean
|
||||
|
||||
+15
-1
@@ -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<<66f2c701d95db2fbeefb2705ae326e08>>
|
||||
* @generated SignedSource<<b9af351de972ddff807bd25f98f3ff42>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -381,6 +381,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool fixTextClippingAndroid15useBoundsForWidth() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixTextClippingAndroid15useBoundsForWidth");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool fuseboxAssertSingleHostState() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fuseboxAssertSingleHostState");
|
||||
@@ -862,6 +868,11 @@ bool JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabri
|
||||
return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWidth(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::fuseboxAssertSingleHostState();
|
||||
@@ -1224,6 +1235,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"fixMappingOfEventPrioritiesBetweenFabricAndReact",
|
||||
JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact),
|
||||
makeNativeMethod(
|
||||
"fixTextClippingAndroid15useBoundsForWidth",
|
||||
JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWidth),
|
||||
makeNativeMethod(
|
||||
"fuseboxAssertSingleHostState",
|
||||
JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState),
|
||||
|
||||
+4
-1
@@ -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<<f14600a85cec20388ba1a5bc63010a68>>
|
||||
* @generated SignedSource<<c89b15dbb7d1cec571eed1551e1b7162>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -201,6 +201,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool fixMappingOfEventPrioritiesBetweenFabricAndReact(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool fixTextClippingAndroid15useBoundsForWidth(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool fuseboxAssertSingleHostState(
|
||||
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<<34d260e51b2f70825c4867c98bbcf3de>>
|
||||
* @generated SignedSource<<08d50062a88a227aa8800e549b6dfe57>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -254,6 +254,10 @@ bool ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact()
|
||||
return getAccessor().fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth() {
|
||||
return getAccessor().fixTextClippingAndroid15useBoundsForWidth();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::fuseboxAssertSingleHostState() {
|
||||
return getAccessor().fuseboxAssertSingleHostState();
|
||||
}
|
||||
|
||||
@@ -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<<502fa8935abd547231be7980d768b817>>
|
||||
* @generated SignedSource<<4f6913d92515fd817a167ef2a505c777>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -324,6 +324,11 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
|
||||
/**
|
||||
* Fix text clipping starting in Android 15 due to usage of useBoundsForWidth
|
||||
*/
|
||||
RN_EXPORT static bool fixTextClippingAndroid15useBoundsForWidth();
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
|
||||
+51
-33
@@ -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<<34c34af7d83e132d6e9c75bff291d072>>
|
||||
* @generated SignedSource<<c9a7ba46b550596ced6dfea4eb224ff4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -1055,6 +1055,24 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::fixTextClippingAndroid15useBoundsForWidth() {
|
||||
auto flagValue = fixTextClippingAndroid15useBoundsForWidth_.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(57, "fixTextClippingAndroid15useBoundsForWidth");
|
||||
|
||||
flagValue = currentProvider_->fixTextClippingAndroid15useBoundsForWidth();
|
||||
fixTextClippingAndroid15useBoundsForWidth_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::fuseboxAssertSingleHostState() {
|
||||
auto flagValue = fuseboxAssertSingleHostState_.load();
|
||||
|
||||
@@ -1064,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxAssertSingleHostState() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(57, "fuseboxAssertSingleHostState");
|
||||
markFlagAsAccessed(58, "fuseboxAssertSingleHostState");
|
||||
|
||||
flagValue = currentProvider_->fuseboxAssertSingleHostState();
|
||||
fuseboxAssertSingleHostState_ = flagValue;
|
||||
@@ -1082,7 +1100,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(58, "fuseboxEnabledRelease");
|
||||
markFlagAsAccessed(59, "fuseboxEnabledRelease");
|
||||
|
||||
flagValue = currentProvider_->fuseboxEnabledRelease();
|
||||
fuseboxEnabledRelease_ = flagValue;
|
||||
@@ -1100,7 +1118,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(59, "fuseboxNetworkInspectionEnabled");
|
||||
markFlagAsAccessed(60, "fuseboxNetworkInspectionEnabled");
|
||||
|
||||
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
|
||||
fuseboxNetworkInspectionEnabled_ = flagValue;
|
||||
@@ -1118,7 +1136,7 @@ bool ReactNativeFeatureFlagsAccessor::hideOffscreenVirtualViewsOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(60, "hideOffscreenVirtualViewsOnIOS");
|
||||
markFlagAsAccessed(61, "hideOffscreenVirtualViewsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS();
|
||||
hideOffscreenVirtualViewsOnIOS_ = flagValue;
|
||||
@@ -1136,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::overrideBySynchronousMountPropsAtMountingA
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(61, "overrideBySynchronousMountPropsAtMountingAndroid");
|
||||
markFlagAsAccessed(62, "overrideBySynchronousMountPropsAtMountingAndroid");
|
||||
|
||||
flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid();
|
||||
overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue;
|
||||
@@ -1154,7 +1172,7 @@ bool ReactNativeFeatureFlagsAccessor::perfIssuesEnabled() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(62, "perfIssuesEnabled");
|
||||
markFlagAsAccessed(63, "perfIssuesEnabled");
|
||||
|
||||
flagValue = currentProvider_->perfIssuesEnabled();
|
||||
perfIssuesEnabled_ = flagValue;
|
||||
@@ -1172,7 +1190,7 @@ bool ReactNativeFeatureFlagsAccessor::perfMonitorV2Enabled() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(63, "perfMonitorV2Enabled");
|
||||
markFlagAsAccessed(64, "perfMonitorV2Enabled");
|
||||
|
||||
flagValue = currentProvider_->perfMonitorV2Enabled();
|
||||
perfMonitorV2Enabled_ = flagValue;
|
||||
@@ -1190,7 +1208,7 @@ double ReactNativeFeatureFlagsAccessor::preparedTextCacheSize() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(64, "preparedTextCacheSize");
|
||||
markFlagAsAccessed(65, "preparedTextCacheSize");
|
||||
|
||||
flagValue = currentProvider_->preparedTextCacheSize();
|
||||
preparedTextCacheSize_ = flagValue;
|
||||
@@ -1208,7 +1226,7 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(65, "preventShadowTreeCommitExhaustion");
|
||||
markFlagAsAccessed(66, "preventShadowTreeCommitExhaustion");
|
||||
|
||||
flagValue = currentProvider_->preventShadowTreeCommitExhaustion();
|
||||
preventShadowTreeCommitExhaustion_ = flagValue;
|
||||
@@ -1226,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(66, "shouldPressibilityUseW3CPointerEventsForHover");
|
||||
markFlagAsAccessed(67, "shouldPressibilityUseW3CPointerEventsForHover");
|
||||
|
||||
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
|
||||
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
|
||||
@@ -1244,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldResetClickableWhenRecyclingView() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(67, "shouldResetClickableWhenRecyclingView");
|
||||
markFlagAsAccessed(68, "shouldResetClickableWhenRecyclingView");
|
||||
|
||||
flagValue = currentProvider_->shouldResetClickableWhenRecyclingView();
|
||||
shouldResetClickableWhenRecyclingView_ = flagValue;
|
||||
@@ -1262,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldResetOnClickListenerWhenRecyclingVie
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(68, "shouldResetOnClickListenerWhenRecyclingView");
|
||||
markFlagAsAccessed(69, "shouldResetOnClickListenerWhenRecyclingView");
|
||||
|
||||
flagValue = currentProvider_->shouldResetOnClickListenerWhenRecyclingView();
|
||||
shouldResetOnClickListenerWhenRecyclingView_ = flagValue;
|
||||
@@ -1280,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldSetEnabledBasedOnAccessibilityState(
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(69, "shouldSetEnabledBasedOnAccessibilityState");
|
||||
markFlagAsAccessed(70, "shouldSetEnabledBasedOnAccessibilityState");
|
||||
|
||||
flagValue = currentProvider_->shouldSetEnabledBasedOnAccessibilityState();
|
||||
shouldSetEnabledBasedOnAccessibilityState_ = flagValue;
|
||||
@@ -1298,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldSetIsClickableByDefault() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(70, "shouldSetIsClickableByDefault");
|
||||
markFlagAsAccessed(71, "shouldSetIsClickableByDefault");
|
||||
|
||||
flagValue = currentProvider_->shouldSetIsClickableByDefault();
|
||||
shouldSetIsClickableByDefault_ = flagValue;
|
||||
@@ -1316,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndr
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(71, "shouldTriggerResponderTransferOnScrollAndroid");
|
||||
markFlagAsAccessed(72, "shouldTriggerResponderTransferOnScrollAndroid");
|
||||
|
||||
flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid();
|
||||
shouldTriggerResponderTransferOnScrollAndroid_ = flagValue;
|
||||
@@ -1334,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(72, "skipActivityIdentityAssertionOnHostPause");
|
||||
markFlagAsAccessed(73, "skipActivityIdentityAssertionOnHostPause");
|
||||
|
||||
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
|
||||
skipActivityIdentityAssertionOnHostPause_ = flagValue;
|
||||
@@ -1352,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(73, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(74, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -1370,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(74, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
markFlagAsAccessed(75, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
||||
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
||||
@@ -1388,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(75, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(76, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -1406,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(76, "useFabricInterop");
|
||||
markFlagAsAccessed(77, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -1424,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeEqualsInNativeReadableArrayAndroi
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(77, "useNativeEqualsInNativeReadableArrayAndroid");
|
||||
markFlagAsAccessed(78, "useNativeEqualsInNativeReadableArrayAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNativeEqualsInNativeReadableArrayAndroid();
|
||||
useNativeEqualsInNativeReadableArrayAndroid_ = flagValue;
|
||||
@@ -1442,7 +1460,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeTransformHelperAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(78, "useNativeTransformHelperAndroid");
|
||||
markFlagAsAccessed(79, "useNativeTransformHelperAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNativeTransformHelperAndroid();
|
||||
useNativeTransformHelperAndroid_ = flagValue;
|
||||
@@ -1460,7 +1478,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(79, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(80, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -1478,7 +1496,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(80, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(81, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -1496,7 +1514,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(81, "useShadowNodeStateOnClone");
|
||||
markFlagAsAccessed(82, "useShadowNodeStateOnClone");
|
||||
|
||||
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
||||
useShadowNodeStateOnClone_ = flagValue;
|
||||
@@ -1514,7 +1532,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(82, "useSharedAnimatedBackend");
|
||||
markFlagAsAccessed(83, "useSharedAnimatedBackend");
|
||||
|
||||
flagValue = currentProvider_->useSharedAnimatedBackend();
|
||||
useSharedAnimatedBackend_ = flagValue;
|
||||
@@ -1532,7 +1550,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(83, "useTraitHiddenOnAndroid");
|
||||
markFlagAsAccessed(84, "useTraitHiddenOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useTraitHiddenOnAndroid();
|
||||
useTraitHiddenOnAndroid_ = flagValue;
|
||||
@@ -1550,7 +1568,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(84, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(85, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -1568,7 +1586,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(85, "useTurboModules");
|
||||
markFlagAsAccessed(86, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
@@ -1586,7 +1604,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(86, "viewCullingOutsetRatio");
|
||||
markFlagAsAccessed(87, "viewCullingOutsetRatio");
|
||||
|
||||
flagValue = currentProvider_->viewCullingOutsetRatio();
|
||||
viewCullingOutsetRatio_ = flagValue;
|
||||
@@ -1604,7 +1622,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewHysteresisRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(87, "virtualViewHysteresisRatio");
|
||||
markFlagAsAccessed(88, "virtualViewHysteresisRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewHysteresisRatio();
|
||||
virtualViewHysteresisRatio_ = flagValue;
|
||||
@@ -1622,7 +1640,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(88, "virtualViewPrerenderRatio");
|
||||
markFlagAsAccessed(89, "virtualViewPrerenderRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewPrerenderRatio();
|
||||
virtualViewPrerenderRatio_ = flagValue;
|
||||
|
||||
+4
-2
@@ -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<<d6e559e0a0919d0de99a32b27646fbce>>
|
||||
* @generated SignedSource<<1bcf3e91c74400c90689e350fab7b4ce>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -89,6 +89,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool enableVirtualViewWindowFocusDetection();
|
||||
bool enableWebPerformanceAPIsByDefault();
|
||||
bool fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
bool fixTextClippingAndroid15useBoundsForWidth();
|
||||
bool fuseboxAssertSingleHostState();
|
||||
bool fuseboxEnabledRelease();
|
||||
bool fuseboxNetworkInspectionEnabled();
|
||||
@@ -132,7 +133,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 89> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 90> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
||||
@@ -191,6 +192,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> enableVirtualViewWindowFocusDetection_;
|
||||
std::atomic<std::optional<bool>> enableWebPerformanceAPIsByDefault_;
|
||||
std::atomic<std::optional<bool>> fixMappingOfEventPrioritiesBetweenFabricAndReact_;
|
||||
std::atomic<std::optional<bool>> fixTextClippingAndroid15useBoundsForWidth_;
|
||||
std::atomic<std::optional<bool>> fuseboxAssertSingleHostState_;
|
||||
std::atomic<std::optional<bool>> fuseboxEnabledRelease_;
|
||||
std::atomic<std::optional<bool>> fuseboxNetworkInspectionEnabled_;
|
||||
|
||||
+5
-1
@@ -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<<a220c6699baacba2e95d610314d90c67>>
|
||||
* @generated SignedSource<<5586a2963cb339f4d5241c790da60d62>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -255,6 +255,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool fixTextClippingAndroid15useBoundsForWidth() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool fuseboxAssertSingleHostState() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
+10
-1
@@ -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<<eef5fb5ff9153cedd8a25b39af0cc49f>>
|
||||
* @generated SignedSource<<543338d7b54991244389bca238b2078d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -558,6 +558,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
}
|
||||
|
||||
bool fixTextClippingAndroid15useBoundsForWidth() override {
|
||||
auto value = values_["fixTextClippingAndroid15useBoundsForWidth"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::fixTextClippingAndroid15useBoundsForWidth();
|
||||
}
|
||||
|
||||
bool fuseboxAssertSingleHostState() override {
|
||||
auto value = values_["fuseboxAssertSingleHostState"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+2
-1
@@ -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<<8d8563ead19635c98fe335864aa1cad0>>
|
||||
* @generated SignedSource<<4c2b82eb2fc7f82b09b7b0b489f3d447>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -82,6 +82,7 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool enableVirtualViewWindowFocusDetection() = 0;
|
||||
virtual bool enableWebPerformanceAPIsByDefault() = 0;
|
||||
virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact() = 0;
|
||||
virtual bool fixTextClippingAndroid15useBoundsForWidth() = 0;
|
||||
virtual bool fuseboxAssertSingleHostState() = 0;
|
||||
virtual bool fuseboxEnabledRelease() = 0;
|
||||
virtual bool fuseboxNetworkInspectionEnabled() = 0;
|
||||
|
||||
+6
-1
@@ -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<<0e0ea09b8aa2c9649042df278241be28>>
|
||||
* @generated SignedSource<<f22bdf728cccaf9d95e62256f630ee1b>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -329,6 +329,11 @@ bool NativeReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndR
|
||||
return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::fuseboxAssertSingleHostState(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::fuseboxAssertSingleHostState();
|
||||
|
||||
+3
-1
@@ -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<<a9b91d43221aae62d3a6811867a72695>>
|
||||
* @generated SignedSource<<3caa7ab068af35b4b198bce5925dea1d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -150,6 +150,8 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime& runtime);
|
||||
|
||||
bool fixTextClippingAndroid15useBoundsForWidth(jsi::Runtime& runtime);
|
||||
|
||||
bool fuseboxAssertSingleHostState(jsi::Runtime& runtime);
|
||||
|
||||
bool fuseboxEnabledRelease(jsi::Runtime& runtime);
|
||||
|
||||
@@ -658,6 +658,17 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
fixTextClippingAndroid15useBoundsForWidth: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
dateAdded: '2025-12-03',
|
||||
description:
|
||||
'Fix text clipping starting in Android 15 due to usage of useBoundsForWidth',
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
fuseboxAssertSingleHostState: {
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
|
||||
@@ -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<<1732204fe9acf34158e7f9e4aec04161>>
|
||||
* @generated SignedSource<<b16ca6ca4e47b347e4f5cb8555d3308f>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -108,6 +108,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
enableVirtualViewWindowFocusDetection: Getter<boolean>,
|
||||
enableWebPerformanceAPIsByDefault: Getter<boolean>,
|
||||
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
||||
fixTextClippingAndroid15useBoundsForWidth: Getter<boolean>,
|
||||
fuseboxAssertSingleHostState: Getter<boolean>,
|
||||
fuseboxEnabledRelease: Getter<boolean>,
|
||||
fuseboxNetworkInspectionEnabled: Getter<boolean>,
|
||||
@@ -454,6 +455,10 @@ export const enableWebPerformanceAPIsByDefault: Getter<boolean> = createNativeFl
|
||||
* Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
|
||||
*/
|
||||
export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
|
||||
/**
|
||||
* Fix text clipping starting in Android 15 due to usage of useBoundsForWidth
|
||||
*/
|
||||
export const fixTextClippingAndroid15useBoundsForWidth: Getter<boolean> = createNativeFlagGetter('fixTextClippingAndroid15useBoundsForWidth', false);
|
||||
/**
|
||||
* 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`.
|
||||
*/
|
||||
|
||||
+2
-1
@@ -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<<2604998265d9aa6a9b50d78502aa8d10>>
|
||||
* @generated SignedSource<<c43da900298aae909ac525053b5ba848>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -82,6 +82,7 @@ export interface Spec extends TurboModule {
|
||||
+enableVirtualViewWindowFocusDetection?: () => boolean;
|
||||
+enableWebPerformanceAPIsByDefault?: () => boolean;
|
||||
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
||||
+fixTextClippingAndroid15useBoundsForWidth?: () => boolean;
|
||||
+fuseboxAssertSingleHostState?: () => boolean;
|
||||
+fuseboxEnabledRelease?: () => boolean;
|
||||
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
||||
|
||||
Reference in new issue
Block a user