[Bug]: Sidebar dropdown does not close when the arrow is clicked again
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 11.8k
- Fork
- 7.9k
- Merge medio
- 1g 11h
- PR unite (30g)
- 11
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla barra laterale su https://react.dev/learn/installation e segui il gestore del clic della freccia della sezione espansa nel sito della documentazione. Riproduci il comportamento in Chrome, quindi verifica che facendo nuovamente clic sulla freccia la sezione si richiuda, mentre la navigazione e il contesto della pagina attiva continuano a funzionare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- documentation, frontend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100