From 03b1bf608d7b3de7b328e4bc4f8aa870adcb742e Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Fri, 16 Jan 2026 08:32:55 -0800 Subject: [PATCH] Back out "Forward ACTION_SCROLL events to SwipeRefreshLayout children" (#55194) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55194 Reverts https://github.com/facebook/react-native/pull/55097 Original Phabricator Diff: D90209679 Reverting this behavior and feature flag as the experiment that used it is no longer needed Changelog: [Internal] Reviewed By: cortinico Differential Revision: D90791564 fbshipit-source-id: 362399c435a0c5addba5734e333bc2c1747f7293 --- .../ReactAndroid/api/ReactAndroid.api | 1 - .../featureflags/ReactNativeFeatureFlags.kt | 8 +-- .../ReactNativeFeatureFlagsCxxAccessor.kt | 12 +--- .../ReactNativeFeatureFlagsCxxInterop.kt | 4 +- .../ReactNativeFeatureFlagsDefaults.kt | 4 +- .../ReactNativeFeatureFlagsLocalAccessor.kt | 13 +---- .../ReactNativeFeatureFlagsProvider.kt | 4 +- .../swiperefresh/ReactSwipeRefreshLayout.kt | 34 +---------- .../JReactNativeFeatureFlagsCxxInterop.cpp | 16 +----- .../JReactNativeFeatureFlagsCxxInterop.h | 5 +- .../featureflags/ReactNativeFeatureFlags.cpp | 6 +- .../featureflags/ReactNativeFeatureFlags.h | 7 +-- .../ReactNativeFeatureFlagsAccessor.cpp | 56 +++++++------------ .../ReactNativeFeatureFlagsAccessor.h | 6 +- .../ReactNativeFeatureFlagsDefaults.h | 6 +- .../ReactNativeFeatureFlagsDynamicProvider.h | 11 +--- .../ReactNativeFeatureFlagsProvider.h | 3 +- .../NativeReactNativeFeatureFlags.cpp | 7 +-- .../NativeReactNativeFeatureFlags.h | 4 +- .../ReactNativeFeatureFlags.config.js | 11 ---- .../featureflags/ReactNativeFeatureFlags.js | 7 +-- .../specs/NativeReactNativeFeatureFlags.js | 3 +- 22 files changed, 39 insertions(+), 189 deletions(-) diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 8e29b69bf89..aa31d38cc43 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -6025,7 +6025,6 @@ public abstract interface class com/facebook/react/views/scroll/VirtualView { public final class com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout : androidx/swiperefreshlayout/widget/SwipeRefreshLayout { public fun (Lcom/facebook/react/bridge/ReactContext;)V public fun canChildScrollUp ()Z - public fun dispatchGenericMotionEvent (Landroid/view/MotionEvent;)Z public fun onInterceptTouchEvent (Landroid/view/MotionEvent;)Z public fun onLayout (ZIIII)V public fun onTouchEvent (Landroid/view/MotionEvent;)Z diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index f8a1bff33ae..5e6dab12003 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -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<<2329e4100b9b70dce294c618d0616e98>> + * @generated SignedSource<<27dfa9832869aa05987fa7cb9740f7ba>> */ /** @@ -384,12 +384,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean = accessor.overrideBySynchronousMountPropsAtMountingAndroid() - /** - * When enabled, ReactSwipeRefreshLayout will forward ACTION_SCROLL events to its child for proper handling. - */ - @JvmStatic - public fun passScrollToSwipeRefreshChild(): Boolean = accessor.passScrollToSwipeRefreshChild() - /** * Enable reporting Performance Issues (`detail.devtools.performanceIssue`). Displayed in the V2 Performance Monitor and the "Performance Issues" sub-panel in DevTools. */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 872a0601728..feb2512c614 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -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<> + * @generated SignedSource<<6fb19235ba5049e07952cfa1b564e9e2>> */ /** @@ -79,7 +79,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var fuseboxNetworkInspectionEnabledCache: Boolean? = null private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null private var overrideBySynchronousMountPropsAtMountingAndroidCache: Boolean? = null - private var passScrollToSwipeRefreshChildCache: Boolean? = null private var perfIssuesEnabledCache: Boolean? = null private var perfMonitorV2EnabledCache: Boolean? = null private var preparedTextCacheSizeCache: Double? = null @@ -630,15 +629,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun passScrollToSwipeRefreshChild(): Boolean { - var cached = passScrollToSwipeRefreshChildCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.passScrollToSwipeRefreshChild() - passScrollToSwipeRefreshChildCache = cached - } - return cached - } - override fun perfIssuesEnabled(): Boolean { var cached = perfIssuesEnabledCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 70405bde5a4..2ea5986878f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -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<> + * @generated SignedSource<<6410500cbf5a05b1f34efd12d1e83bdf>> */ /** @@ -146,8 +146,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean - @DoNotStrip @JvmStatic public external fun passScrollToSwipeRefreshChild(): Boolean - @DoNotStrip @JvmStatic public external fun perfIssuesEnabled(): Boolean @DoNotStrip @JvmStatic public external fun perfMonitorV2Enabled(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 0f5cdfc8879..917c6803923 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -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<<293c71559a8101698003f517a98af514>> + * @generated SignedSource<<6c664176cf41ffb9f2bf820f15ed7463>> */ /** @@ -141,8 +141,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean = false - override fun passScrollToSwipeRefreshChild(): Boolean = false - override fun perfIssuesEnabled(): Boolean = false override fun perfMonitorV2Enabled(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index 8be2c01bf00..3a389ccea99 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -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<<0f1bedf79aaaddc0ff69155ad4593ad3>> + * @generated SignedSource<<1403b30f4dc3d18f39303d91d6824bda>> */ /** @@ -83,7 +83,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var fuseboxNetworkInspectionEnabledCache: Boolean? = null private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null private var overrideBySynchronousMountPropsAtMountingAndroidCache: Boolean? = null - private var passScrollToSwipeRefreshChildCache: Boolean? = null private var perfIssuesEnabledCache: Boolean? = null private var perfMonitorV2EnabledCache: Boolean? = null private var preparedTextCacheSizeCache: Double? = null @@ -693,16 +692,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun passScrollToSwipeRefreshChild(): Boolean { - var cached = passScrollToSwipeRefreshChildCache - if (cached == null) { - cached = currentProvider.passScrollToSwipeRefreshChild() - accessedFeatureFlags.add("passScrollToSwipeRefreshChild") - passScrollToSwipeRefreshChildCache = cached - } - return cached - } - override fun perfIssuesEnabled(): Boolean { var cached = perfIssuesEnabledCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index e51d2038ded..542075e9b23 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -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<<85087ed95d67c12c6ac8dbf433284d1d>> + * @generated SignedSource<> */ /** @@ -141,8 +141,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean - @DoNotStrip public fun passScrollToSwipeRefreshChild(): Boolean - @DoNotStrip public fun perfIssuesEnabled(): Boolean @DoNotStrip public fun perfMonitorV2Enabled(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout.kt index 4733a1bb15a..7574af95151 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout.kt @@ -12,18 +12,11 @@ import android.view.ViewConfiguration import android.view.ViewGroup import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.facebook.react.bridge.ReactContext -import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags import com.facebook.react.uimanager.PixelUtil import com.facebook.react.uimanager.events.NativeGestureUtil import kotlin.math.abs -/** - * Basic extension of [SwipeRefreshLayout] with ReactNative-specific functionality. - * - * This component wraps a scrollable child (typically a ScrollView or RecyclerView) and provides - * pull-to-refresh functionality. It handles touch event interception for the refresh gesture while - * properly forwarding other events to its children. - */ +/** Basic extension of [SwipeRefreshLayout] with ReactNative-specific functionality. */ public class ReactSwipeRefreshLayout(reactContext: ReactContext) : SwipeRefreshLayout(reactContext) { @@ -134,31 +127,6 @@ public class ReactSwipeRefreshLayout(reactContext: ReactContext) : return true } - /** - * Dispatches generic motion events to children. - * - * This override ensures that [MotionEvent.ACTION_SCROLL] events (from joystick, scrollwheel, or - * other pointing devices) are properly forwarded to child views. - */ - public override fun dispatchGenericMotionEvent(ev: MotionEvent): Boolean { - // For ACTION_SCROLL events, dispatch to child for handling - // The child ScrollView will use nested scrolling APIs to communicate with this - // SwipeRefreshLayout - if ( - ReactNativeFeatureFlags.passScrollToSwipeRefreshChild() && - ev.actionMasked == MotionEvent.ACTION_SCROLL - ) { - val child = getChildAt(0) - if (child != null) { - val handled = child.dispatchGenericMotionEvent(ev) - if (handled) { - return true - } - } - } - return super.dispatchGenericMotionEvent(ev) - } - private companion object { private const val DEFAULT_CIRCLE_TARGET = 64f } diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index f95005c7c05..753aef7d2a4 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -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<<131ba2b067fb63576bbc94cfb2521d06>> + * @generated SignedSource<<288cffd334fdaebf18b1bede7bb907c8>> */ /** @@ -393,12 +393,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool passScrollToSwipeRefreshChild() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("passScrollToSwipeRefreshChild"); - return method(javaProvider_); - } - bool perfIssuesEnabled() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("perfIssuesEnabled"); @@ -806,11 +800,6 @@ bool JReactNativeFeatureFlagsCxxInterop::overrideBySynchronousMountPropsAtMounti return ReactNativeFeatureFlags::overrideBySynchronousMountPropsAtMountingAndroid(); } -bool JReactNativeFeatureFlagsCxxInterop::passScrollToSwipeRefreshChild( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::passScrollToSwipeRefreshChild(); -} - bool JReactNativeFeatureFlagsCxxInterop::perfIssuesEnabled( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::perfIssuesEnabled(); @@ -1109,9 +1098,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "overrideBySynchronousMountPropsAtMountingAndroid", JReactNativeFeatureFlagsCxxInterop::overrideBySynchronousMountPropsAtMountingAndroid), - makeNativeMethod( - "passScrollToSwipeRefreshChild", - JReactNativeFeatureFlagsCxxInterop::passScrollToSwipeRefreshChild), makeNativeMethod( "perfIssuesEnabled", JReactNativeFeatureFlagsCxxInterop::perfIssuesEnabled), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 0740a5b1a8e..6b46be11879 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -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<> + * @generated SignedSource<> */ /** @@ -207,9 +207,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool overrideBySynchronousMountPropsAtMountingAndroid( facebook::jni::alias_ref); - static bool passScrollToSwipeRefreshChild( - facebook::jni::alias_ref); - static bool perfIssuesEnabled( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index baf966d2ca3..9534f6c2bde 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -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<<3df4827c2f80663280d762d64448873f>> + * @generated SignedSource<> */ /** @@ -262,10 +262,6 @@ bool ReactNativeFeatureFlags::overrideBySynchronousMountPropsAtMountingAndroid() return getAccessor().overrideBySynchronousMountPropsAtMountingAndroid(); } -bool ReactNativeFeatureFlags::passScrollToSwipeRefreshChild() { - return getAccessor().passScrollToSwipeRefreshChild(); -} - bool ReactNativeFeatureFlags::perfIssuesEnabled() { return getAccessor().perfIssuesEnabled(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 442bb8cc531..542d8ca8311 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -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<<3e7c529929a70e9539193237baed2e89>> + * @generated SignedSource<<66c8c46d66dde5eb2fd19a67459c83af>> */ /** @@ -334,11 +334,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool overrideBySynchronousMountPropsAtMountingAndroid(); - /** - * When enabled, ReactSwipeRefreshLayout will forward ACTION_SCROLL events to its child for proper handling. - */ - RN_EXPORT static bool passScrollToSwipeRefreshChild(); - /** * Enable reporting Performance Issues (`detail.devtools.performanceIssue`). Displayed in the V2 Performance Monitor and the "Performance Issues" sub-panel in DevTools. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 474f6d6c841..a49d225d6ed 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -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<<9ec16e6422e98c7afd1c0d7d776779fa>> + * @generated SignedSource<> */ /** @@ -1091,24 +1091,6 @@ bool ReactNativeFeatureFlagsAccessor::overrideBySynchronousMountPropsAtMountingA return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::passScrollToSwipeRefreshChild() { - auto flagValue = passScrollToSwipeRefreshChild_.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(59, "passScrollToSwipeRefreshChild"); - - flagValue = currentProvider_->passScrollToSwipeRefreshChild(); - passScrollToSwipeRefreshChild_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::perfIssuesEnabled() { auto flagValue = perfIssuesEnabled_.load(); @@ -1118,7 +1100,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(60, "perfIssuesEnabled"); + markFlagAsAccessed(59, "perfIssuesEnabled"); flagValue = currentProvider_->perfIssuesEnabled(); perfIssuesEnabled_ = flagValue; @@ -1136,7 +1118,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(61, "perfMonitorV2Enabled"); + markFlagAsAccessed(60, "perfMonitorV2Enabled"); flagValue = currentProvider_->perfMonitorV2Enabled(); perfMonitorV2Enabled_ = flagValue; @@ -1154,7 +1136,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(62, "preparedTextCacheSize"); + markFlagAsAccessed(61, "preparedTextCacheSize"); flagValue = currentProvider_->preparedTextCacheSize(); preparedTextCacheSize_ = flagValue; @@ -1172,7 +1154,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(63, "preventShadowTreeCommitExhaustion"); + markFlagAsAccessed(62, "preventShadowTreeCommitExhaustion"); flagValue = currentProvider_->preventShadowTreeCommitExhaustion(); preventShadowTreeCommitExhaustion_ = flagValue; @@ -1190,7 +1172,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(64, "shouldPressibilityUseW3CPointerEventsForHover"); + markFlagAsAccessed(63, "shouldPressibilityUseW3CPointerEventsForHover"); flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover(); shouldPressibilityUseW3CPointerEventsForHover_ = flagValue; @@ -1208,7 +1190,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(65, "shouldTriggerResponderTransferOnScrollAndroid"); + markFlagAsAccessed(64, "shouldTriggerResponderTransferOnScrollAndroid"); flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid(); shouldTriggerResponderTransferOnScrollAndroid_ = flagValue; @@ -1226,7 +1208,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(66, "skipActivityIdentityAssertionOnHostPause"); + markFlagAsAccessed(65, "skipActivityIdentityAssertionOnHostPause"); flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause(); skipActivityIdentityAssertionOnHostPause_ = flagValue; @@ -1244,7 +1226,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(67, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(66, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -1262,7 +1244,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(68, "updateRuntimeShadowNodeReferencesOnCommit"); + markFlagAsAccessed(67, "updateRuntimeShadowNodeReferencesOnCommit"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit(); updateRuntimeShadowNodeReferencesOnCommit_ = flagValue; @@ -1280,7 +1262,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(69, "useAlwaysAvailableJSErrorHandling"); + markFlagAsAccessed(68, "useAlwaysAvailableJSErrorHandling"); flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling(); useAlwaysAvailableJSErrorHandling_ = flagValue; @@ -1298,7 +1280,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(70, "useFabricInterop"); + markFlagAsAccessed(69, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -1316,7 +1298,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(71, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(70, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -1334,7 +1316,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(72, "useSharedAnimatedBackend"); + markFlagAsAccessed(71, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1352,7 +1334,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(73, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(72, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1370,7 +1352,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(74, "useTurboModuleInterop"); + markFlagAsAccessed(73, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1388,7 +1370,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(75, "useTurboModules"); + markFlagAsAccessed(74, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; @@ -1406,7 +1388,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(76, "viewCullingOutsetRatio"); + markFlagAsAccessed(75, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1424,7 +1406,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(77, "virtualViewPrerenderRatio"); + markFlagAsAccessed(76, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index 684a1f62d21..f88206c070a 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -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<> + * @generated SignedSource<<40870eeb15b0536567bf7bc6c95b7f45>> */ /** @@ -91,7 +91,6 @@ class ReactNativeFeatureFlagsAccessor { bool fuseboxNetworkInspectionEnabled(); bool hideOffscreenVirtualViewsOnIOS(); bool overrideBySynchronousMountPropsAtMountingAndroid(); - bool passScrollToSwipeRefreshChild(); bool perfIssuesEnabled(); bool perfMonitorV2Enabled(); double preparedTextCacheSize(); @@ -121,7 +120,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 78> accessedFeatureFlags_; + std::array, 77> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -182,7 +181,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> fuseboxNetworkInspectionEnabled_; std::atomic> hideOffscreenVirtualViewsOnIOS_; std::atomic> overrideBySynchronousMountPropsAtMountingAndroid_; - std::atomic> passScrollToSwipeRefreshChild_; std::atomic> perfIssuesEnabled_; std::atomic> perfMonitorV2Enabled_; std::atomic> preparedTextCacheSize_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index a2973975d64..cec64942779 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -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<<6a4d99365bdd62d89ab5b33dd014bed3>> + * @generated SignedSource<<046cb410368bfb2d3ba6ed3364376f28>> */ /** @@ -263,10 +263,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool passScrollToSwipeRefreshChild() override { - return false; - } - bool perfIssuesEnabled() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index a4ac8243e6d..fca7c12df6c 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -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<<93a08f1864437e6fe4fc90800d7b8b31>> + * @generated SignedSource<> */ /** @@ -576,15 +576,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::overrideBySynchronousMountPropsAtMountingAndroid(); } - bool passScrollToSwipeRefreshChild() override { - auto value = values_["passScrollToSwipeRefreshChild"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::passScrollToSwipeRefreshChild(); - } - bool perfIssuesEnabled() override { auto value = values_["perfIssuesEnabled"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index dfc55ea3ee1..a1c4c62046e 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -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<<04cc670e379f09e13f6e4b017c0b6468>> + * @generated SignedSource<> */ /** @@ -84,7 +84,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool fuseboxNetworkInspectionEnabled() = 0; virtual bool hideOffscreenVirtualViewsOnIOS() = 0; virtual bool overrideBySynchronousMountPropsAtMountingAndroid() = 0; - virtual bool passScrollToSwipeRefreshChild() = 0; virtual bool perfIssuesEnabled() = 0; virtual bool perfMonitorV2Enabled() = 0; virtual double preparedTextCacheSize() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index b2d719d1966..a3d6ab4a3dc 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -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<<24e3e282a3447ef0f8e4685bdee7ee7e>> + * @generated SignedSource<> */ /** @@ -339,11 +339,6 @@ bool NativeReactNativeFeatureFlags::overrideBySynchronousMountPropsAtMountingAnd return ReactNativeFeatureFlags::overrideBySynchronousMountPropsAtMountingAndroid(); } -bool NativeReactNativeFeatureFlags::passScrollToSwipeRefreshChild( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::passScrollToSwipeRefreshChild(); -} - bool NativeReactNativeFeatureFlags::perfIssuesEnabled( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::perfIssuesEnabled(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 69a1921d0aa..7463e69666c 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -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<> + * @generated SignedSource<<6d28ea5d159f53988ca76188bc2fa5c0>> */ /** @@ -154,8 +154,6 @@ class NativeReactNativeFeatureFlags bool overrideBySynchronousMountPropsAtMountingAndroid(jsi::Runtime& runtime); - bool passScrollToSwipeRefreshChild(jsi::Runtime& runtime); - bool perfIssuesEnabled(jsi::Runtime& runtime); bool perfMonitorV2Enabled(jsi::Runtime& runtime); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 125f10cbcba..79e040c25ca 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -679,17 +679,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - passScrollToSwipeRefreshChild: { - defaultValue: false, - metadata: { - dateAdded: '2026-01-13', - description: - 'When enabled, ReactSwipeRefreshLayout will forward ACTION_SCROLL events to its child for proper handling.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, perfIssuesEnabled: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 27fe5f8e155..a8a675b19ef 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -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<<43d84ba3660c1398624b33b7801752ec>> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -106,7 +106,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ fuseboxNetworkInspectionEnabled: Getter, hideOffscreenVirtualViewsOnIOS: Getter, overrideBySynchronousMountPropsAtMountingAndroid: Getter, - passScrollToSwipeRefreshChild: Getter, perfIssuesEnabled: Getter, perfMonitorV2Enabled: Getter, preparedTextCacheSize: Getter, @@ -427,10 +426,6 @@ export const hideOffscreenVirtualViewsOnIOS: Getter = createNativeFlagG * Override props at mounting with synchronously mounted (i.e. direct manipulation) props from Native Animated. */ export const overrideBySynchronousMountPropsAtMountingAndroid: Getter = createNativeFlagGetter('overrideBySynchronousMountPropsAtMountingAndroid', false); -/** - * When enabled, ReactSwipeRefreshLayout will forward ACTION_SCROLL events to its child for proper handling. - */ -export const passScrollToSwipeRefreshChild: Getter = createNativeFlagGetter('passScrollToSwipeRefreshChild', false); /** * Enable reporting Performance Issues (`detail.devtools.performanceIssue`). Displayed in the V2 Performance Monitor and the "Performance Issues" sub-panel in DevTools. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index 730661dffd4..9a82ef4f17b 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -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<<7cdd88679f9216b12bf60fc98ca7e33a>> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -84,7 +84,6 @@ export interface Spec extends TurboModule { +fuseboxNetworkInspectionEnabled?: () => boolean; +hideOffscreenVirtualViewsOnIOS?: () => boolean; +overrideBySynchronousMountPropsAtMountingAndroid?: () => boolean; - +passScrollToSwipeRefreshChild?: () => boolean; +perfIssuesEnabled?: () => boolean; +perfMonitorV2Enabled?: () => boolean; +preparedTextCacheSize?: () => number;