GestureDetector should bubble touches if all gestures fail (or some other generalized solution)
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 39/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react-native, typescript
- Área
- mobile
Línea de trabajo
Start by reading the GestureDetector and gesture coordination documentation or entry points mentioned by the project; the issue names no specific files or tests. Explore how nested gestures handle touches when recognizers fail, then define what a generalized bubbling or coordination solution should do. Done means the project has a clear approach for the described nested SelectableText and Bubble case, with behavior that can be verified across Android and iOS.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Imagine the following example component hierarchy:
Bubble( Message( MarkdownMessage( MarkdownView( SelectableText, SelectableText, ... ) ) ) )
Where SelectableText contains a GestureDetector and has a tap + longPress + pan + ... gestures to make text selectable.
What happens if you want to make the Bubble tappable?
Right now this is borderline impossible because:
- If you put a
PressableinsideBubble, it would never get triggered becauseSelectableTextdeep down hasGestureDetectors that are eating up all touches, even if the gestures are all failing - If you put a
GestureDetectorinsideBubbleand then attach atapGestureto it, then the same problem as above happens, except that if you SOMEHOW manage to deliver thetapGestureto everySelectableTextdeep down downstream, thenrequireToFail/block/simultaneousWithcan be used to define coordination logic
Except there is no clean way to do the latter at all? Like even if I decided to do massive props drilling (somehow), what would SelectableText's props be? gesturesToRequireToFail and gesturesToBlock and gesturesTo... what? SelectableText is a general component
I think at least for this example automatic touch propagation if all registered gestures fail works, but perhaps there needs to be a more generalized/flexible solution to this problem.
Right now an innermost GestureDetector anywhere in the tree effectively takes exclusive access to touches made on the pixels it covers, simply because there's no practical way to bubble touches properly
(I can try rephrase this issue if it isn't clear enough)
Steps to reproduce
A hierarchy like this (where every component lives in a different file):
<!-- ⚠️ There's no practical way to coordinate between `bubbleTapGesture` and `bunchOfGestures`s downstream -->
<Bubble>
<GestureDetector gestures={bubbleTapGesture}>
<Message>
<MarkdownMessage>
<MarkdownView>
<SelectableText>
<GestureDetector gestures={bunchOfGestures}>
<!-- Content -->
</GestureDetector>
</SelectableText>
<SelectableText>
<GestureDetector gestures={bunchOfGestures}>
<!-- Content -->
</GestureDetector>
</SelectableText>
<SelectableText>
<GestureDetector gestures={bunchOfGestures}>
<!-- Content -->
</GestureDetector>
</SelectableText>
<SelectableText>
<GestureDetector gestures={bunchOfGestures}>
<!-- Content -->
</GestureDetector>
</SelectableText>
<SelectableText>
<GestureDetector gestures={bunchOfGestures}>
<!-- Content -->
</GestureDetector>
</SelectableText>
</MarkdownView>
</MarkdownMessage>
</Message>
</GestureDetector>
</Bubble>
A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.
It's not a "bug" it's a usage/architectural problem
Gesture Handler version
3.4.0
React Native version
0.88.0
Platforms
Android, iOS
JavaScript runtime
None
Workflow
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.8k
- Forks
- 1.1k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 28
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de software-mansion/react-native-gesture-handler
-
[Web] A pan that starts on a Pressable presses it when the mouse button is releasedPosiblemente ocupada @mokshupadhyay la tomó hace 1 día. AbiertoPlatform: Web
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
software-mansion/react-native-gesture-handler#4713 ·
Los mantenedores suelen responder en 2 días
-
[iOS] Crash at app exit: static `_managers` map destroyed while `flushOperations` reads itPosiblemente ocupada @beqramo la tomó hace 5 días. AbiertoMissing info Missing repro Platform: iOS Platform: MacOS
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
software-mansion/react-native-gesture-handler#4711 · 3 comentarios ·
Los mantenedores suelen responder en 2 días
-
[iOS][Fabric] Recognizer of a live handler stays on a recycled view and takes every drag on the component that reuses itPosiblemente ocupada @nihar777 la tomó hace 5 días. AbiertoPlatform: iOS
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
software-mansion/react-native-gesture-handler#4710 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
[iOS] Button press feedback invisible on quick taps when Reduce Motion is enabledPosiblemente ocupada @andreialecu la tomó hace 7 días. AbiertoMissing info Platform: iOS Platform: MacOS
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
software-mansion/react-native-gesture-handler#4707 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
Missing info Platform: Android
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
software-mansion/react-native-gesture-handler#4706 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de software-mansion/react-native-gesture-handler
Issues similares
-
enhancement from-app needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nightly-labs/openbot#19162 ·
Los mantenedores suelen responder en 1 día
-
triage:in-progress
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Cotal-AI/Cotal#11229 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
npm ci fails with EALLOWREMOTE on npm 12Posiblemente ocupada @landry-kapgnep la tomó hoy. Abiertostatus/need-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
google-gemini/gemini-cli#30525 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
omdsh-dev/DSH-better-sidebar#1290 ·
Los mantenedores suelen responder en 1 día
-
Suggest a wallet: WalletChanPosiblemente ocupada @apoorvlathey la tomó hoy. Abiertoawaiting changes needs triage 📥
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ethereum/ethereum-org-website#20000 · 3 comentarios ·
Los mantenedores suelen responder en 1 día