empowerhack / DrawMyLife-Service

API and Admin system for the Draw My Life initiative - Volunteers: check README and GitHub Projects to get started.
https://github.com/empowerhack/DrawMyLife-Service/projects
MIT License
13 stars 0 forks source link

Paginate / infinite scroll the drawings table #71

Open krissy opened 8 years ago

krissy commented 8 years ago

Pagination is currently set up with the Kaminari gem and triggered on button click by calling the kaminari link link_to_next_page. The JS for all this lives in this JS partial. We also implement decorators to access our models and their collections via the Draper gem. You can read the section on how to integrate pagination with these decorators here: https://github.com/drapergem/draper#using-pagination.

We want to change the current hide/show more functionality to Google-like numbered pagination e.g. << 1 | 2 | 3 >>

tanyapowell commented 8 years ago

@krissy @CathMollie is this a priority? I'm now free on Sunday so could crack on with it?

CathMollie commented 8 years ago

@tanyapowell Yes, @krissy and I agreed we definitely want to paginate the Manage Drawings area. We may redesign this area - but not sure if we'll achieve before next pilot so I'd say go for it. @krissy - do you agree? If pilot is a month long, there could be a lot of drawings per org!!!

tanyapowell commented 8 years ago

Brilliant @CathMollie!

@rocioleon @EChesters what's the max number of rows in the drawing table would you recommend we display before we paginate to another page? 10? 15? More? Less?

tanyapowell commented 8 years ago

After discussing with @EChesters, @marizoldi and @rocioleon it's been decided to go with infinite scrolling (ideally with some lazy loading), rendering 10 rows of the table at a time as a short term solution until this view has been redesigned.

krissy commented 7 years ago

@CathMollie @tanyapowell @EChesters @marizoldi @rocioleon Do we still want to go with lazy loading for now? We have devs becoming available to build out any pagination features, and the current scrolling is not ideal for field workers as the data grows, so should we prioritise the redesign or implement google-ish pagination for now?