Repository navigation
fix: preserve empty-list padding with scrollMargin - #1380
peterolkhov wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 39b6005 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
agammann
left a comment
There was a problem hiding this comment.
The new tests check getTotalSize() as count goes 4 → 0 → 4 with a scroll margin. Could one also check an end-anchored virtualizer’s scroll position when it becomes empty? The changed empty-list total feeds _drawnListEnd, so a correct total alone would not catch an unexpected end-anchor correction.
🎯 Changes
An empty list with
paddingStart: 40,paddingEnd: 60, andscrollMargin: 200currently has a total size of 0. The same list with no scroll margin has its expected 100px of padding. Filtering a populated list to zero rows collapses that padding too.The empty measurement endpoint now includes the scroll origin before the shared conversion to list-local size. This preserves configured padding without changing populated-list sizing or the nonnegative clamp from #836. Tests cover each padding side, count transitions, horizontal/two-lane layouts, disabled lists, and no-padding controls.
AI assistance was used to develop and validate this change.
✅ Checklist
pnpm run test:pr.🚀 Release Impact
Tested:
pnpm run test:pr(69 affected projects, 124 uncached tasks) andpnpm run build:allpassed. The browser suites passed 139 tests; unit suites passed 593, with one existing skip. A React/Chromium reproduction using built package exports retains the empty 100px list and its footer position.Browser checks used cached Chromium 153.0.8010.12 with locked Playwright 1.56.1, rather than its bundled Chromium 141. No browser was downloaded.
Summary by CodeRabbit