fix(topic-list): Android topics list pin button unresponsive + add pin/unpin reorder animation - #462
Conversation
…n/unpin reorder animation
- Replace react-native Pressable with RNGH RectButton in TopicPinAction to
prevent Pan gesture from intercepting touches on Android
- Use AnimatedLegendList from @legendapp/list/reanimated with
itemLayoutAnimation={LinearTransition.duration(280)} for smooth
pin/unpin reorder animation
…s for Jest - Mock @legendapp/list/reanimated with AnimatedLegendList - Mock react-native-gesture-handler with Gesture, GestureDetector, RectButton - Add LinearTransition to react-native-reanimated mock
|
I dug into the left/right asymmetry, and I don't think the parent This project is using This is the upstream issue reported in software-mansion/react-native-gesture-handler#3223 and fixed by #4192. The upstream fix disables pointer events on whichever action container is hidden: pointerEvents: showLeftProgress.value === 0 ? 'none' : 'auto'
pointerEvents: showRightProgress.value === 0 ? 'none' : 'auto'Expo SDK 57 currently expects RNGH The |
1168610 to
d6c7f75
Compare
Changes
Fix: Pin button on Android (
TopicPinAction)Pressablefromreact-nativewithRectButtonfromreact-native-gesture-handler.RectButtonregisters a native gesturehandler that correctly negotiates priority with the parent
PanGestureHandlerwithin the same gesture system, so taps are deliveredreliably.
Animation: Pin/unpin reorder
LegendList(@legendapp/list/react-native) toAnimatedLegendList(@legendapp/list/reanimated) — the reanimatedvariant supports
itemLayoutAnimation.itemLayoutAnimation={LinearTransition.duration(280)}so pinnedtopics animate smoothly to the top section and unpinned topics animate
back to the chronological list, with surrounding items easing into their
new positions.