Skip to content

feat(client): add nested sections support with auto-expansion in sidebar#8806

Open
Venkat-Entropik wants to merge 4 commits intonodejs:mainfrom
Venkat-Entropik:feat/sidebar-nested-sections
Open

feat(client): add nested sections support with auto-expansion in sidebar#8806
Venkat-Entropik wants to merge 4 commits intonodejs:mainfrom
Venkat-Entropik:feat/sidebar-nested-sections

Conversation

@Venkat-Entropik
Copy link
Copy Markdown
Contributor

Description

This PR updates the sidebar to support nested sections (sub-sections inside groups).

Now the sidebar:

  • Supports multiple levels (not just a flat list)
  • Highlights the current page correctly

This makes navigation clearer, especially for deeply structured docs.


Validation

  • Checked that parent sections expand when visiting pages inside them
  • Checked that nested sections also expand correctly
  • Verified it works for multiple levels
  • Confirmed current page is highlighted properly

Related Issues

closes #8804


Check List

  • I have read the Contributing Guidelines and followed commit message rules.
  • I have run pnpm format.
  • I have run pnpm test.
  • I have run pnpm build.
  • Added tests if needed.

@Venkat-Entropik Venkat-Entropik requested a review from a team as a code owner April 7, 2026 08:48
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 7, 2026

PR Summary

Medium Risk
Medium risk because it changes shared sidebar navigation rendering and selection logic, adding recursive nested items and auto-expansion which could affect active state and mobile select behavior across the site.

Overview
Adds nested (multi-level) navigation support to the sidebar, rendering sub-sections recursively and auto-expanding parent sections when the current pathname is inside them.

Updates WithSidebar to map site navigation into a nested items shape, and updates the mobile select to flatten nested entries so deep pages remain selectable. Includes new SidebarGroup styles and a Storybook story (NestedGroup) to demonstrate the nested behavior.

Reviewed by Cursor Bugbot for commit a632529. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

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

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Apr 7, 2026 4:35pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@avivkeller
Copy link
Copy Markdown
Member

Can you update the stories?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 99 🟢 93 🟢 96 🟢 100 🔗
/en/about 🟢 100 🟢 94 🟢 96 🟠 88 🔗
/en/about/previous-releases 🟢 97 🟢 97 🟢 100 🟢 100 🔗
/en/download 🟢 97 🟢 96 🟠 81 🟢 100 🔗
/en/download/archive/current 🟢 100 🟢 97 🟢 100 🟢 100 🔗
/en/blog 🟢 100 🟢 97 🟢 96 🟢 100 🔗

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.25%. Comparing base (9345c76) to head (a632529).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8806      +/-   ##
==========================================
+ Coverage   74.22%   74.25%   +0.02%     
==========================================
  Files         105      105              
  Lines        8870     8870              
  Branches      328      328              
==========================================
+ Hits         6584     6586       +2     
+ Misses       2284     2282       -2     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a632529. Configure here.

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.

Support sub-sections in SideBar

2 participants