regression: Touchables not working on old messages in some devices#7039
regression: Touchables not working on old messages in some devices#7039diegolmello merged 1 commit intodevelopfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughReplaced a custom hybrid InvertedScrollView implementation with a simplified wrapper that renders a standard ScrollView whose single child is a native Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/views/RoomView/List/components/InvertedScrollView.tsx (1)
4-4: The native componentInvertedScrollContentViewis Android-only (confirmed by native module registration in InvertedScrollContentViewManager.java). On iOS,requireNativeComponentwill throw a runtime error. However, this component is only used in one location (List.tsx:47), where it already has a platform guard (isIOS ? undefined : props => <InvertedScrollView {...props} />), so there is no active risk.If you want additional defensive programming, consider adding a platform guard at the component level:
import { Platform } from 'react-native'; if (Platform.OS === 'ios') { throw new Error('InvertedScrollView is only supported on Android'); }This would catch any accidental imports in the future, though the current guard at the usage site is sufficient.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/views/RoomView/List/components/InvertedScrollView.tsx` at line 4, The module currently calls requireNativeComponent('InvertedScrollContentView') via NativeInvertedScrollContentView which is Android-only and will throw on iOS if imported; add a platform guard at the top of InvertedScrollView (use Platform.OS) to throw a clear Error (e.g., "InvertedScrollView is only supported on Android") or export a no-op on iOS so accidental imports fail fast; ensure you reference NativeInvertedScrollContentView and any exported component names (e.g., InvertedScrollView) when applying the guard so the requireNativeComponent is never executed on iOS.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/views/RoomView/List/components/InvertedScrollView.tsx`:
- Line 4: The module currently calls
requireNativeComponent('InvertedScrollContentView') via
NativeInvertedScrollContentView which is Android-only and will throw on iOS if
imported; add a platform guard at the top of InvertedScrollView (use
Platform.OS) to throw a clear Error (e.g., "InvertedScrollView is only supported
on Android") or export a no-op on iOS so accidental imports fail fast; ensure
you reference NativeInvertedScrollContentView and any exported component names
(e.g., InvertedScrollView) when applying the guard so the requireNativeComponent
is never executed on iOS.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6fbc6aab-49c1-4e65-a7be-90b545243eac
📒 Files selected for processing (1)
app/views/RoomView/List/components/InvertedScrollView.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ESLint and Test / run-eslint-and-test
- GitHub Check: format
🔇 Additional comments (3)
app/views/RoomView/List/components/InvertedScrollView.tsx (3)
1-2: LGTM! Clean imports with proper type-only imports.The imports are well-structured and use the
typekeyword for type-only imports, which is a TypeScript best practice that helps with tree-shaking and build optimization.
6-11: Excellent documentation of the component's purpose and constraints.The JSDoc clearly explains:
- Platform limitation (Android-only)
- The accessibility problem being solved (TalkBack reading order)
- What behavior is preserved (ScrollView JS-side semantics)
This helps prevent misuse and makes the component's intent clear.
12-20: No changes needed. The component is correctly implemented and compatible with FlatList usage.The review comment identifies a non-existent concern. The
listRefprop is explicitly typed asRefObject<FlatList>(definitions.ts line 7), not as a reference toInvertedScrollView. All methods called onlistRefin the codebase—scrollToOffset,scrollToIndex, andscrollToEnd—are FlatList methods, which are all available. InvertedScrollView is used internally as the scroll component for FlatList (viarenderScrollComponentprop), and FlatList manages this component internally. The ref forwarding in InvertedScrollView correctly forwards the ref to its internal ScrollView, which is the intended behavior.> Likely an incorrect or invalid review comment.
|
Android Build Available Rocket.Chat Experimental 4.71.0.108339 |
|
iOS Build Available Rocket.Chat Experimental 4.71.0.108340 |
66d94e6 to
0366fcb
Compare
Proposed changes
Issue(s)
Regression introduced on #6934
https://rocketchat.atlassian.net/browse/CORE-1906
https://rocketchat.atlassian.net/browse/SUP-1001
Closes #7026
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit