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

WIP: Infinite scrolling #233

Closed
wants to merge 3 commits into from
Closed

WIP: Infinite scrolling #233

wants to merge 3 commits into from

Conversation

sant0s12
Copy link
Contributor

@sant0s12 sant0s12 commented Dec 31, 2023

This pull requests is a WIP implementation of infinite scrolling.

It seems to work fine in my limited testing except when browsing the home page with no url parameters. In this case, the new page loads and the already existing posts are no longer visible.

I'd also like to implement a spinner to let the user know that new content is being loaded, as well as removing the "next" button since it would no longer be necessary.

In case you don't like the approach that I used to implement this, let me know and I can perhaps try something else or maybe you can tackle this yourself in the future.

Also I kinda goofed the commits with the auto formatter, I hope that is not a big issue. If it is, I can try to un-goof it.

Copy link

vercel bot commented Dec 31, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @Xyphyn on Vercel.

@Xyphyn first needs to authorize it.

@Xyphyn
Copy link
Owner

Xyphyn commented Dec 31, 2023

There seems to be a lot of formatting changes, could you make your formatter use my .prettierrc?

Copy link

vercel bot commented Dec 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
photon ✅ Ready (Inspect) Visit Preview Dec 31, 2023 4:35pm

@Xyphyn
Copy link
Owner

Xyphyn commented Dec 31, 2023

The only issue with this is what caused me to not implement infinite scroll in the first place- try going to a post, then go back. You lose your place.

I have an idea for implementing infinite scroll, and I will try it tomorrow.

@sant0s12
Copy link
Contributor Author

sant0s12 commented Jan 1, 2024

I think retaining the place works now but it feels like a bit of a hack. Ideally loading posts should be done entirely client side probably.

Another thing is that browsing communities or user profiles doesn't work yet.

I haven't found a .prettierrc anywhere :(

@Xyphyn
Copy link
Owner

Xyphyn commented Jul 11, 2024

Infinite scroll has been added to Photon now

@Xyphyn Xyphyn closed this Jul 11, 2024
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.

2 participants