Skip to content

Grid: horizontal scrollbar in the sheet tab bar - #849

Merged
h-a-n-a-s-h-i merged 4 commits into
storytold:mainfrom
marcoarnulfo:feat/horizontal-scrollbar
Oct 13, 2026
Merged

h-a-n-a-s-h-i merged 4 commits into
storytold:mainfrom
marcoarnulfo:feat/horizontal-scrollbar

Conversation

@marcoarnulfo

Copy link
Copy Markdown
Contributor

Fixes #840.

The tab bar only had a slim position indicator squeezed into the ~90px left after the tabs: a grey thumb with no track, no click-to-page, hardcoded colours, and a range that counted frozen columns as scrollable. This turns it into a real horizontal scrollbar built the same way as the grid's vertical one (horizontal_scrollbar next to vertical_scrollbar): same theme tokens and 14px track, used range + 10 columns as the extent (kept stable while dragging), click on the track pages by one screen of the scrolling part, wheel over it scrolls sideways, and frozen columns stay out of the page. On a right-to-left sheet the thumb starts at the right end. The tab bar now splits 60/40 between tabs and scrollbar, like Excel's default; the draggable divider between them is left for a follow-up. Happy to switch the split if you prefer a different share.

Validation:

  • interaction::horizontal_scrollbar_pages_and_drags_across_a_wide_sheet (data to column Z, column A frozen): fails on main (track is 92px wide; with that check off, clicking the track scrolls 0 instead of one page), passes here
  • cargo test -p gridcraft-ui-egui --test interaction --test sheet_tab_rename --test right_to_left --test scroll_position
  • cargo clippy -p gridcraft-ui-egui --all-targets -- -D warnings, cargo fmt --all -- --check
  • checked the offscreen snapshot in light and dark
  • (macOS, Apple silicon)

marcoarnulfo and others added 4 commits October 13, 2026 00:14
# Conflicts:
#	crates/ui-egui/src/grid.rs
#	crates/ui-egui/src/tabs.rs
#	docs/ui-parity.md
…r track; drop the unused Color32 import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit e2a6aac into storytold:main Oct 13, 2026
1 check failed
h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 13, 2026
@echelon

echelon commented Oct 13, 2026

Copy link
Copy Markdown
Member

Merged — thank you @marcoarnulfo for the contribution!

I merged main into your branch and resolved the conflicts with PRs that landed first (and adjusted tests where the combination needed it).

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.

Add a horizontal scrollbar for wide worksheets

3 participants