reactjs / reactjs/react.dev

[Bug]: Sidebar dropdown does not close when the arrow is clicked again

オープン 初心者向け
#8,618 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug: unconfirmed
主要言語
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

  1. Go to any documentation page with an expanded sidebar section, such as https://react.dev/learn/installation.
  2. Locate the left sidebar navigation.
  3. Click on the downward-facing arrow next to the currently active/expanded section (e.g., "Installation").
  4. 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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

https://react.dev/learn/installation のサイドバーから始め、ドキュメントサイトで展開されたセクションの矢印のクリックハンドラーを追跡します。Chrome で動作を再現し、続けて矢印をもう一度クリックするとセクションが折りたたまれ、ナビゲーションとアクティブページのコンテキストが引き続き機能することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, react
領域
documentation, frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。