Skip to content

docs: promote Agent Network in the sidebar and make sections collapsible - #920

Open
emrcbrn wants to merge 3 commits into
netbirdio:mainfrom
emrcbrn:docs/nav-agent-network
Open

docs: promote Agent Network in the sidebar and make sections collapsible#920
emrcbrn wants to merge 3 commits into
netbirdio:mainfrom
emrcbrn:docs/nav-agent-network

Conversation

@emrcbrn

@emrcbrn emrcbrn commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

Reworks the docs sidebar navigation (NavigationDocs.jsx):

  • Featured product card. Any nav group flagged featured: true renders as a highlighted card at the top of the sidebar with an optional badge label. Agent Network takes the spot for now with a "New" badge. The mechanism is data-driven, so retiring or swapping the highlight for a future feature is a two-line change (documented inline).
  • Dropdown affordance. Every collapsible menu now shows a chevron that rotates on open and close, including the top-level sections (previously only nested sub-groups had one) and the featured card.
  • Collapse by default. Top-level sections start collapsed and the active one auto-expands, so the sidebar reads as a clean menu rather than a long expanded list.
  • Bug fix. The active-page marker (the orange bar) now only renders while its section is open. Before, collapsing an active section left the marker floating at a stale position that bled into the next section.

Notes

Verified in light and dark themes: the introduction page (all collapsed), inside an active section (that section expanded with the marker), and after collapsing an active Agent Network section (no lingering marker). Validated with npm run build.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Highlighted the AGENT NETWORK section as featured with a “New” badge.
    • Featured navigation sections now appear before other sections.
    • Added expandable chevrons for collapsible navigation groups.
    • Improved navigation highlighting when expanding or collapsing groups.

Screenshots:

image image image

Rework the docs sidebar navigation:
- Render any nav group flagged `featured: true` as a highlighted card at the
  top of the sidebar, with an optional `badge` label (currently Agent Network,
  "New"). The flag is data-driven, so a future feature can take the spot by
  moving two lines.
- Add a dropdown chevron to every collapsible menu, including the top-level
  sections and the featured card, so it is obvious they expand.
- Collapse the top-level sections by default and expand the active one, so the
  sidebar reads as a clean menu.
- Only render the active-page marker while its section is open, fixing the
  orange highlight bar that lingered after collapsing an active section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@emrcbrn is attempting to deploy a commit to the NetBird GmbH Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a5c0498-c918-4085-958c-c9c0e35c3e1e

📥 Commits

Reviewing files that changed from the base of the PR and between 465d73a and 1b9206d.

📒 Files selected for processing (1)
  • src/components/NavigationDocs.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/NavigationDocs.jsx

📝 Walkthrough

Walkthrough

The navigation marks AGENT NETWORK as featured with a “New” badge and a collapsed initial state. Featured groups render first with a separator. Navigation groups now support featured styling, expandable chevrons, and independent chevron interaction.

Changes

Featured navigation groups

Layer / File(s) Summary
Featured group ordering
src/components/NavigationDocs.jsx
AGENT NETWORK includes featured metadata. NavigationDocs renders featured groups first and adds a separator before other groups.
Group expansion controls
src/components/NavigationDocs.jsx
NavigationGroup applies featured styling and renders badges and clickable chevrons. Chevron clicks toggle expansion and update active highlighting.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: ⚪ Minimal · up to 1b920

This localized documentation navigation update is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Poem

A rabbit hops through docs anew,
“New” badges shine in agent view.
Chevrons turn and sections grow,
Featured paths now lead the flow.
Thump, thump—navigation’s clear!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: promoting Agent Network and making sidebar sections collapsible.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/NavigationDocs.jsx (1)

1273-1303: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the collapsed group controls keyboard-accessible.

Top-level groups now start collapsed. The motion.h2 and chevron <span> only handle mouse clicks. Keyboard users cannot expand a group and cannot reach its links.

Use a semantic <button> for each toggle control. Expose aria-expanded. Keep navigation links separate from toggle buttons when group.href exists.

Also applies to: 1315-1326

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/NavigationDocs.jsx` around lines 1273 - 1303, Replace the
clickable motion.h2 group control and chevron span with a semantic button-based
toggle, preserving the existing open/close and navigation behavior while
exposing aria-expanded={isOpen}. When group.href exists, keep its navigation
link separate from the toggle button so keyboard users can access both the link
and group controls; apply the same change to the related control at the second
referenced section.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/components/NavigationDocs.jsx`:
- Around line 1273-1303: Replace the clickable motion.h2 group control and
chevron span with a semantic button-based toggle, preserving the existing
open/close and navigation behavior while exposing aria-expanded={isOpen}. When
group.href exists, keep its navigation link separate from the toggle button so
keyboard users can access both the link and group controls; apply the same
change to the related control at the second referenced section.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a32c249-4929-40a4-b490-345daadef6f2

📥 Commits

Reviewing files that changed from the base of the PR and between cdce125 and 465d73a.

📒 Files selected for processing (1)
  • src/components/NavigationDocs.jsx

The collapse toggle was a click-only span, so after sections collapse by
default keyboard and screen-reader users could not expand a section or reach
its links. Make each toggle a semantic button with aria-expanded and an
aria-label, which restores keyboard operation and announces the open state.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 14, 2026 4:25pm

Request Review

…Network

Restore the original behavior where top-level sections start expanded and only
the nested sub-groups start collapsed, instead of collapsing everything. The
featured Agent Network card keeps its own isOpen: false so it starts collapsed.
The dropdown chevrons, featured card, and keyboard-accessible toggles are
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

2 participants