Sidebar Dropdown Should Toggle When Clicking an Already-Selected Item
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 11.8k
- 分支
- 7.9k
- 平均合併
- 1 天 11 小時
- 30 天內合併 PR
- 11
描述
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.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先在 React 文件網站中找到側邊欄項目和巢狀下拉選單的實作,然後重現已選取和未選取項目的行為。驗證點擊已選取的項目會收合其下拉選單、導覽仍會展開正確的項目,以及導覽離開後會重設收合狀態。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react
- 領域
- documentation, frontend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100