Skip to content

feat(dash): scrollbars on scrolling panels, with click-and-drag#92

Open
michaelroy-amd wants to merge 1 commit into
feat/dash-progress-spinnerfrom
feat/dash-scrollbars
Open

feat(dash): scrollbars on scrolling panels, with click-and-drag#92
michaelroy-amd wants to merge 1 commit into
feat/dash-progress-spinnerfrom
feat/dash-scrollbars

Conversation

@michaelroy-amd

Copy link
Copy Markdown
Member

What

Panels gave no visual sign when their content overflowed, and there was no way to grab a scrollbar with the mouse.

  • Reusable panel::vertical_scrollbar / horizontal_scrollbar helpers: no-op when content fits, otherwise draw a bar and return the shrunk content rect.
  • Wired into the job console (vertical + horizontal), the LOGS dock, bench detail, chat transcript, and all seven list managers.
  • Click-and-drag: each drawn bar records a per-frame hit-test handle; a click on a track jumps to that position and arms a drag that keeps tracking the pointer until release. The tail-anchored LOGS dock offset is inverted so dragging down goes toward older lines.
  • Also clamps the job console's horizontal offset against the widest line.

Excluded on purpose: the list managers' bars are drag-to-jump-selection would be awkward (they're driven by ListState selection), so those show a bar but aren't draggable. Easy follow-on.

Tests

  • panel::tests: no-op-when-fits, shrink-on-overflow (V and H).
  • app::tests: proportional position mapping, full grab → drag → release cycle, dock inversion.
  • Full crate suite green (--test-threads=1), clippy -D warnings clean.

Notes

Part 2 of 3. Stacked on #91 (both touch the draw_job_console signature / call site) — please merge #91 first, then this retargets to main.

Panels gave no sign when content overflowed. Add reusable `panel::vertical_scrollbar`
/ `horizontal_scrollbar` helpers (no-op when content fits, else draw a bar and
return the shrunk content rect) and wire them into the job console (V+H), the
LOGS dock, bench detail, chat transcript, and the list managers.

Scrollbars are also click-and-drag: each drawn bar records a hit-test handle;
a click on a track jumps to that position and arms a drag that keeps tracking
the pointer until release (inverting the tail-anchored dock). Also clamps the
job console's horizontal offset against the widest line.

Stacked on the progress-spinner branch (shared job-console render path).

Signed-off-by: Michael Roy <michael.roy@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant