fix: Prevent initial unnecessary IntersectionObserver callback execution#2523
Merged
sy-records merged 3 commits intodocsifyjs:developfrom Jan 6, 2025
Merged
fix: Prevent initial unnecessary IntersectionObserver callback execution#2523sy-records merged 3 commits intodocsifyjs:developfrom
sy-records merged 3 commits intodocsifyjs:developfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
paulhibbitts
previously approved these changes
Jan 3, 2025
Member
paulhibbitts
left a comment
There was a problem hiding this comment.
Thanks @sy-records , created Sandbox and tested (see issue comments) - all looks good to me!
jhildenbiddle
requested changes
Jan 4, 2025
Member
jhildenbiddle
left a comment
There was a problem hiding this comment.
Looks good, @sy-records. A few minor nitpicks.
Koooooo-7
reviewed
Jan 5, 2025
Member
Koooooo-7
left a comment
There was a problem hiding this comment.
Shall we promote the isInitialLoad to the Object level as a field?
Then, we could reuse and keep consistence when any logic relies on the same isInitialLoad lifecycle flag in future.
8dd1a0e to
d0d4383
Compare
paulhibbitts
approved these changes
Jan 5, 2025
Member
There was a problem hiding this comment.
Thanks @sy-records and @jhildenbiddle , I've retested in the sandbox (with new Preview build) and things look good to me!
https://codesandbox.io/p/sandbox/docsify-v5-sidebar-fix-zwdm6p
jhildenbiddle
approved these changes
Jan 6, 2025
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
isInitialLoad) to skip the first callback execution of the IntersectionObserver on page load.Related issue, if any:
Fix #2504
Fix #2509
What kind of change does this PR introduce?
Bugfix
For any code change,
Does this PR introduce a breaking change?
No
Yes
No
Tested in the following browsers: