-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support "For you" feed in infinite-scroll
#5919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work well when repeatedly switching between tabs? Can you make sure that listeners aren't piling up?
It works. The two buttons are always in the DOM once loaded, so listeners are only added once. |
source/features/infinite-scroll.tsx
Outdated
observe('.ajax-pagination-btn', button => { | ||
inView.observe(button); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be two element-ready
calls instead, but our selector-observer is so lightweight 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized yet another limitation of animations: they don't start when the tab is hidden.
This is the same rAF limitation described here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have stated it here: #5886 (comment)
It's fine in this case, we don't need to load a hidden tab.
Resolve #5716
Test URLs
https://github.com/
Screenshot
Screen.Recording.2022-08-19.at.16.44.39.mov