TanStack / TanStack/tanstack.com
Docs title-bar width toggle: click sticks, icon never updates, and layout flashes on refresh
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1.1k
- Forks
- 401
- Ø Merge
- 18 Std. 14 Min.
- Gemergte PRs (30 T.)
- 56
Beschreibung
Bug: docs title-bar width toggle is broken
The expand/collapse button next to "Copy page" on docs pages (visible at ≥1535px viewport) has three issues:
- Click works only once, then gets stuck. Starting collapsed, the first click expands the layout. Subsequent clicks do nothing. Same in reverse: starting expanded, the first click collapses but it can't be re-expanded.
- Icon never updates. Even when the layout state changes (e.g., on first click), the icon stays as
UnfoldHorizontal(arrows pointing outward). It never flips toFoldHorizontal. - Flash on every refresh. When the preference is set to "expanded", refreshing the page paints the constrained (narrow) layout first, then snaps to expanded after hydration.
Repro
- Open any docs page at a viewport ≥1535px (e.g. https://tanstack.com/router/latest/docs/framework/react/overview)
- Click the expand/collapse icon on the right of the title bar
- Try clicking it again — nothing happens, and the icon hasn't changed
- Refresh while in the expanded state — observe the brief narrow → expanded flash
Video
https://github.com/user-attachments/assets/5a9b6ad5-5ca9-48d6-ad61-7b3dfa990096
I have a working branch with this fix locally. Will open a PR shortly ...
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Öffnen Sie die reproduzierte docs-Seite unter der bereitgestellten URL und untersuchen Sie das Steuerelement zum Ein-/Ausklappen in der Titelleiste neben „Copy page.“ Überprüfen Sie, dass der Umschalter wiederholt den Zustand ändern kann, das Symbol jeden Zustand widerspiegelt und eine aufgeklappte Präferenz nach dem Aktualisieren nicht kurz das Layout mit Einschränkungen anzeigt. In der Issue wird keine Quelldatei und kein Testpfad genannt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- documentation, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100