Skip to content

🐛 Bug: Sidebar sub-navigation does not auto-collapse #2197

@TarunyaProgrammer

Description

@TarunyaProgrammer

Describe the bug

The documentation sidebar allows multiple sub-navigation sections to remain expanded at the same time. When a new section is opened, the previously expanded section stays open.

This results in a cluttered sidebar and makes navigation harder, especially as more sections are expanded.

This behavior differs from the commonly expected accordion-style navigation used in documentation sidebars, where only one section is expanded at a time.

Steps To Reproduce

  1. Open any documentation page.
  2. Expand a sidebar section (e.g. Get Started).
  3. Expand another sidebar section (e.g. Guides).
  4. Observe that the previously expanded section remains open.

Expected Behavior

When a sidebar sub-navigation section is expanded, any previously expanded section should automatically collapse.
Only one sidebar section should be expanded at a time.

Actual Behaviour

Multiple sidebar sections can remain expanded simultaneously.

Why this matters

  • Reduces visual clutter in the sidebar
  • Improves scanability and navigation speed
  • Aligns with common accordion navigation patterns used in docs sites
  • Simplifies focus for keyboard and screen reader users

Screenshots/Clips

JsonSchema.mov

Device Information [optional]

- **OS:** macOS  
- **Browser:** Firefox/Chrome

Additional Notes

This appears to be a UI state-management issue where expanded sections are handled independently rather than as a single active section.

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is the initial status for an issue that requires triage.🐛 BugIndicates that the issue is a bug or defect.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions