Conversation
Contributor
Author
|
@ericmarsh995 i tested by banging my mouse wheel real fast and it seem be able to keep up in page tracking correctly so i think this is it. |
Contributor
|
Have you tested this on S2? Also, it might make sense to set it to 0.5 instead of 0 as most readers update the page when its halfway through |
Contributor
Author
The recording is basically tested in s2 @ericmarsh995 i tried with 0.5 but its still not picking fast enough. 0 picks up faster since even with one tiny pixel can trigger intersection observer. @ericmarsh995 video is uploaded correctly now by testing in Prod. |
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.
Description
Ref: https://github.com/allenai/scholar/issues/33968
Since we recently are having issue with PageNumberControl due to user scrolls speed so this PR addresses this.
Reviewer Instructions
According to the video in the beginning Smita is already at page 15 but the page control is displaying it as page 6 so this can be the case that Smita scrolled faster than IntersectionObserver API picks up the change so that's why our page control can't update accordingly. So i change the threshold to 0 which mean if as soon as a tiny bit of the div is visible, IntersectionObserver will kick in.
Testing Plan
Verify when scroll manually through the page, the page number updated accordingly. Also when clicking thumbnail or TOC it will update the page number accordingly.
Output / Screenshots
Screen.Recording.2022-10-11.at.2.38.11.PM.mov
A11y
N/A