[Bug]: Sidebar dropdown does not close when the arrow is clicked again
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
Summary
In the left sidebar navigation, when a section with sub-items is expanded (for example, "Installation"), clicking its downward-facing arrow again does not collapse the section. Users naturally expect an expand/collapse toggle arrow to work in both directions — even if this is intentional (e.g., to keep the active page's context visible), it hurts the UX since users assume clicking again will close the dropdown.
Page
https://react.dev/learn/installation
Details
To Reproduce
- Go to any documentation page with an expanded sidebar section, such as https://react.dev/learn/installation.
- Locate the left sidebar navigation.
- Click on the downward-facing arrow next to the currently active/expanded section (e.g., "Installation").
- Notice that the section does not collapse as expected.
Expected behavior
Clicking the dropdown arrow of an already expanded section should toggle it back to a collapsed state.
Desktop:
- OS: Windows
- Browser: Chrome
Additional context
Observed on the main react.dev documentation site. Fixing this would make the navigation feel more intuitive and aligned with standard UI patterns for accordions/dropdowns.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
https://react.dev/learn/installation のサイドバーから始め、ドキュメントサイトで展開されたセクションの矢印のクリックハンドラーを追跡します。Chrome で動作を再現し、続けて矢印をもう一度クリックするとセクションが折りたたまれ、ナビゲーションとアクティブページのコンテキストが引き続き機能することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation, frontend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100