TanStack / TanStack/tanstack.com
Docs title-bar width toggle: click sticks, icon never updates, and layout flashes on refresh
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 401
- Avg merge
- 18h 14m
- Merged PRs (30d)
- 56
Description
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 ...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the reproduced docs page at the provided URL and inspect the title-bar expand/collapse control beside “Copy page.” Verify the toggle can change state repeatedly, the icon reflects each state, and an expanded preference does not flash the constrained layout after refresh. No source file or test path is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100