Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

View transitions: the commit window from 2024 is still missing

Aberta
#696 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
frontend

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
TypeScript
Estrelas
1.3k
Forks
184
Merge médio
15h 47min
PRs com merge (30d)
47

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de solidjs/solid-router

Todas as issues de solidjs/solid-router

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.