Sidebar Dropdown Should Toggle When Clicking an Already-Selected Item
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
When a user selects a sidebar item with nested routes, the dropdown expands as expected. However, clicking the same selected item again does nothing, even though users naturally expect it to collapse. This leads to:
Reduced control over sidebar visibility
Unnecessary scrolling when sections cannot be collapsed
Lower consistency with typical documentation UI behavior
Expected Behavior
Clicking an already-selected sidebar item should toggle the visibility of its dropdown.
Clicking a non-selected item behaves normally (navigate + expand).
When navigating away, the collapsed state should reset automatically so the correct item appears expanded by default.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the sidebar item and nested-dropdown implementation in the React documentation site, then reproduce the behavior for selected and non-selected items. Verify that clicking the selected item collapses its dropdown, navigation still expands the correct item, and navigating away resets the collapsed state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100