DG2: consolidate virtual scroll height lock (WC-3333, WC-3390)#2222
DG2: consolidate virtual scroll height lock (WC-3333, WC-3390)#2222yordan-st wants to merge 2 commits into
Conversation
AI Code Review
What was reviewed
Skipped (out of scope): CI check status could not be confirmed (command required approval). Findings🔶 Medium — Missing CHANGELOG entry for bug fixesFile: ### Fixed
- We fixed an issue where the vertical scrollbar disappeared after hiding a wide column while virtual scrolling was enabled. (WC-3333)
- We fixed an issue where only the first page loaded when the grid had enough columns to require horizontal scrolling. (WC-3390)Run
|
- Replace parallel lockedAtX guards with single layoutKey cache - Keep old height alive on invalidation to prevent flicker - Fix overflow detection: clientHeight not scrollHeight — many-column grids now correctly receive the synthetic scroll offset - Guard bumpPage behind scrollTop > 0
- add test for overflow case where container is shorter than full content - new spec file covering the guard that prevents phantom page loads on content-resize
9f0220b to
6a5aba5
Compare
AI Code Review
What was reviewed
Skipped (out of scope):
Findings
|
Pull request type
Bug fix and refactor
Description
Two virtual scroll bugs in
GridSizeStoreshared the same root cause — incomplete height cache invalidation and incorrect overflow detection. This PR consolidates both fixes instead of band-aiding each symptom separately.What changed:
lockedAtPageSize/lockedAtColumnCountguard fields with a singlelayoutKeyprivate getter (pageSize-columnCount). One place to invalidate, one place to extend.undefinedon invalidation — the old value stays until overwritten. Prevents CSS snap-to-full-height flicker and eliminates false scroll-bottom triggers during column toggle.gridContainer.clientHeight < fullHeightinstead ofscrollHeight > fullHeight.scrollHeightwas inflated by horizontal overflow on many-column grids, causing the synthetic 30px scroll offset to be skipped.bumpPagein scroll handler behindscrollTop > 0— prevents page loading on content-resize events when the user is at the top.Closes #2167, closes #2193.
What should be covered while testing?
Bug 1 — WC-3333: Scrollbar disappears after hiding a column
Bug 2 — WC-3390: Many columns, only first page loads