Skip to content

fix: improve table of contents scrolling - #255

Merged
hannesrudolph merged 1 commit into
mainfrom
fix/toc-scroll-affordance-20261002
Oct 2, 2026
Merged

hannesrudolph merged 1 commit into
mainfrom
fix/toc-scroll-affordance-20261002

Conversation

@hannesrudolph

Copy link
Copy Markdown
Member

What Problem This Solves

Long “On this page” outlines stopped above the bottom of the window, and their scrollbar started above the heading with a distracting native track.

User Impact

The outline now uses the available window height, with a thin thumb on hover or keyboard focus, a transparent track, and fades only where more items remain. The scrollbar begins level with the heading, whose position is preserved. Keyboard focus and the automatically highlighted entry stay clear of Ask Molty.

Why This Change Was Made

The heading inset now sits outside the scrolling area. Scroll-end space keeps the last link reachable above the chat control, and automatic scrolling uses the same visible bounds as keyboard focus. The overflow cues follow the existing left navigation.

Evidence

  • 274 tests passed; one existing test skipped. All 6 focused anchor tests passed after the scrollspy correction.
  • Focused Chromium and WebKit checks passed for the scrollbar, top/bottom overflow states, keyboard reachability, automatic active-link scrolling, changing outline length, page navigation, and compact-layout handoff.
  • Source review completed with no actionable findings.
  • Dark/light and Persian RTL previews verified. At 1440×900, the heading remains at y=107; the scrolling area now runs from y=107 to y=900 rather than y=64 to y=820.

Dark: before and after

Light: before and after

Persian RTL preview

Persian RTL outline

@hannesrudolph
hannesrudolph requested a review from a team as a code owner October 2, 2026 21:10
@hannesrudolph
hannesrudolph merged commit a90d9fd into main Oct 2, 2026
5 checks passed
@hannesrudolph
hannesrudolph deleted the fix/toc-scroll-affordance-20261002 branch October 2, 2026 21:18
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