Skip to content

feat: Auto-collapse sidebar sub-navigation when opening a new section#2198

Open
TarunyaProgrammer wants to merge 1 commit intojson-schema-org:mainfrom
TarunyaProgrammer:AccordianAutoCollapse
Open

feat: Auto-collapse sidebar sub-navigation when opening a new section#2198
TarunyaProgrammer wants to merge 1 commit intojson-schema-org:mainfrom
TarunyaProgrammer:AccordianAutoCollapse

Conversation

@TarunyaProgrammer
Copy link

What kind of change does this PR introduce?

  • Bug fix (UI / UX behavior)

Issue Number:


Screenshots/videos:

JsonSchema2.mov

Attached screen recording demonstrating the updated accordion behavior where opening a sidebar section automatically collapses the previously opened one.


If relevant, did you update the documentation?

Not required.
This change only affects client-side navigation behavior and does not modify documentation content.


Summary

The documentation sidebar currently allows multiple sub-navigation sections to remain expanded simultaneously, which leads to visual clutter and makes navigation harder to scan.

This PR updates the sidebar interaction to behave as a mutually exclusive accordion:

  • When a new sidebar section is expanded, any previously expanded section is automatically collapsed.
  • Only one sub-navigation section can be open at a time.

The change improves usability and accessibility while preserving existing markup, animations, and data attributes. No data models, APIs, or content were modified.


Does this PR introduce a breaking change?

No.
This is a non-breaking, client-side UI behavior change that does not affect existing routes, data, or public APIs.


Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

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

1 participant