fix: Updated ButtonBase and ListItems to have gesture detection on Android cp-7.53.0#18104
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
|
3cbff92 to
bcf7ec6
Compare
|
|
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #18104 +/- ##
==========================================
+ Coverage 75.56% 75.62% +0.06%
==========================================
Files 3059 3065 +6
Lines 70200 70615 +415
Branches 12067 12173 +106
==========================================
+ Hits 53048 53405 +357
- Misses 13752 13808 +56
- Partials 3400 3402 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const { styles } = useStyles(styleSheet, { style, isDisabled }); | ||
|
|
||
| // Disable gesture wrapper in test environments to prevent test interference | ||
| const isE2ETest = |
There was a problem hiding this comment.
nit: I see this in 3 other places. We could possibly refactor this into a helper function?
| import { DEFAULT_SELECTITEM_GAP } from './ListItemSelect.constants'; | ||
| import { Gesture, GestureDetector } from 'react-native-gesture-handler'; | ||
|
|
||
| const TouchableOpacity = ({ |
There was a problem hiding this comment.
I'm possibly not looking hard enough but is there a difference with the new TouchableOpacity in the other 2-3 files? Should this be its own component?
vinnyhoward
left a comment
There was a problem hiding this comment.
Approving and aware that this is temporary so there isn't need for optimization at the moment after speaking with Brian
|
Pull Request is not mergeable
| /* no-op for synthetic event */ | ||
| }, | ||
| } as GestureResponderEvent; | ||
| onPress(syntheticEvent); |
There was a problem hiding this comment.
would this onPress being called twice?
as onPress on the RNTouchableOpacity will be called as well?


Description
This PR updated the
ButtonBase,ListItemSelect, andListItemMultiSelectto include Gesture Detector, resolving a current bug inreact-native'sTouchableOpacitycomponent occasionally not triggeringonPresson AndroidChangelog
CHANGELOG entry:
Related issues
Fixes: #18147
Manual testing steps
Screenshots/Recordings
Before
After
Everything still functional
https://github.com/user-attachments/assets/f4e9f41e-34f7-4bf8-a090-860bee411050
https://github.com/user-attachments/assets/f2791eb2-9520-4ce7-ad3e-6d0933d59c35
Pre-merge author checklist
Pre-merge reviewer checklist