Commit 4e96832
[Web] Stop layout shift / scroll bounce in TrackLineup
Two follow-ups to the smoother infinite-scroll work, both visible while
scrolling Trending:
1. Skeleton tiles in ordered lineups now reserve the order column. The
desktop TrackTile previously hid the rank number and crown when
`isLoading`, so the order column collapsed to ~0 width on a skeleton
and the artwork shifted left when real data arrived. With the
skeleton now rendering the index it's been told (`tiles.length + i`),
the number / crown stay visible and the layout doesn't jump on load.
2. Skeleton tail is now constant while `hasNextPage`. Before, skeletons
were gated on `isFetching || isLoadMoreTriggered`, so the page
ballooned by ~one threshold's worth of skeletons when fetching, then
shrank back when the page resolved. On a fast scroll deep into that
shrinking region, the browser had to clamp `scrollTop`, which felt
like the page "bouncing" mid-scroll. Keeping a constant skeleton
tail until the end of the lineup means the scroll height only ever
grows (smoothly, by `pageSize` tile-heights per resolved page) until
`hasNextPage` flips to false at end-of-lineup.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9b2ee3c commit 4e96832
2 files changed
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
439 | | - | |
| 438 | + | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
341 | | - | |
| 339 | + | |
342 | 340 | | |
343 | | - | |
| 341 | + | |
344 | 342 | | |
345 | 343 | | |
346 | 344 | | |
| |||
0 commit comments