Repository navigation
fix(tui): keep the scrollbar hover band inside its pane - #5024
Conversation
|
@krissetto any feedback ? |
aheritier
left a comment
There was a problem hiding this comment.
Thanks for fixing the hover overlap with the sidebar. The clamp keeps the hover band inside the pane, and the regression test checks that both columns just outside it are ignored while the scrollbar itself still responds. No code changes requested.
pointerOverScrollbar accepted any column up to ScrollbarX()+2. On a messages pane docked left of the sidebar, the columns past the divider belong to the neighbouring surface, so moving the pointer onto the sidebar made the chat scrollbar fade in and hold, colliding with the sidebar grip's own edge zone. Clamp the right bound so the band ends at the divider column: it covers the pane plus the one column the divider crossfades in, and the sidebar itself starts a column further out. The divider column is deliberate, not slack: the sidebar separator crossfades with the transcript scrollbar, and the held-pointer motion test drives its release through that column (TestSidebarDividerCrossfadesWithTranscriptScrollbar). Signed-off-by: Aucoto Zhang <tdnorthgarden@gmail.com>
d859bad to
756be20
Compare
|
The merge-queue failures came from my change: the clamp also cut the divider column, which the new sidebar-separator crossfade uses (TestSidebarDividerCrossfadesWithTranscriptScrollbar, added after this branch was cut — merging this PR into current main fails on it locally). The band now ends at the divider column (m.xPos+m.width): the sidebar itself starts one column further out, so hovering the sidebar still does not summon the scrollbar, and the divider crossfade works. The branch is rebased onto current main, so this PR's own CI now runs the crossfade test; the scrollview and chat suites (including -race) are green. Amended and force-pushed (d859bad → 756be20). |
aheritier
left a comment
There was a problem hiding this comment.
The revised clamp keeps the divider in the transcript scrollbar’s hover band, preserving the crossfade, while excluding the sidebar’s first column. The regression test covers the scrollbar, the divider, and the first sidebar column. No code changes requested.
Problem
pointerOverScrollbaraccepted any column up toScrollbarX()+2. On a messages pane docked left of the sidebar or a divider, those columns belong to the neighbouring surface, so moving the pointer onto the sidebar's first column made the chat scrollbar fade in and hold — and it collided with the sidebar grip's own edge zone. The left bound is clamped to the pane; the right one was not.Fix
TestScrollbarHoverClampsToPanepins that columns past the pane's right edge are not hover: it fails before the fix.