Skip to content
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

Add pagination to lists #8

Open
skuro opened this issue Dec 17, 2016 · 3 comments
Open

Add pagination to lists #8

skuro opened this issue Dec 17, 2016 · 3 comments
Assignees

Comments

@skuro
Copy link
Contributor

skuro commented Dec 17, 2016

Currently transactions (either user-specific or system-wide), participants and tags are listed without any pagination, which is not suitable for a production deployment.

@jaromil
Copy link
Member

jaromil commented Dec 19, 2016

True. We need pagination that doesn't requires javascript. Scrolling pagination may be optional and I'd rather leave it for later. Since there are other visualisations that also need pagination, I wonder how to best make a generic function for that in views.

@skuro
Copy link
Contributor Author

skuro commented Dec 19, 2016

Pagination could possibly be done at the storage level, as otherwise all list queries would result in the whole collections being passed around. In this scenario, we could define a standard set of query parameters (e.g. ?page=X&skip=Y&pageSize=Z), add a :pagination entry in the liberator context and let lower levels take care of that (e.g. db.transactions().find().limit() in mongo).
Responsibility of the view would always be to render the pagination links, for which both the full size of the queried list and the pagination query parameters will be used.
Javascript is not really needed here, and all we can build in the above way can also be completely reused when we decide to offer a "pure" API, with application/json being offered instead of text/html.

@jaromil
Copy link
Member

jaromil commented Dec 19, 2016

Sounds great. Other use cases of pagination: search results and participants lists.

@skuro skuro self-assigned this Jan 5, 2017
@skuro skuro changed the title Add pagination to transaction lists Add pagination to lists Jan 5, 2017
@aspasia aspasia self-assigned this May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@jaromil @skuro @aspasia and others