Skip to content

[General] Change yieldsToNativeGestures to yieldsToContinuousGestures - #4152

Merged
j-piasecki merged 3 commits into
mainfrom
@jpiasecki/yields-to-continous-gestures
May 7, 2026
Merged

[General] Change yieldsToNativeGestures to yieldsToContinuousGestures#4152
j-piasecki merged 3 commits into
mainfrom
@jpiasecki/yields-to-continous-gestures

Conversation

@j-piasecki

Copy link
Copy Markdown
Member

Description

Changes yieldsToNativeGestures to yieldsToContinuousGestures. Instead of allowing native gestures to take precedence, it allows all continuous gestures to do so.

Test plan

Updated Reanimated Swipeable example to use Touchable

Copilot AI review requested due to automatic review settings May 7, 2026 08:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the Native gesture configuration option from yieldsToNativeGestures to yieldsToContinuousGestures, broadening the “yield” behavior from only Native-view peers to any continuous gesture across Web, Android, and iOS.

Changes:

  • Replaced yieldsToNativeGestures with yieldsToContinuousGestures in public types/config and docs.
  • Introduced a cross-platform isContinuous flag (Web/Android/iOS) and marked relevant handlers as continuous.
  • Updated the common-app Reanimated Swipeable example to use the v3 Touchable.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/react-native-gesture-handler/src/web/interfaces.ts Renames the web config field to yieldsToContinuousGestures.
packages/react-native-gesture-handler/src/web/handlers/RotationGestureHandler.ts Marks Rotation as isContinuous on web.
packages/react-native-gesture-handler/src/web/handlers/PinchGestureHandler.ts Marks Pinch as isContinuous on web.
packages/react-native-gesture-handler/src/web/handlers/PanGestureHandler.ts Marks Pan as isContinuous on web.
packages/react-native-gesture-handler/src/web/handlers/NativeViewGestureHandler.ts Applies renamed config and updates interruption logic to use isContinuous.
packages/react-native-gesture-handler/src/web/handlers/ManualGestureHandler.ts Marks Manual as isContinuous on web.
packages/react-native-gesture-handler/src/web/handlers/IGestureHandler.ts Adds isContinuous to the web handler interface.
packages/react-native-gesture-handler/src/web/handlers/HoverGestureHandler.ts Marks Hover as isContinuous on web.
packages/react-native-gesture-handler/src/web/handlers/GestureHandler.ts Adds default isContinuous = false to the web base handler.
packages/react-native-gesture-handler/src/v3/hooks/gestures/native/NativeTypes.ts Renames the v3 Native config property and updates the native-props whitelist set.
packages/react-native-gesture-handler/src/v3/components/Touchable/Touchable.tsx Switches Touchable’s internal Native gesture config to yieldsToContinuousGestures: true.
packages/react-native-gesture-handler/apple/RNGestureHandler.mm Adds default -isContinuous implementation returning NO.
packages/react-native-gesture-handler/apple/RNGestureHandler.h Exposes -isContinuous on the base iOS handler interface.
packages/react-native-gesture-handler/apple/Handlers/RNRotationHandler.m Marks Rotation as continuous on iOS.
packages/react-native-gesture-handler/apple/Handlers/RNPinchHandler.m Marks Pinch as continuous on iOS.
packages/react-native-gesture-handler/apple/Handlers/RNPanHandler.m Marks Pan as continuous on iOS.
packages/react-native-gesture-handler/apple/Handlers/RNNativeViewHandler.mm Renames config key and uses isContinuous to decide which recognizers to preserve.
packages/react-native-gesture-handler/apple/Handlers/RNManualHandler.m Marks Manual as continuous on iOS.
packages/react-native-gesture-handler/apple/Handlers/RNHoverHandler.m Marks Hover as continuous on iOS (iOS + macOS sections).
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt Marks RootViewGestureHandler as continuous on Android.
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt Marks Rotation as continuous on Android.
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt Marks Pinch as continuous on Android.
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt Marks Pan as continuous on Android.
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt Renames config key and updates interruption logic to use isContinuous.
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt Marks Manual as continuous on Android.
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt Marks Hover as continuous on Android.
packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt Adds base isContinuous flag (default false) on Android.
packages/docs-gesture-handler/docs/gestures/use-native-gesture.mdx Updates documentation to the new option name and semantics.
apps/common-app/src/new_api/components/swipeable/index.tsx Updates example row pressable from RectButton to v3 Touchable.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@j-piasecki
j-piasecki merged commit 7f18432 into main May 7, 2026
12 checks passed
@j-piasecki
j-piasecki deleted the @jpiasecki/yields-to-continous-gestures branch May 7, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants