feat: sidebar active link scroll into view#562
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #562 +/- ##
=======================================
Coverage 79.95% 79.95%
=======================================
Files 127 127
Lines 12285 12285
Branches 866 866
=======================================
Hits 9823 9823
Misses 2459 2459
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds automatic scrolling functionality to bring the active sidebar link into view when a documentation page loads. The implementation synchronizes the web generator with similar functionality that exists in the legacy HTML generator.
- Introduces a new
bootstrap.jsfile that handles sidebar scroll behavior - Integrates the bootstrap script into the HTML template
- Uses smooth scrolling to center the active page link in the sidebar
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/generators/web/bootstrap.js | New client-side script that implements the sidebar auto-scroll functionality by finding the active link and scrolling it into view |
| src/generators/web/template.html | Adds script tag to load the new bootstrap.js file in the page head |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ovflowd
left a comment
There was a problem hiding this comment.
Hey @btea doc-kit isn't the place where this should be fixed. The fix should be done on @node-core/ui-components and there's already an open PR there: nodejs/nodejs.org#8517
|
I'm sorry, thank you for your guidance. |
No need to apologize!! I absolutely appreciate your investment here ❤️ |
Description
Synchronize with the old version of the document.
Validation
Related Issues
Check List
node --run testand all tests passed.node --run format&node --run lint.