News for hackers. Stuff that matters.
Re:Infinite Scrolling: When to Use It, When to Avoid It by xorcist on Saturday September 10, 2022 @10:49AM (#32791120)
It also breaks the find button.

The item you wanted to search might get unloaded, or not loaded yet, in some bizarre attempt at optimization when the javascript library resposible is an order of magnitude larger than the actual content anyway.

My phone has gigabytes of memory. If you want to present five hundred items in a web shop, just list them and do not bother with any type of pagination, invisible or otherwise.

Re:Infinite Scrolling: When to Use It, When to Avoid It by Tagbert on Saturday September 10, 2022 @12:58PM (#32792391)
It also breaks the “back” button.

If you click on an item after significant scrolling, view the item, then click back, where are you? almost never where you were. Usually just at the top of the list.

Re:Infinite Scrolling: When to Use It, When to Avoid It by adhesive_wombat on Saturday September 10, 2022 @03:14PM (#32793721)
Jira goes one better. Issues in some lists are paginated into 50s. Change to "page 2", use the back button and you'll be back on the page you were on before looking at the list, because the URL hasn't changed. Go forward again and you're back at the first page. Argh!
Re:Infinite Scrolling: When to Use It, When to Avoid It by bartread on Saturday September 10, 2022 @04:12PM (#32794221)
Gah! Breaking basic navigation functionality, along with the clipboard, on page search functionality (i.e., basic application and OS level stuff), keyboard navigation, and common keyboard shortcuts and mouse/touch gestures, are amongst the absolute cardinal sins of web applications. These ought to be acceptance criteria for every single "story" implemented that impacts the client-side. Does anybody do it? Well, some, but very few.
Re:Infinite Scrolling: When to Use It, When to Avoid It by notriddle on Saturday September 10, 2022 @09:21PM (#32796019)
The back button problem is fixable. Discourse (which you’ll see on discuss.python.org and users.rust-lang.org) uses the history API to keep track of your location. You can create a URL that points at any individual post, and the page will appear “pre-scrolled” to it, so you can not only use the back button to return to your location in the infinite scroll, you can even bookmark your location in the infinite scroll.

The scroll bar and find function can be mitigated, but not as elegantly.

The real problem is that, when you load a page in the middle, it’s easy to scroll down, but scrolling UP is glitchy. That one can’t be fixed. https://meta.discourse.org/t/scroll-jank-when-scrolling-up/1...

Re:Infinite Scrolling: When to Use It, When to Avoid It by awinter-py on Saturday September 10, 2022 @04:19PM (#32794275)
yeah the nielsen article calls this 'pogo sticking'
Re:Infinite Scrolling: When to Use It, When to Avoid It by spookthesunset on Saturday September 10, 2022 @11:18AM (#32791394)
Gigabytes of memory yes but there is load time and render time too. And rendering a 120mb payload of items and their thumbnails before I can even view the top of the page seems… not the best user experience.

I don’t think there is an easy answer here. All options have some trade offs.

Re:Infinite Scrolling: When to Use It, When to Avoid It by _cd on Saturday September 10, 2022 @12:26PM (#32792046)
Typically when I serialize data for #index endpoints I return much slimmer payloads than I do in #show endpoints. I recognize that 120mb was an extreme, but you should be able to serialize lists of 500+ items into well under 1mb, with enough data to render your list view thumbnails/links.

I always thought the infinite scroll pattern was designed for analytics purposes. So that you can track user engagement. Not because technology constraints necessitated it or that it was a good user experience.

Re:Infinite Scrolling: When to Use It, When to Avoid It by NLPlatypus on Monday September 12, 2022 @07:57AM (#32808824)
Just have JS track where the user is?
Re:Infinite Scrolling: When to Use It, When to Avoid It by jandrese on Saturday September 10, 2022 @01:19PM (#32792587)
Deferring rendering of the images seems like an easy enough thing to do if your alternative is infinite scrolling. Pre-load the text and layout but leave the images and video until they're close to the viewport.
Re:Infinite Scrolling: When to Use It, When to Avoid It by xorcist on Saturday September 10, 2022 @11:44AM (#32791646)
That is not how browsers work. The browser will render the viewport immediately, long before the page has loaded. It will also load the visible thumbnails first, unless made impossible by complicated markup of course. Otherwise surfing the web on dialup in 1996 would have been intolerable.
Re:Infinite Scrolling: When to Use It, When to Avoid It by shadowgovt on Saturday September 10, 2022 @12:27PM (#32792060)
Sooner or later you have to unload content or the browser crashes. There's an upper limit to how many DOM elements browsers can handle, even with modern optimizations.
Re:Infinite Scrolling: When to Use It, When to Avoid It by dylan604 on Saturday September 10, 2022 @02:02PM (#32792968)
the lack of not being able to find something not yet loaded or recently unloaded is infuriating to me. I file shitty pagination systems with no Show All in the same category.
Re:Infinite Scrolling: When to Use It, When to Avoid It by spookthesunset on Saturday September 10, 2022 @03:43PM (#32793996)
The “find” thing is something I hadn’t considered. Yes it’s annoying when you cant search content “below the fold”
Re:Infinite Scrolling: When to Use It, When to Avoid It by r3trohack3r on Saturday September 10, 2022 @02:15PM (#32793106)
I do think it depends.

I love infinite scrolling for random content. There is no “position” so to speak. And there is no concept of “find” since you don’t know what you’re looking for. “Back” continues to work as long as your browser cached the previous page state.

Sometimes you really do want to simulate an infinite list of 4,000,000 entries!

An example: https://wikiscroll.blankenship.io

Re:Infinite Scrolling: When to Use It, When to Avoid It by bmicraft on Saturday September 10, 2022 @02:54PM (#32793499)
I find spotify is really bad with unloading ui, to the point where you have to stop and wait to see song titles if you are scrolling even moderately fast
Re:Infinite Scrolling: When to Use It, When to Avoid It by bastawhiz on Saturday September 10, 2022 @09:44PM (#32796124)
In fairness, without unloading, it will be slow. Really slow. I never added unloading to a long list in my app, and for lists with thousands of items, Chrome will take seconds to paint on my MBP if you do any vigorous scrolling. It's not about memory use, it's about practical browser performance.
Re:Infinite Scrolling: When to Use It, When to Avoid It by spicybright on Saturday September 10, 2022 @10:03PM (#32796211)
Idk if this would be better or worse, but there should be a "find on page" js API. Like how the history api is used for SPA's.