A shared layout that renders from the URL holds the new page for one more round trip
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- frontend, performance
Direzione di ricerca
Start with e2e/preloader-e2e/tests/navigation.e2e.ts and the failing “layout that renders from the URL” case; run the two commands listed in the issue to reproduce it. Then trace how shared layouts and URL dependent components are handled during navigation, using #9517 and #9435 for context. Done means the new page appears in 2 round trips.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Part of #9434.
On a navigation between two pages with the same layout, the router stops preloading that layout's chunks (#9517, on top of #9515). That is right for a layout that stays as it is. But a component in the shared layout that picks what to render from the URL must run again when the URL changes:
export const UrlBanner = component$(() => {
const loc = useLocation();
if (loc.url.pathname.endsWith('/b/')) {
return <strong>on page b</strong>;
}
return <p>elsewhere</p>;
});
Its chunk is only requested at that moment, one round trip after the new page's chunks, and Qwik holds the whole update until it arrives. The new page shows in 3 round trips, not 2.
A read written straight in the JSX (<p>{loc.url.pathname}</p>) is not affected: it updates without the component's code.
Why
The click can't know what depends on the URL. That is in the page's serialized state, not in the bundle graph. It is the same gap as #9435.
Pinned by e2e/preloader-e2e/tests/navigation.e2e.ts:
layout that renders from the URL › the new page shows in 3 round trips, over the cap of 2(count over the cap)
Run it
pnpm build.core
pnpm test.e2e.preloader -g "layout that renders from the URL"
Done when the new page shows in 2 round trips.
- Lingua principale
- TypeScript
- Stelle
- 22.1k
- Fork
- 1.4k
- Merge medio
- 1g 13h
- PR unite (30g)
- 159
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QwikDev/qwik
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
docs router V2
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
DX enhancement V2
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
QwikDev/qwik#8480 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
A click before the page's load event gets no preloading: the preloader only starts after loadApertapreloader V2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QwikDev/qwik
Issue simili
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
elastic/kibana#306401 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
agentes-chat/agentes-chat#927 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Webapp workspace fails to render in Safari — "Can't find variable: requestIdleCallback"Apertacomp/desktop P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#157702 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
redhat-developer/rhdh-plugin-export-overlays#4794 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno