Skip to content

feat: sticky table of contents with scrollspy for canvas dashboards#9693

Open
rohithreddykota wants to merge 2 commits into
mainfrom
rohithreddykota/canvas-toc-scrollspy
Open

feat: sticky table of contents with scrollspy for canvas dashboards#9693
rohithreddykota wants to merge 2 commits into
mainfrom
rohithreddykota/canvas-toc-scrollspy

Conversation

@rohithreddykota

@rohithreddykota rohithreddykota commented Jul 16, 2026

Copy link
Copy Markdown
Member

Adds a persistent, minimap-style table of contents to canvas dashboards (view surfaces only; not the iframe embed).

  • Derives entries from the headings (h1h3) rendered inside markdown components of the active tab — no new section primitive; stays in sync as content/tabs change via a debounced MutationObserver.
  • Scrollspy via a single IntersectionObserver (no scroll-event math); exactly one active section, with the highlight pinned during click-to-scroll so it doesn't flicker through intermediate sections.
  • Collapsed rail of tick bars by default (dots on narrow viewports so they don't overlap content); hover/focus reveals the full list as an overlay flyout that never reflows the dashboard.
  • Click smooth-scrolls (respecting prefers-reduced-motion) and updates the URL hash; deep-linking on mount is supported. Accessible: <nav aria-label>, real links, aria-current="location", focus rings, full heading as the accessible name.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code
image image image

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