Giter Site home page Giter Site logo

Comments (4)

Wildhoney avatar Wildhoney commented on June 25, 2024

Aren't the two paradigms very similar — at least from the perspective of the server-side implementation? Instead of having next and previous, you could scroll, and simply keep loading the additional pages. Use the perPage to limit how many each scroll would yield.

from snapshot.js.

neverfox avatar neverfox commented on June 25, 2024

Hmm, you might be right. I was thinking mainly in terms of the client-side differences. For some reason, I got the impression that each new request to the server altered the whole collection landscape server-side, but I could choose the necessary merging strategy to keep my window populated appropriately (if the scrolling stops mid-way between pages for example, or if I'm pre-fetching the next few). Is that what you're getting at?

from snapshot.js.

Wildhoney avatar Wildhoney commented on June 25, 2024

Yep — you're right in that it alters the collection landscape, but that's more of a client-side problem.

I suppose taking the user to the top of the page to begin their infinite scroll journey from scratch would be the most logical. That's how most infinite scrolls that I've seen operate, because otherwise where you are on the page post filter/reorder would bear no resemblance to where you were pre filter/reorder — and thus simply confuse the user. There would also be DOM issues (unless you're being clever by not rendering unseen pages), such as if the user had scrolled to page 5001, then repainting all of those pages when reordering would be terribly slow.

As long as you don't reorder and/or apply filters, then each request is predictable.

from snapshot.js.

neverfox avatar neverfox commented on June 25, 2024

I suppose taking the user to the top of the page to begin their infinite scroll journey from scratch would be the most logical.

Right. Filtering when only viewing some of the data screws with one's mental model, but I'm not sure if it's any worse for infinite scrolling than the pagination story, since most of what keeps you from getting disoriented is some kind of feedback about where you are whether it's (page 3 of 10,000) or (records 100-110 of 100,000).

unless you're being clever by not rendering unseen pages

Yes, I am indeed, using react-list.

In any case, I'm going to give it a shot and I can report back about how it went.

from snapshot.js.

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.