Header UserMenu defer-skeleton causes a brief layout shift (CLS) #78
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web#78
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Severity: LOW (CWV / polish). The
<UserMenu server:defer />fallback skeleton in the header (src/components/secondary-navigation.astro, added as #65 item M9 to prevent header CLS) itself causes a brief layout shift while loading: when the deferredUserMenuresolves and replaces the skeleton, the box changes size/position slightly, so the header jumps.Root cause is a dimension mismatch — the skeleton's reserved box (height/width/padding/border/gap) doesn't exactly equal the resolved
UserMenu's box, so the swap isn't seamless.Ask
Make the
slot="fallback"skeleton's box pixel-match the loadedUserMenu: same height, min-width, padding, border, border-radius, and flex alignment/gap, soserver:deferhydration produces zero layout shift. Verify no CLS on load (e.g. measure the fallback vs resolved bounding boxes, or Lighthouse/PerformanceObserver CLS ~0).