TanStack / TanStack/tanstack.com

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

Đang mở
#948 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
TypeScript
Star
1.1k
Fork
401
Merge trung bình
18 giờ 14 phút
Pull request đã merge (30 ngày)
56

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Mở trang docs đã được tái hiện tại URL được cung cấp và kiểm tra control mở rộng/thu gọn trên thanh tiêu đề bên cạnh “Copy page.” Xác minh rằng toggle có thể thay đổi trạng thái nhiều lần, biểu tượng phản ánh từng trạng thái và tùy chọn mở rộng không làm layout bị giới hạn hiển thị chớp nhoáng sau khi refresh. Issue không nêu tên file nguồn hoặc đường dẫn test.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
documentation, frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.