Repository navigation
Test fixes to infinite scroll on media upload modal - #79661
Closed
tellthemachines wants to merge 3 commits into
Closed
tellthemachines wants to merge 3 commits into
tellthemachines wants to merge 3 commits into
Conversation
…ic repro The infinite-scroll scroll-anchor restoration captures an anchor in the throttled scroll handler the instant the window advances, but only restores it on a later render gated on `isLoading`. When pages load asynchronously the user keeps scrolling in that gap, and the restoration can't distinguish that user-driven movement from a content-driven shift, so it snaps the list back to the capture-time position — yanking the viewport upward. Fix: store `scrollTop` at capture and add the intervening scroll delta back so only the content-driven shift is compensated. When the user does not scroll during the load the added term is 0 and behaviour is unchanged. Add an `AsyncInfiniteScroll` story that reveals pages asynchronously (with a live scrollTop HUD) and a `play` function that reproduces the jump deterministically — it advances the window, keeps scrolling while the page is in flight, and asserts the list does not snap back. It fails against the buggy trunk hook and passes with the fix, so the Storybook smoke-test CI run guards the regression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ro story Builds on the anchor-jump fix with the two remaining async infinite-scroll problems and a realistic reproduction: - Stall: loading more is driven only by scroll events near the bottom, and rows unload without preserving height, so once pinned at the bottom no scroll event fires and the next page is never requested. Keep the loading spinner (List layout) mounted until everything is loaded, reserving its height so there is always room to scroll past the last row and the loader keeps firing. - Bounce: the spinner was mounted only while loading, so it changed the scroll height on every load and shifted the position. Keeping it mounted (hidden, and aria-hidden, while idle) keeps the height constant. - Rewrite the async infinite-scroll story to a realistic network-backed consumer (no prefetch buffer; isLoading tied to the requested window; true server total) with a live scroll HUD, and drop the buffer-based interaction test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Size Change: +81 B (0%) Total Size: 7.5 MB 📦 View Changed
|
arthur791004
force-pushed
the
fix/dataviews-infinite-scroll-jump-repro
branch
2 times, most recently
from
July 6, 2026 02:15
989d486 to
9bb5f50
Compare
Base automatically changed from
fix/dataviews-infinite-scroll-jump-repro
to
trunk
July 6, 2026 03:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes
FOR TESTING PURPOSES ONLY - DO NOT MERGE!!!
(the reason we don't want to enable infinite scroll on the media upload modal is because there's no off switch for it yet, and infinite scroll isn't hugely accessible so we should always be able to switch it off easily)