TanStack / TanStack/tanstack.com
Docs title-bar width toggle: click sticks, icon never updates, and layout flashes on refresh
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 1.1k
- Fork
- 401
- Merge medio
- 18h 14m
- PR unite (30g)
- 56
Descrizione
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 ...
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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
Apri la pagina docs riprodotta all’URL fornito e ispeziona il controllo di espansione/compressione nella barra del titolo accanto a “Copy page.” Verifica che il toggle possa cambiare stato ripetutamente, che l’icona rifletta ogni stato e che una preferenza espansa non mostri per un attimo il layout vincolato dopo il refresh. Nell’issue non sono indicati file sorgente o percorsi di test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- documentation, frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100