fluid icon indicating copy to clipboard operation
fluid copied to clipboard

Is there a plan to support paginate tags?

Open Soar360 opened this issue 4 years ago • 7 comments

https://github.com/Shopify/liquid/blob/master/performance/shopify/paginate.rb

Soar360 avatar Jan 21 '21 02:01 Soar360

Also there's a default_pagination may be it's useful for OC too

hishamco avatar Jan 21 '21 13:01 hishamco

Please go for it if you think you can implement it

sebastienros avatar Jan 21 '21 15:01 sebastienros

Reopeing this, while it's useful for OC, hope to find a time to explore its features

hishamco avatar Feb 02 '21 15:02 hishamco

After a little reading about paginate tags, there are many things should be take in mind:

1- paginate tag

2- integration with for

3- default_pagination filter

This needs more work, but I need to understand how it works first, seems it controls the inner for if presents

hishamco avatar Mar 17 '21 13:03 hishamco

I have done so. I created a new PaginationValue to handle the delayed loading of data and to generate page flip links and to do it asynchronously. The default_pagination filter has also been implemented. However, my solution requires the user to create a new type and derive it from the PaginationValue, which I think is not very versatile. If you are interested in this implementation, I can post this part of the code.

Soar360 avatar Mar 17 '21 13:03 Soar360

Thanks for your initiative @Soar360 feel free to submit a PR, then we can review and see the best approach that we come up with

hishamco avatar Mar 17 '21 13:03 hishamco

https://shopify.dev/api/liquid/objects/paginate https://shopify.dev/api/liquid/objects/part

sebastienros avatar Nov 02 '21 18:11 sebastienros