Skip to content

Commit 1a6ef8a

Browse files
committed
Merge branch 'main' into 2.23-stable
2 parents fa2f309 + 03be039 commit 1a6ef8a

12 files changed

+37
-19
lines changed

FabricExample/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ PODS:
14991499
- React-logger (= 0.77.0)
15001500
- React-perflogger (= 0.77.0)
15011501
- React-utils (= 0.77.0)
1502-
- RNGestureHandler (2.23.0):
1502+
- RNGestureHandler (2.23.1):
15031503
- DoubleConversion
15041504
- glog
15051505
- hermes-engine
@@ -1801,7 +1801,7 @@ SPEC CHECKSUMS:
18011801
ReactAppDependencyProvider: 6e8d68583f39dc31ee65235110287277eb8556ef
18021802
ReactCodegen: c08a5113d9c9c895fe10f3c296f74c6b705a60a9
18031803
ReactCommon: 1bd2dc684d7992acbf0dfee887b89a57a1ead86d
1804-
RNGestureHandler: b57c633defe01be73dfed9d645158fb21d6039d4
1804+
RNGestureHandler: 93014de1ee4e1d539a74c6ce7aea72edd1fff6e0
18051805
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
18061806
Yoga: 78d74e245ed67bb94275a1316cdc170b9b7fe884
18071807

MacOSExample/macos/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ PODS:
11661166
- React-utils (= 0.74.6)
11671167
- RNCAsyncStorage (1.24.0):
11681168
- React-Core
1169-
- RNGestureHandler (2.23.0):
1169+
- RNGestureHandler (2.23.1):
11701170
- DoubleConversion
11711171
- glog
11721172
- hermes-engine
@@ -1443,10 +1443,10 @@ EXTERNAL SOURCES:
14431443

14441444
SPEC CHECKSUMS:
14451445
boost: 0686b6af8cbd638c784fea5afb789be66699823c
1446-
DoubleConversion: 5b92c4507c560bb62e7aa1acdf2785ea3ff08b3b
1446+
DoubleConversion: acaf5db79676d2e9119015819153f0f99191de12
14471447
FBLazyVector: 8f41053475f558b29633b434bd62929813a38560
14481448
fmt: 03574da4b7ba40de39da59677ca66610ce8c4a02
1449-
glog: ba31c1afa7dcf1915a109861bccdb4421be6175b
1449+
glog: 6df0a3d6e2750a50609471fd1a01fd2948d405b5
14501450
hermes-engine: 21ea4e6a0b64854652c8c20cb815efdbb3131fdd
14511451
RCT-Folly: 2edbb9597acadc2312235c7ad6243d49852047a3
14521452
RCTDeprecation: 5f1d7e1f8ef6c53f0207e3ac0d0ca23575e8a6ab
@@ -1496,7 +1496,7 @@ SPEC CHECKSUMS:
14961496
React-utils: d1f30e28b14bea6aa6b009be03ab502bbf2cf5c6
14971497
ReactCommon: 68cae4af53cf2d34e6a26c0099f434f170495dd1
14981498
RNCAsyncStorage: ec53e44dc3e75b44aa2a9f37618a49c3bc080a7a
1499-
RNGestureHandler: 2e6a9c6361b44a11795d51353445d65ba558cb1d
1499+
RNGestureHandler: 006e7ebf1a3d37843d951031389fb12712c7dd8e
15001500
RNReanimated: 45553a3ae29a75a76269595f8554d07d4090e392
15011501
RNSVG: 4590aa95758149fa27c5c83e54a6a466349a1688
15021502
SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9

RNGestureHandler.podspec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,12 @@ Pod::Spec.new do |s|
2929
else
3030
s.dependency "React-Core"
3131
end
32+
33+
if ENV['USE_FRAMEWORKS'] != nil && ENV['RCT_NEW_ARCH_ENABLED'] == '1'
34+
add_dependency(s, "React-FabricComponents", :additional_framework_paths => [
35+
"react/renderer/textlayoutmanager/platform/ios",
36+
"react/renderer/components/textinput/platform/ios",
37+
])
38+
end
39+
3240
end

apple/RNGestureHandlerButton.mm

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,20 @@ - (BOOL)shouldHandleTouch:(RNGHUIView *)view
6464
return button.userEnabled;
6565
}
6666

67+
// Certain subviews such as RCTViewComponentView have been observed to have disabled
68+
// accessibility gesture recognizers such as _UIAccessibilityHUDGateGestureRecognizer,
69+
// ostensibly set by iOS. Such gesture recognizers cause this function to return YES
70+
// even when the passed view is static text and does not respond to touches. This in
71+
// turn prevents the button from receiving touches, breaking functionality. To handle
72+
// such case, we can count only the enabled gesture recognizers when determining
73+
// whether a view should receive touches.
74+
NSPredicate *isEnabledPredicate = [NSPredicate predicateWithFormat:@"isEnabled == YES"];
75+
NSArray *enabledGestureRecognizers = [view.gestureRecognizers filteredArrayUsingPredicate:isEnabledPredicate];
76+
6777
#if !TARGET_OS_OSX
68-
return [view isKindOfClass:[UIControl class]] || [view.gestureRecognizers count] > 0;
78+
return [view isKindOfClass:[UIControl class]] || [enabledGestureRecognizers count] > 0;
6979
#else
70-
return [view isKindOfClass:[NSControl class]] || [view.gestureRecognizers count] > 0;
80+
return [view isKindOfClass:[NSControl class]] || [enabledGestureRecognizers count] > 0;
7181
#endif
7282
}
7383

docs/docs/components/touchables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_label: Touchables
55
---
66

77
:::warning
8-
Touchables will be removed in the future version of Gesture Handler.
8+
Touchables will be removed in the future version of Gesture Handler. Use Pressable instead.
99
:::
1010

1111
Gesture Handler library provides an implementation of RN's touchable components that are based on [native buttons](buttons.mdx) and does not rely on JS responder system utilized by RN. Our touchable implementation follows the same API and aims to be a drop-in replacement for touchables available in React Native.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-gesture-handler",
3-
"version": "2.23.0",
3+
"version": "2.23.1",
44
"description": "Declarative API exposing native platform touch and gesture system to React Native",
55
"scripts": {
66
"prepare": "bob build && husky install",

src/components/touchables/TouchableHighlight.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ interface State {
2020
}
2121

2222
/**
23-
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler.
23+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
2424
*/
2525
export type TouchableHighlightProps = RNTouchableHighlightProps &
2626
GenericTouchableProps;
2727

2828
/**
29-
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler.
29+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
3030
*
3131
* TouchableHighlight follows RN's implementation
3232
*/

src/components/touchables/TouchableNativeFeedback.android.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from './TouchableNativeFeedbackProps';
99

1010
/**
11-
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
11+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
1212
*
1313
* TouchableNativeFeedback behaves slightly different than RN's TouchableNativeFeedback.
1414
* There's small difference with handling long press ripple since RN's implementation calls

src/components/touchables/TouchableNativeFeedback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { TouchableNativeFeedback as RNTouchableNativeFeedback } from 'react-native';
22

33
/**
4-
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
4+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
55
*/
66
const TouchableNativeFeedback = RNTouchableNativeFeedback;
77

src/components/touchables/TouchableNativeFeedbackProps.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export type TouchableNativeFeedbackExtraProps = {
99
};
1010

1111
/**
12-
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler.
12+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
1313
*/
1414
export type TouchableNativeFeedbackProps = RNTouchableNativeFeedbackProps &
1515
GenericTouchableProps;

src/components/touchables/TouchableOpacity.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ import * as React from 'react';
1111
import { Component } from 'react';
1212

1313
/**
14-
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
14+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
1515
*/
1616
export type TouchableOpacityProps = RNTouchableOpacityProps &
1717
GenericTouchableProps & {
1818
useNativeAnimations?: boolean;
1919
};
2020

2121
/**
22-
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler.
22+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
2323
*
2424
* TouchableOpacity bases on timing animation which has been used in RN's core
2525
*/

src/components/touchables/TouchableWithoutFeedback.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import GenericTouchable from './GenericTouchable';
44
import type { GenericTouchableProps } from './GenericTouchableProps';
55

66
/**
7-
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler.
7+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
88
*/
99
export type TouchableWithoutFeedbackProps = GenericTouchableProps;
1010

1111
/**
12-
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler.
12+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
1313
*/
1414
const TouchableWithoutFeedback = React.forwardRef<
1515
GenericTouchable,

0 commit comments

Comments
 (0)