Giter VIP home page Giter VIP logo

Comments (9)

Unibozu avatar Unibozu commented on August 18, 2024 1

Just jumping on the thread - one way to solve this is to not think about pagination but about displaying results from a certain point (in time or in sequence). Using ObjectId makes is easy because they are incremental and comparable in time.
Instead of passing through a page parameter you can use a from parameter with the ID of the last job visible on the current page. The most annoying issue is that it stops you from showing all the pages and for you to use previous/next links.

from agendash.

joeframbach avatar joeframbach commented on August 18, 2024

I did attempt this, and the issue came up that when you're looking at a certain page, like you're looking at page 3, the jobs on the page keep changing. Suppose you're looking at jobs 200 through 299 on a page. Well, sorting by date the jobs keep cycling and every time the data refreshes the jobs keep changing! Very annoying.

One solution is to add the ability to "pause" the refreshes. If you're looking at historical data on page 5, you may want to pause refreshes.

Another solution is, rather than doing paging like "page 1, page 2, page 3" like hackernews does it, instead do it like reddit does: Load the next 100 jobs that occur after the datetime "2016-03-15T17:33:00Z" or something like that.

So here are two possible solutions, feel free to add more possibilities. It is on my radar though! Thanks!

from agendash.

joeframbach avatar joeframbach commented on August 18, 2024

Until then I will add a limit to get only the first x jobs like you suggested. That is a good suggestion. The ability to view historical data will then be a feature request in the future.

from agendash.

gsavoie avatar gsavoie commented on August 18, 2024

Ahh yeah I understand, thanks for your quick answer. I guess navigating the pages could stop the refresh, at least that's the simpliest way to resolve it

For the first x jobs it could be in the UI with a default value that we set in the code, so every time we open the page it loads quickly but we are still allowed to see more/all if needed... Since most of the time we want to see the recent things and not the whole collection that would help pretty much.

Anyway, just throwing ideas here!

from agendash.

simison avatar simison commented on August 18, 2024

This problem is also described here: https://www.discovermeteor.com/blog/pagination-problems-meteor/ with some suggestions, like publishing counts.

Also, just linking this here; https://github.com/expressjs/express-paginate

from agendash.

joeframbach avatar joeframbach commented on August 18, 2024

Several people are running into this, and the solution may need more time to do "correctly". Until then I am suggesting this quick limit of 200: #15

Is this a good start?

from agendash.

joeframbach avatar joeframbach commented on August 18, 2024

#15 has been merged with a default value of 200. This Issue title now reflects the remaining work to wire up the UI controls.

from agendash.

OmgImAlexis avatar OmgImAlexis commented on August 18, 2024

If any of you have a chance the new vue branch should have pagination built in.

from agendash.

koresar avatar koresar commented on August 18, 2024

Pagination is now a thing in Agendash v2.

from agendash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.