Skip to content

feat: add active section highlighting and auto-scroll to sidebar - #8331

Open
Pranav-IIITM wants to merge 4 commits into
webpack:mainfrom
Pranav-IIITM:feat/scroll-tracking-sidebar
Open

feat: add active section highlighting and auto-scroll to sidebar#8331
Pranav-IIITM wants to merge 4 commits into
webpack:mainfrom
Pranav-IIITM:feat/scroll-tracking-sidebar

Conversation

@Pranav-IIITM

@Pranav-IIITM Pranav-IIITM commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary
closes #8323
The sidebar previously gave no visual indication of which section was currently in view, and did not auto-scroll or auto-expand to keep the active item visible. This PR adds active-section tracking, highlighting and auto-scroll to the sidebar so users can stay oriented while reading long docs pages.

What kind of change does this PR introduce?

Feature (feat) — adds active section highlighting and auto-scroll behavior to the sidebar navigation.

Recording.2026-08-16.120618.mp4

Did you add tests for your changes?

Yes — added unit tests in src/components/SidebarItem/SidebarItem.test.jsx covering active anchor behavior.

Does this PR introduce a breaking change?

No. SidebarItem gains a new optional activeAnchor prop; existing usages without it are unaffected.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

No external/user-facing documentation changes are needed — this is an internal UI behavior improvement to the existing sidebar component. No new public API or config was introduced.

Use of AI

Not used

Signed-off-by: Pranav-IIITM <jogdandpranav2007@gmail.com>
@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview Aug 16, 2026 6:55am

Request Review

Signed-off-by: Pranav-IIITM <jogdandpranav2007@gmail.com>
Signed-off-by: Pranav-IIITM <jogdandpranav2007@gmail.com>
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.

[UX]: Add Active Section Highlighting to Docs Sidebar

1 participant