Repository navigation
Wait for vertical scroll endpoints before visual captures - #60417
Merged
Merged
Conversation
Summary: The vertical scroll-to visual test can capture the previous scroll position instead of the requested one. 1. A button requests an animated scroll. 2. `waitForAnimationToEnd` can observe unchanged frames before that scroll starts and return immediately. 3. The screenshot is then taken at the old endpoint, without checking whether the scroll reached its destination. What changes The RNTester example exposes its current endpoint through a nonvisual `testID` on its existing outer container. The marker starts at top, matching the initial zero offset. Requests for a different endpoint clear it to pending; requests at an already-acknowledged endpoint preserve it, since a no-op scroll need not emit another event. Native scroll offsets update the marker, including the final momentum event when intermediate scroll events are throttled. The flow waits for the requested endpoint before its existing animation-settling check and screenshot. The list content, styles, animated scroll commands, screenshot IDs, and crops are unchanged. The horizontal and sticky-header flows are unchanged. Changelog: [Internal] Differential Revision: D134586364
|
@dalves has exported this pull request. If you are a Meta employee, you can view the originating Diff in D134586364. |
zeyap
approved these changes
Dec 1, 2026
zeyap
left a comment
Contributor
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
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.
Summary:
The vertical scroll-to visual test can capture the previous scroll position instead of the requested one.
waitForAnimationToEndcan observe unchanged frames before that scroll starts and return immediately.What changes
The RNTester example exposes its current endpoint through a nonvisual
testIDon its existing outer container. The marker starts at top, matching the initial zero offset. Requests for a different endpoint clear it to pending; requests at an already-acknowledged endpoint preserve it, since a no-op scroll need not emit another event. Native scroll offsets update the marker, including the final momentum event when intermediate scroll events are throttled. The flow waits for the requested endpoint before its existing animation-settling check and screenshot.The list content, styles, animated scroll commands, screenshot IDs, and crops are unchanged. The horizontal and sticky-header flows are unchanged.
Changelog: [Internal]
Differential Revision: D134586364