-
-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Text
component
#3202
Add Text
component
#3202
Conversation
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Show resolved
Hide resolved
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Show resolved
Hide resolved
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Show resolved
Hide resolved
@@ -40,6 +42,14 @@ - (void)touchesBegan:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event | |||
{ | |||
[_gestureHandler setCurrentPointerType:event]; | |||
[_gestureHandler.pointerTracker touchesBegan:touches withEvent:event]; | |||
|
|||
#ifdef RCT_NEW_ARCH_ENABLED | |||
if ([self.view.superview isKindOfClass:[RCTParagraphComponentView class]]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the structure on the new arch? Wouldn't the gesture be attached to the paragraph component view?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The gesture itself is attached to RCTParagraphView
. Unfortunately this class is not exported - that's why I've decided to check for superview (i.e. RCTParagraphComponentView
)
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt
Outdated
Show resolved
Hide resolved
## Description Fixes circular dependency introduced in #3202 ![image](https://github.com/user-attachments/assets/4900041c-47b1-410f-a4bb-6f3dc6bfe603) ## Test plan - `npx madge --image ./madge-graph-fixed.svg --extensions js,jsx,ts,tsx --circular .`
Description
This PR adds
Text
component to Gesture Handler.Upon investigating #3159 we decided that it will be better to add our own
Text
component, instead of forcing users to create their own version ofText
withNativeViewGestureHandler
.Test plan
New example: