Skip to content
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

Merged
merged 4 commits into from
Aug 23, 2022
Merged

Support "For you" feed in infinite-scroll #5919

merged 4 commits into from
Aug 23, 2022

Conversation

kidonng
Copy link
Member

@kidonng kidonng commented Aug 19, 2022

Resolve #5716

Test URLs

https://github.com/

Screenshot

Screen.Recording.2022-08-19.at.16.44.39.mov

Copy link
Member

@fregante fregante left a 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?

@kidonng
Copy link
Member Author

kidonng commented Aug 19, 2022

It works. The two buttons are always in the DOM once loaded, so listeners are only added once.

Comment on lines 32 to 34
observe('.ajax-pagination-btn', button => {
inView.observe(button);
});
Copy link
Member Author

@kidonng kidonng Aug 19, 2022

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 😆

Copy link
Member

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:

Copy link
Member Author

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.

@fregante fregante merged commit e2b5cb7 into main Aug 23, 2022
@fregante fregante deleted the infinite-scroll branch August 23, 2022 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Support “For you” in infinite-scroll
2 participants