Skip to content

fix(learn): pin desktop TOC on scroll + mobile bottom-sheet section switcher - #57

Merged
Bissbert merged 1 commit into
mainfrom
fix/toc-sticky-and-mobile
Jul 16, 2026
Merged

fix(learn): pin desktop TOC on scroll + mobile bottom-sheet section switcher#57
Bissbert merged 1 commit into
mainfrom
fix/toc-sticky-and-mobile

Conversation

@Bissbert

Copy link
Copy Markdown
Contributor

Summary

  • Desktop TOC rail was never actually sticky on scroll - the grid's items-start shrink-wrapped the TOC cell so position: sticky had no travel room; fixed with lg:self-stretch on the TOC cell (measured pinned at top: 80px through scrollY 4000)
  • Mobile "On this page" floating thumb-zone button opens a native <dialog> bottom sheet (focus trap, Escape/backdrop/link-tap dismiss, focus restore, reduced-motion + both themes), replacing the top-of-article details that scrolled out of reach
  • One shared IntersectionObserver keeps scroll-spy in sync across desktop rail + mobile sheet

Test plan

  • 502 tests passing
  • Browser scroll-verified (desktop sticky pin, mobile bottom sheet)
  • CI green
  • Production verification post-deploy

…witcher

- desktop TOC rail was never actually sticky on scroll - the grid's items-start shrink-wrapped the TOC cell so position:sticky had no travel room; fixed with lg:self-stretch on the TOC cell (measured pinned at top:80px through scrollY 4000)
- mobile "On this page" floating thumb-zone button opens a native <dialog> bottom sheet (focus trap, Escape/backdrop/link-tap dismiss, focus restore, reduced-motion + both themes), replacing the top-of-article details that scrolled out of reach
- one shared IntersectionObserver keeps scroll-spy in sync across desktop rail + mobile sheet

502 tests, browser scroll-verified.
@github-actions

Copy link
Copy Markdown

🚀 Preview deployed to: https://cf6f678f.gemmology-dev.pages.dev

@Bissbert
Bissbert merged commit 09dce4c into main Jul 16, 2026
5 of 6 checks passed
@Bissbert
Bissbert deleted the fix/toc-sticky-and-mobile branch July 16, 2026 16:27
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