fix(iOS): RoomItem Swipe not working after scroll - #7532
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (3)
WalkthroughThe rooms list ChangesRooms list behavior
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Proposed changes
Removes
removeClippedSubviews={isIOS}from theRoomsListViewFlatList, which broke swipe actions onRoomItemafter the list was scrolled (iOS only).Under the New Architecture, RNGH refuses to attach a gesture recognizer to a view whose
superviewisnil, retrying for 2.5s before silently giving up. WithremoveClippedSubviewsenabled, Fabric mounts clipped cells into a bookkeeping array instead of the view hierarchy, so theGestureDetector's view inRoomItem/Touchablehad no superview when RNGH tried to attach, the pan gesture was permanently dead on every row. Tap and long press kept working because they come from the innerRectButton, which sits deeper in the subtree and attaches normally.The prop is redundant here:
getItemLayout+windowSize={9}already unmount off-window cells, and React Native disablesremoveClippedSubviewsentirely when Fabric view culling is on.###What we lose by removing it:
The clipping leeway is 44pt (kClippingLeeway in RCTScrollViewComponentView.mm), so only roughly viewport ± 44pt remained attached—about 13 rows with BASE_ROW_HEIGHT = 75, compared to as many as ~95 rows already bounded by windowSize={9}.
Since getItemLayout and windowSize={9} already bound the number of mounted rows, and manual testing on large room lists showed no regression in scroll performance, removing removeClippedSubviews restores reliable swipe behavior while giving up only an unmeasured and likely negligible optimization.
Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-1154
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
Bug Fixes