Remove AnimatedEvent action type from NativeDetector - #3646
Merged
Conversation
j-piasecki
reviewed
Jul 30, 2025
| @@ -176,6 +176,7 @@ - (instancetype)initWithReactTag:(NSNumber *)reactTag | |||
| state:(RNGestureHandlerState)state | |||
| extraData:(RNGestureHandlerEventExtraData *)extraData | |||
| forActionType:(NSInteger)actionType | |||
Member
There was a problem hiding this comment.
Is action type needed now in the events?
Collaborator
Author
There was a problem hiding this comment.
Seems like it is not. Removed in 9cc3073
| withActionType:(RNGestureHandlerActionType)actionType | ||
| forRecognizer:(UIGestureRecognizer *)recognizer; | ||
| withActionType:(RNGestureHandlerActionType)actionType | ||
| withAnimatedEvent:(BOOL)useAnimatedEvent |
Member
There was a problem hiding this comment.
Suggested change
| withAnimatedEvent:(BOOL)useAnimatedEvent | |
| forAnimated:(BOOL)forAnimated |
| state:(RNGestureHandlerState)state | ||
| extraData:(RNGestureHandlerEventExtraData *)extraData | ||
| forActionType:(NSInteger)actionType | ||
| withAnimatedEvent:(BOOL)useAnimatedEvent |
Member
There was a problem hiding this comment.
Suggested change
| withAnimatedEvent:(BOOL)useAnimatedEvent | |
| forAnimated:(BOOL)forAnimated |
j-piasecki
approved these changes
Jul 31, 2025
m-bert
added a commit
that referenced
this pull request
Aug 4, 2025
## Description #3646 removed _animated native detector_ action type. However, now we have to pass `dispatchesAnimatedEvents` to gesture config, what was not done automatically. This PR fixes it. ## Test plan Tested on `basic-example`
j-piasecki
added a commit
that referenced
this pull request
Aug 4, 2025
## Description #3646 removed the Animated action type, but there are still references left to `dispatchesAnimatedEvents` in the native detector, while the property has been moved to the config of individual gestures. This PR removes those references. ## Test plan Check the native detector examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We came to a conclusion that current event handling may conflict with gesture relations, such as
simultaneouswhen one of the gestures is usingAnimated. This PR removesAnimatedEventaction type fromNativeDetectorand adds flag toGestureHandler, which represents if handler should send events forAnimated.Status
Android ✅
iOS ✅
Test plan
Test
pan1,pan2andgesturefrom the code below.Note
Since
simultaneousrelation is not yet implemented, only first pan works whengestureis used. On Android you can solve that ba commenting outotherHandler.cancel()inmakeActivefunction (this line)Tested on the following code: