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

Offen Anfängerfreundlich
#8,618 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
68/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
javascript, react

Rechercherichtung

Beginne mit der Seitenleiste unter https://react.dev/learn/installation und verfolge den Click-Handler für den Pfeil des erweiterten Abschnitts auf der Dokumentationsseite. Reproduziere das Verhalten in Chrome und überprüfe anschließend, dass ein erneuter Klick auf den Pfeil den Abschnitt wieder einklappt, während Navigation und Kontext der aktiven Seite weiterhin funktionieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug: unconfirmed
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.

Vorherrschende Sprache
JavaScript
Sterne
11.8k
Forks
7.9k
Ø Merge
16 Std. 6 Min.
Gemergte PRs (30 T.)
7

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus reactjs/react.dev

Alle Issues in reactjs/react.dev

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.