TanStack / TanStack/tanstack.com

Docs title-bar width toggle: click sticks, icon never updates, and layout flashes on refresh

Open
#948 1 comment 0 reactions 0 assignees View on GitHub

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:

  1. 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.
  2. 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 to FoldHorizontal.
  3. 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
  1. Open any docs page at a viewport ≥1535px (e.g. https://tanstack.com/router/latest/docs/framework/react/overview)
  2. Click the expand/collapse icon on the right of the title bar
  3. Try clicking it again — nothing happens, and the icon hasn't changed
  4. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.