Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

View transitions: the commit window from 2024 is still missing

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start by reading the router navigation and scroll restoration code, then inspect Solid's flush() behavior and the related discussions #372 and #482. The issue describes the desired core hook and router integration but does not name files or tests. Done means view transitions wrap the settled navigation commit, work with back and forward without duplicating history, and keep scroll restoration within that commit.

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

Mô tả

In February 2024, discussion #372 asked for a hook that runs when the router writes the DOM, so document.startViewTransition can snapshot the old page and the new one. The useBeforeLeave + preventDefault + retry(true) workaround was already known to be wrong.

Ryan, 18 June 2024, on #372:

Yeah. I was thinking the hook might want to be handled by Solid itself, because you want to get in there before and after the synchronous part of the render. Or I guess it wraps it. It is a bit awkward to do right now but something I'm keeping in mind for future reactivity designs.

Ryan, 10 October 2024, on #482 (that workaround duplicates history entries):

Yeah.. I can imagine there are exceptions. The truth is the best way to hook into View Transition APIs would be something we exposed from core of Solid itself. The tricky part is we have our own async transition method and ideally you want to sneak the snapshot in after that is done but before we apply the render effects. We don't really expose that window right now. So you are stuck too early or too late in some cases.

That is still the latest word from a maintainer. Someone asked "is it the future yet?" on #372 in June 2025 and got no answer. Solid 2 has since shipped. startTransition is gone. flush() exists. @solidjs/router 2.0.0-next still contains zero calls to startViewTransition.

React 19 put <ViewTransition> in the reconciler, which is the core half of what was described above. @tanstack/solid-router already does the router half: after loaders, document.startViewTransition, then Solid.flush() so the new DOM exists before the browser snapshots. Solid Start does not add its own implementation. An app that needs a page crossfade on Solid today leaves @solidjs/router to get it.

What ships:

  1. A core hook for the moment after an async navigation has settled and before render effects paint.
  2. The router calls document.startViewTransition around that moment, including back and forward, without a second history entry.
  3. Scroll restoration stays inside that same commit. A separate scrollTo after the callback races the snapshot.

useBeforeLeave cannot be that hook. It runs before the navigation, and holding the callback open across suspense deadlocks the browser transition ("Transition was aborted because of timeout in DOM update").

Ngôn ngữ chính
TypeScript
Star
1.3k
Fork
185
Merge trung bình
15 giờ 47 phút
Pull request đã merge (30 ngày)
47

Chuẩn bị môi trường

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.

Issue khác của solidjs/solid-router

Tất cả issue của solidjs/solid-router

Issue tương tự

Thêm issue về TypeScript

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.