Closed BorisovskiP closed 4 years ago
Do you also think that this is a bug @damian-pastorini @gsomoza ?
No: this one is by design, because loading the previous pages is a bit risky (e.g. DoS) and technically complicated to implement. So we're letting people implement that themselves if they want to by hooking to the plugin using the provided method(s). There's more information on https://github.com/Strategery-Inc/Magento2-InfiniteScroll/issues/55
Ok, thanks for the explanation.
@gsomoza thanks for the explanation! However, I do not quite follow. What exactly is risky? I imagine the perfect UX as follows:
So in the end, I think scrolling up should work exactly in the same way as scrolling down. This is expected behaviour for me TBH. Could you elaborate why this is not possible / risky @gsomoza?
There are two main reasons why I consider the "infinite upwards scroll" feature risky:
This is a feature everyone "thinks" they want, but once they experience it they actually wouldn't like it at all. This applies especially to users who aren't very dexterous:
The second reason builds on top of the previous one: code that would make this work wouldn't actually be simple and straightforward, and it would probably be quite frontend-heavy / opinionated. This means it will also probably have compatibility issues with many more themes. This paired with the fact that his is a feature that sounds really interesting to have, might cause an explosion of "bug" requests (aka "free support" requests 😜) in this repository because the feature is either not working or the UI has issues similar to what I described above..
I'd love to see someone finally put the puzzle together on this vision of a perfect Infinite Scroll experience – which is a dream that I know SO many people have (EDIT: and once upon a time I did too!)... but having worked with this for so many years, I have yet to see a smooth implementation for the "go back" experience in general in the first place! – let alone the "infinite upwards scroll" feature...
Thanks for the detailed explanation @gsomoza!
To be honest, solution 2 - having a "load previous products" button - sounds like exactly the right thing to me. This could of course be configurable. Do you consider this a proper feature request or do you think this should not be part of the extension at all?
Yes, I can see this extension adding that feature as a configurable option that can be enabled, it could be interesting for many people. Would you consider contributing that feature?
Cool. I cannot tell yet. If the client would like to have it, I am happy to contribute it. Otherwise, I fear it will not happen due to the lack of time. Should we then re-open this issue or would you like to create a new one with the concrete feature?
We can reopen this issue, then we can reference the whole discussion for context on future support requests etc, as there's some useful information. Let me know if you're able to work on it and I'll reopen!
In the product listing page , when you scroll down a page (for example page 4), open a product , then go back with the browser back button to the same product page listing, the products from the previous pages are not displayed.
The product listing begins from that page (page 4) and at the top there a toolbar of how many products are shown ( Product 13-24 from 731 )
*Preconditions ()**
Steps to reproduce
*Expected result ()**