TanStack / TanStack/tanstack.com

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

オープン
#948 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
1.1k
フォーク
401
平均マージ
18時間 14分
マージ済み PR(30日)
56

説明

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 ...

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された URL で再現された docs ページを開き、「Copy page.」の横にあるタイトルバーの展開/折りたたみコントロールを調べてください。トグルで状態を繰り返し変更できること、アイコンが各状態を反映すること、また展開された設定があっても更新後に制約付きレイアウトが一瞬表示されないことを確認してください。issue ではソースファイルもテストパスも指定されていません。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
documentation, frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。