Add scroll spy functionality to Table of Contents for better navigation#2190
Add scroll spy functionality to Table of Contents for better navigation#2190Nakshatra480 wants to merge 12 commits intojson-schema-org:mainfrom
Conversation
Implements Intersection Observer to highlight active sections while scrolling through documentation. Fixes json-schema-org#2169
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2190 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 30 30
Lines 640 640
Branches 198 198
=========================================
Hits 640 640 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
3 similar comments
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @AgniveshChaubey @Utkarsh-123github PR is ready, pls review it and give feedback thanks |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
…set, selector coverage, CI passing
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
Hi @Nakshatra480! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
|
@AgniveshChaubey i have updated the code structure of the TableOfContentMarkdown.tsx file, now you can review the PR thanks for your feedback |
|
ping @AgniveshChaubey |
|
I still can't see any highlights in the TOC on the right-hand side. Hane you tested the functionality locally? Can you please share a demo video? |

Summary
Add scroll spy functionality to the Table of Contents (TOC) to highlight the currently visible section dynamically as the user scrolls through the document.
Changes
IntersectionObserverto track visible headings (h1–h4) and update the active section dynamically.TableOfContentMarkdown.tsxwith minimal modifications and preserved pre existing code structure.Linked Issues
Closes #2169.
Testing Plan
npm run devand open a page with a TOC.Checklist