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 frontpage #18

Closed
kenodressel opened this issue Mar 17, 2020 · 7 comments
Closed

Add Pagination to frontpage #18

kenodressel opened this issue Mar 17, 2020 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@kenodressel
Copy link
Collaborator

Cloud Firestore has several features to help you manage queries that return a large number of results:

  • Cursors, which allow you to resume a long-running query.
  • Page tokens, which help you paginate the query results.
  • Limits, which specify how many results to retrieve.
  • Offsets, which allow you to skip a fixed number of documents. (DO NOT USE, 1 read per skipped doc)
@mauriceackel
Copy link
Member

mauriceackel commented Mar 18, 2020

I am working on this over at Maurice22/quarantine-hero@8c87da33746d67563e31d7301e4606f0f6bb3d1e

@mauriceackel
Copy link
Member

So there is an issue: If we use pagination, client-side filtering of locations does not work anymore (as we won't search the whole database). I wanted to fix this by filtering the location on the database as well but it turns out that more or less firebase only allows for one filter.

Because of that I would suggest to disable pagination if a user searches for a location. What do you think? Do you have other ideas?

@kenodressel
Copy link
Collaborator Author

@Maurice22 Yes thats a problem but it also means we significantly reduce reads.
Our plan for today is to re-enable the google maps integration and therefore also re-enable a proper search. So I think its fine if you build it and we merge it after we re-enable the maps api.

@mauriceackel
Copy link
Member

@kenodressel Please check out my version at Maurice22/quarantine-hero@383f2c7246739be42cff0dc542c75cfca004a6ba . I completely redesigned the way queries are done, including support when maps API is enabled. Can you give it a test? If everything works fine, I will create a PR for it.

@mauriceackel
Copy link
Member

Ah yeah and of course I added pagination there :D Check the commit messages for more info.

@kenodressel
Copy link
Collaborator Author

kenodressel commented Mar 18, 2020

I took a look and it seems fine to me. You can post a PR. Are you available for a call (send mail to help@quarantaenehelden.org) so we can include you better in our planning?

This was referenced Mar 18, 2020
@kenodressel kenodressel added the enhancement New feature or request label Mar 19, 2020
@mauriceackel
Copy link
Member

Closed in #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants