Skip to content

fix(iOS): RoomItem Swipe not working after scroll - #7532

Merged
OtavioStasiak merged 2 commits into
developfrom
fix.swipe-roomitem-not-working-after-scroll
Aug 5, 2026
Merged

fix(iOS): RoomItem Swipe not working after scroll#7532
OtavioStasiak merged 2 commits into
developfrom
fix.swipe-roomitem-not-working-after-scroll

Conversation

@OtavioStasiak

@OtavioStasiak OtavioStasiak commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

Removes removeClippedSubviews={isIOS} from the RoomsListView FlatList, which broke swipe actions on RoomItem after the list was scrolled (iOS only).

Under the New Architecture, RNGH refuses to attach a gesture recognizer to a view whose superview is nil, retrying for 2.5s before silently giving up. With removeClippedSubviews enabled, Fabric mounts clipped cells into a bookkeeping array instead of the view hierarchy, so the GestureDetector's view in RoomItem/Touchable had 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 inner RectButton, 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 disables removeClippedSubviews entirely 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

  • Open the app with many rooms;
  • Scroll down;
  • Try to Swipe Left and right the RoomItem to open room actions;

Screenshots

Before After

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

Bug Fixes

  • Improved room list rendering consistency by adjusting how off-screen items are handled.
  • Enhanced list scrolling and item visibility behavior across supported devices.

@OtavioStasiak
OtavioStasiak temporarily deployed to approve_e2e_testing July 30, 2026 15:42 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 84566ba3-a2bf-40d6-8f6c-24ba9b6093ed

📥 Commits

Reviewing files that changed from the base of the PR and between 576377d and 79bf756.

📒 Files selected for processing (1)
  • app/views/RoomsListView/index.tsx
💤 Files with no reviewable changes (1)
  • app/views/RoomsListView/index.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: E2E Shard Preflight
  • GitHub Check: format

Walkthrough

The rooms list FlatList no longer sets removeClippedSubviews for iOS. Other list configuration and surrounding RoomsListView behavior remain unchanged.

Changes

Rooms list behavior

Layer / File(s) Summary
FlatList configuration
app/views/RoomsListView/index.tsx
Removes the iOS-specific removeClippedSubviews={isIOS} prop from the rooms list.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

Suggested labels: type: bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the iOS swipe bug fixed by removing clipped subviews from the rooms list.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • NATIVE-1154: Request failed with status code 401

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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.

@OtavioStasiak
OtavioStasiak merged commit 140a44e into develop Aug 5, 2026
8 of 11 checks passed
@OtavioStasiak
OtavioStasiak deleted the fix.swipe-roomitem-not-working-after-scroll branch August 5, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants