fix: isolate horizontal scroll in disassembly view (#348)#725
fix: isolate horizontal scroll in disassembly view (#348)#725
Conversation
Previously, horizontalScroll modifier was applied directly on InfiniteList (which wraps a LazyColumn). This caused the horizontal scroll gesture to compete with the vertical LazyColumn scroll, resulting in accidental horizontal movement when users slightly tilted their finger while scrolling vertically. Fix: Wrap InfiniteList in a Box that owns horizontal scroll, while InfiniteList/LazyColumn owns only vertical scroll. This ensures vertical scroll takes priority over horizontal, eliminating accidental tab/scroll switching. Fixes #348
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change restructures horizontal scrolling in the disassembly tab by moving the scroll modifier from the InfiniteList to a surrounding Box container with a dedicated scroll state, improving scroll sensitivity handling without altering the core rendering logic. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
Summary
Fixes #348 — Slight horizontal finger movement while scrolling vertically causes accidental horizontal scroll / apparent tab switching in the disassembly view.
Problem
The
horizontalScrollmodifier was applied directly onInfiniteList(which wraps aLazyColumn). Because both scroll directions competed at the same layout node, the horizontal scroll would intercept vertical gestures if the finger moved even slightly sideways.Fix
Wrapped
InfiniteListin aBoxthat owns thehorizontalScroll, whileInfiniteList/LazyColumnnow exclusively owns vertical scroll:This way the
LazyColumngets first pick on vertical gestures, and only clearly horizontal swipes trigger the outerhorizontalScroll.Testing
.sofile → Disassembly tabSummary by CodeRabbit
Release Notes