-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Feature Infinite scroll upwards #466
Comments
Any news on this? I think it's quite basic functionality for infinite scroll and much needed. |
While pretty basic functionality, it's actually quite complex to implement this right, due to how browsers render web pages. Right now I don't have any updates on this. |
@fieg any news here? Or would you know if the source code for the example page you posted (http://scrollsample.appspot.com/items) is available somewhere? |
Hi @fieg thanks for the great library, we would like to purchase this but found this issue. Do you have any estimation in your mind when this issue will be solved? |
Normally, I'm going with the AGPL non-commercial scenario for my website, but - depending on how much you'd ask for - I could imagine contributing financially to the development of this feature. Would that help, @fieg ? |
I'm thinking to give this a shot in the comming weeks. No guarantees tho. Feel free to motivate me by buying a license. |
I made some progress on this feature today, but it still needs more work. In the meantime I would like to ask if you want to beta test this feature. If so, please fill out this form: Thanks! |
Hello folks! With a major delay (sorry about that) I hereby present you Infinite Ajax Scroll 3.1.0-beta.1 with upwards scroll support! The implementation of this feature is a proof of concept, and I can really use your feedback. You can leave your feedback in the comments below. ExampleYou can check out an example of upwards scroll in this codesandbox: You can open Getting startedInstall the new beta version from npm or unpkg. Given the following html: <a href="/page/1" class="pager__prev">Prev</a>
<span class="pager__current">2</span>
<a href="/page/3" class="pager__next">Next</a> You can now configure the previous link, like this: let ias = new InfiniteAjaxScroll(/*..*/, {
next: '.pager__next',
prev: '.pager__prev' // <------ That's it!
}) InternalsI want to give you a bit of insight on why I consider this a proof of concept and why I want your feedback. This feature works as follows:
To prevent the issues in step 5 it does all of this really fast in a new animation frame, making it barely noticeable. This is what I want to validate with this beta. So again, I love to hear your feedback! |
Tested on joomla category blog. |
Thank you for the feedback! Can you host it somewhere so I can debug it? |
Thank you a lot, this seems to work really well! I have deployed it here (you should be able to navigate to other points in the file with the "Seite" pagination dropdown or the "Inhalt" table of contents modal window, or also browse other works on the platform): Will continue testing. One thing I found out: While I can have several pagination elements (one above and one below the main content) and address them with their classname |
Thank you for your response @awagner-mainz! I'm glad to hear that things work well. I find your case for multiple pagination and spinner elements interesting and will reconsider the "only a single element" restriction. I'll get back to you on that later. Let me know if you find new things while you continue testing this. |
I will need to upload it to an online test server, will do it later this week, for now you can see it in action in the clip: https://www.youtube.com/watch?v=dj9y8_0I0Vo&ab_channel=%D7%9E%D7%93%D7%99%D7%A0%D7%98 |
Thank you for sharing the video. It is still a bit hard to see what actually happens. When you return to the previous page it seems to scroll downwards and upwards again. Is that happening automatically or are you scrolling manually? If you could upload it to a test server where are can manually interact with it, that would be very helpful. |
Hi @fieg, Thank you for this! I found that if I had this in my css:
It was causing issues with auto scrolling up or down. I've since removed it and it seems to be working correctly. I've implemented it here: https://mohawk-testing.myshopify.com/collections/testing password is I currently have it paginating 48 products (contemplating paginating less to speed up load time). Also due to carousels being set up for every product, I had to use I switched it from 48 products to 24 products to see if that would remove the jumping on return to page. It seems that when I hit the back button after clicking on a product, it jumps the scroll a bit lower than I was previously on, I think because it's loading the previous page. That's the only bug I've really found so far. May be slight confusing for some users, but I'm going to see if based on the amount of items will make it less jumpy when you hit back. One of the things I'm noticing that's different from your test link is that mine keeps the I use the default pagination provided by Shopify which outputs:
And I'm using:
Seriously amazing work. |
Thank you for your response @nathanielperales. I did a quick look and see the issues you described. I'll try to dig a bit deeper in the coming days. I'll keep you posted. |
If page 1 has the list items already sorted by descending order and I want to scroll up and show the next page (which is the next list items chronologically sorted correctly) how can I acheive that ? |
@giannik first make it work server-side with regular pagination (prev and next links), then follow the instructions here: #466 (comment) |
@nathanielperales I think it might have to do with the images. Can you try to give the images (or its container) a fixed height? |
Any update on when this might be out of beta? |
Thank you for bringing this to my attention. I'm happy to announce that Infinite Ajax Scroll 3.1.0 is released and now available from all sources:
Thank you for your support! |
Description
Allow to load previous pages when scrolling upwards. This has been requested many times in the past. Implementing this in a cross-browser way is quite complex and might need special html markup.
Related issues: #274 #220 #280 #186 #173 #179 #40 #207 #134
Example
http://scrollsample.appspot.com/items
Alternatives
V2 previously supported the
prev
method which could prepend the previous page, but only after pressing a trigger.The text was updated successfully, but these errors were encountered: