processwire / processwire-requests

ProcessWire feature requests.
39 stars 0 forks source link

Support Cursor-based pagination #511

Open jlahijani opened 7 months ago

jlahijani commented 7 months ago

It's something I just learned about and I thought it would be interesting if ProcessWire supported it. It's useful for sites with a large amount of records. Some articles:

https://laravel.com/docs/10.x/pagination#cursor-pagination https://shopify.engineering/pagination-relative-cursors https://slack.engineering/evolving-api-pagination-at-slack/ https://www.sitepoint.com/paginating-real-time-data-cursor-based-pagination/

jlahijani commented 5 months ago

Kind of a silly example, but the blog of DHH (creator of Rails framework) uses it as well probably because the blog is built in Rails which supports cursor pagination. If you scroll down and click "See more posts", you will see the URL suggests its using cursor based pagination.

https://world.hey.com/dhh

ryancramerdesign commented 5 months ago

@jlahijani You should be able to do this with selectors already? Or do you mean having a module that contains it or renders it, etc. ?

jlahijani commented 5 months ago

@ryancramerdesign I mean having cursor-based pagination capability that feels as easy to use as the classic pagination capability.