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

Fetch more than 3 suggested follows after first load #4595

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

estrattonbailey
Copy link
Member

New Explore page only loads 3 suggested follows up front in order to show feeds above the fold. But when loading more, we should load more than 3 at a time.

This PR loads 10 users after the first page has been returned. Additionally, since feeds are already below the fold, we might as well fetch more than 3. So this PR updates to fetch 10 of those and let them extend below the fold.

Copy link

render bot commented Jun 21, 2024

Copy link

github-actions bot commented Jun 21, 2024

Old size New size Diff
6.3 MB 6.31 MB 1.31 KB (0.02%)

@gaearon
Copy link
Collaborator

gaearon commented Jun 21, 2024

Why not always load 10? But then slice them in the UI according to how many pages you "asked" for (.slice(n === 1 ? 3 : 3 + n*10)). This would also let us show the correct avatars (by peeking ahead).

Copy link
Collaborator

@pfrazee pfrazee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice

@pfrazee
Copy link
Collaborator

pfrazee commented Jun 21, 2024

Ah, or dan's suggestion

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yesss

@estrattonbailey estrattonbailey merged commit cb37647 into main Jun 21, 2024
6 checks passed
@gaearon gaearon deleted the explore-pagination branch June 21, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants