[Feature request] First-class support for nested draggable / long-press pan gestures (e.g. react-native-draggable-flatlist reorder)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- ios, react-native
- Área
- mobile
Línea de trabajo
Start with BottomSheetHostingView.swift lines 997-1001 and trace the existing scrollable negotiation and gesture-delegate behavior. Use the described react-native-draggable-flatlist long-press repro to evaluate the proposed gesture-composition options. Done means nested reordering completes on iOS while sheet dragging still works elsewhere.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
There is no way to run a nested gesture-handler pan (as used by react-native-draggable-flatlist, or hand-rolled reorder handles) inside a sheet on iOS without the sheet's pan hijacking the drag mid-gesture. Android works fine — this is iOS-only.
Filing this as a feature request rather than a bug because the existing negotiation is scoped to scrollables (disableScrollableNegotiation / the new scrollableNegotiation) and doesn't have a hook for "some other gesture layer owns this touch." A distinct concern from #57 (scroll handoff) and #63 (post-threshold hit-test), though the fix in #63 may partly cover this — see below.
Concrete symptom
Setup: a full-height sheet whose content is a DraggableFlatList. Each row has a short (~36×64 pt) drag handle on the left; long-pressing the handle calls the library's drag().
- Long-press succeeds —
drag()fires and the row is picked up (ShadowDecoratoroverlay renders). - The moment the finger moves vertically, the sheet's pan claims the gesture and the sheet slides down. The overlay row stays put, the outer list gets no
onUpdate, and the reorder is impossible to complete.
Android runs the same code path end-to-end.
Why the existing knobs don't cover it
disableScrollableNegotiation/scrollableNegotiation: 'none'only inspect for aUIScrollViewancestor at the touch point. The DraggableFlatList row is inside aFlatList(which is a scroll view), so the ancestor exists — but afterdrag()fires, the library re-parents the pickup into an overlay outside the list's subtree, and the hit-test walks up from there, sees no scroll view, and the sheet's pan begins. #63 addresses part of this by capturing the touch-down location — that fix likely resolves the specific pickup case, but doesn't give the sheet a general way to defer to arbitrary nested gestures.shouldBeRequiredToFailBy: other is UIPanGestureRecognizer(BottomSheetHostingView.swift:997-1001) is meant to make the sheet wait for other pans, but iOS only routes the delegate between recognizers UIKit treats as related. A gesture-handler pan attached inside a nested subtree — especially one that becomes an overlay — often does not qualify, so the sheet doesn't actually defer to it.shouldRecognizeSimultaneouslyWithreturnsfalse, so there's no way to run the sheet pan and the nested draggable pan concurrently either.
Prior art
@gorhom/bottom-sheet— exposes the sheet's animated pan ref viauseBottomSheetGestureHandlersso nested gestures can hook.simultaneousWithExternalGesture(sheetGestureRef). Reorder libraries can be wired up explicitly.- iOS
FloatingPanel—track(scrollView:)accepts an explicit registration.
Possible implementation directions
Rough shopping list — hoping at least one is compatible with the current design:
-
Expose the sheet's pan (or a stable coordinator ref) for nested gestures to compose with. Gesture-handler consumers could then do
.simultaneousWithExternalGesture(sheetPanRef)or.requireExternalGestureToFail(sheetPanRef)explicitly — same shape as@gorhom/bottom-sheet. -
Marker prop for a subtree that owns its own gestures — e.g.
<View bottomSheetOwnsGestures={false}>(or anaccessibilityIdentifiersentinel) thatgestureRecognizerShouldBeginwalks up from the touch point; if any ancestor carries it, the sheet pan defers. -
enableContentPanningGesture: booleanprop — nuclear escape hatch. Disables the sheet's pan entirely for the sheet instance, relying on scrim tap / a close button / the handle for dismissal. Coarse but predictable, and covers the case where a whole screen is a reorder surface. -
Delegate composition — call a user-provided
shouldSheetPanBegin(touch)fromgestureRecognizerShouldBeginso the app can vote no on gesture-handler-owned regions.
Any of the four would unblock DraggableFlatList / reorder-handle use cases without giving up sheet-drag on the rest of the surface. (1) mirrors what people already know from @gorhom/bottom-sheet and is probably the most flexible.
Environment
@swmansion/react-native-bottom-sheet0.15.3 (also reproduced on 0.16.x from reading source; no functional divergence in the paths involved)react-native-draggable-flatlist4.xreact-native-reanimated4.5.2,react-native-gesture-handler2.31.x- RN 0.85.3 (Fabric), Hermes
- iOS 26 device
- Repros in every published version I checked.
Happy to test a proposal.
- Lenguaje dominante
- Kotlin
- Estrellas
- 536
- Forks
- 24
- Merge medio
- 12 h 10 min
- PR fusionados (30 d)
- 22
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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-bottom-sheet
-
Android: NoSuchElementException in ScrollIndicators.refit when a scroll view is garbage collectedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
software-mansion/react-native-bottom-sheet#140 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
software-mansion/react-native-bottom-sheet#137 ·
Los mantenedores suelen responder en 1 día
-
Feature request: opt-in native keyboard avoidancePosiblemente ocupada @Asad-Butt la tomó hace 5 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
software-mansion/react-native-bottom-sheet#134 · 1 comentario · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
software-mansion/react-native-bottom-sheet#132 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
software-mansion/react-native-bottom-sheet#74 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de software-mansion/react-native-bottom-sheet
Issues similares
-
Remove Collect againAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
thisisartman/Meguri#211 ·
Los mantenedores suelen responder en 1 día
-
follow-up
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
area:android fleet
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
emm3000/myGame#2175 · 1 comentario ·
Los mantenedores suelen responder en 1 día