mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-13 20:56:19 -08:00
perf(dashboard): hold rail skeletons back so empty rails stop shifting the page
On every launch with sources the dashboard shifted by about 0.23 (the "good" CLS threshold is 0.1). The rails render as soon as their own data arrives, and each loading rail showed a 328 px skeleton immediately. On a normal profile the live-favorites and recent-content sources resolve empty 15-20 ms later, so their skeletons flashed and collapsed and every rail below jumped up by about 360 px. J1 never saw it: its layout-shift window ends at the first card, which is painted just before the collapse. Rail skeletons now wait out a 300 ms grace period (createRailSkeletonGrace) and appear only for a rail still loading after it; the hero keeps its immediate skeleton because it reserves the top of the page. Recorded over three renderer reloads of a seeded profile, the dashboard's layout shift drops from 0.219-0.234 to 0.0004, with the real rails painted at the same time as before. Plan thread C5, journey J1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d9a563d1a
commit
b7a5c36d71
6 files changed
+132
-4
No files matched your search
@@ -0,0 +1,9 @@
|
||||
---
|
||||
type: perf
|
||||
area: dashboard
|
||||
---
|
||||
|
||||
The dashboard no longer jumps when it opens: placeholder rails that turned out
|
||||
to be empty used to flash and collapse, pushing the rails below them up the
|
||||
page. Rails now appear once, in place, and a placeholder shows only when a rail
|
||||
takes noticeably long to load.
|
||||
Reference in new issue
Block a user