From cbdbe5b5f043beb13374f122b505b4bf932ba8b9 Mon Sep 17 00:00:00 2001 From: Bruno Mercier Costa <94469565+emrcbrn@users.noreply.github.com> Date: Mon, 17 Aug 2026 10:35:10 +0200 Subject: [PATCH] docs: promote Agent Network in the sidebar and make sections collapsible (#920) * docs: promote Agent Network in the sidebar and make sections collapsible 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 * docs: make sidebar section toggles keyboard-accessible 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 * docs: keep sidebar sections expanded by default, collapse only Agent 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 --------- Co-authored-by: Claude Opus 4.8 --- src/components/NavigationDocs.jsx | 113 ++++++++++++++++++++---------- 1 file changed, 77 insertions(+), 36 deletions(-) diff --git a/src/components/NavigationDocs.jsx b/src/components/NavigationDocs.jsx index 66f305aa..200e5e9c 100644 --- a/src/components/NavigationDocs.jsx +++ b/src/components/NavigationDocs.jsx @@ -453,6 +453,14 @@ export const docsNavigation = [ }, { title: 'AGENT NETWORK', + // Featured highlight: any group with `featured: true` renders as the + // card at the top of the sidebar, with an optional `badge`. isOpen:false + // keeps this card collapsed by default, while the other top-level + // sections start expanded. To spotlight a different product later, move + // these lines to its group; remove them to drop the card entirely. + featured: true, + badge: 'New', + isOpen: false, links: [ { title: 'Getting Started', @@ -1171,15 +1179,30 @@ export function NavigationDocs({ className }) { Github Support - {docsNavigation.map((group, groupIndex) => ( - - - - ))} + {docsNavigation.map((group, groupIndex) => + group.featured ? ( + + + + ) : null + )} + {docsNavigation.some((group) => group.featured) && ( +
  • + )} +
    - {!hasChildren && ( + {!hasChildren && isOpen && ( <> {isActiveGroup && (