News for hackers. Stuff that matters.
Re:Infinite Scrolling: When to Use It, When to Avoid It by mananaysiempre on Saturday September 10, 2022 @08:30AM (#32790029)
On one hand, yes, I agree.

On the other hand, it seems to me that this is partly the fault of the scrollbar as an idea. How do you show the current position in a document for which, for one reason or another, you cannot instantly compute the visible height? I still remember an Android PDF viewer which would run through every page of a 2000-page document to get the page dimensions before displaying anything. (From what I can see, modern viewers display the first page instantly by accepting being caught in their lie when a PDF has pages of wildly varying size.) Even a gigabyte of Unicode plain text with no line breaks in a proportional font is a serious problem. I don’t think we can special-case network streaming here (although it’s not unimportant either).

Re:Infinite Scrolling: When to Use It, When to Avoid It by amelius on Saturday September 10, 2022 @10:21AM (#32790906)
> I don’t think we can special-case network streaming here (although it’s not unimportant either).

The relative position inside an infinite stream is always 0, and the height of the scrollbar handle (showing relative size of the viewport relative to the entire document) is also 0.

As the size of a finite-sized document grows, these problems also show.

Problems are: you can't click on the handle since its size is close to 0; you can't click above the the handle to do effectively go one page up, since the handle is at position 0 (or close to it).

Scrollbars are pretty useless for large documents, even more so for infinite streams.

Re:Infinite Scrolling: When to Use It, When to Avoid It by paulryanrogers on Saturday September 10, 2022 @12:39PM (#32792179)
I recall desktop UIs solving this by having a minimum scroll button size. Then just aligning the bar to the full height of the doc, at least where the data size was known. And when first loaded the bar would sometimes shift as it loaded, albeit without having to scroll to force further loading.
Re:Infinite Scrolling: When to Use It, When to Avoid It by chrismorgan on Saturday September 10, 2022 @09:49AM (#32790617)
I remember Android apps some years back that showed an approximate scrollbar, when it knew how many items there were (paragraphs, in the case I’m vaguely recalling—and although all the content was available, it might not have wanted to render it all at once, as it could have tens of thousands of words) but not how tall each was. I think it drew a scrollbar with the assumption that off-screen items would be a certain height, so if you went from a screenful of long paragraphs to a screenful of short paragraphs the scrollbar could be amusingly wonky, considering our usual expectation of spatial scrollbars. In some contexts this itemwise rather than spatial scrollbar can actually be more useful, but whether or no, it’s not a concept the web supports directly, and there will be certain niggles in the result of implementing it.
Re:Infinite Scrolling: When to Use It, When to Avoid It by irthomasthomas on Saturday September 10, 2022 @04:43PM (#32794434)

  "How do you show the current position in a document for which, for one reason or another, you cannot instantly compute the visible height? "
Actually, that sounds like an idea, make the height of the page roughly the real height of the total pages. It can still load content on scroll, but being able to leap ahead a few pages sounds great. Now if we can just get it to remember our position when we hit back, and not just return us to the beginning of the adventure, then infinite scroll would be tolerable.
Re:Infinite Scrolling: When to Use It, When to Avoid It by RunSet on Saturday September 10, 2022 @08:55AM (#32790190)
> How do you show the current position in a document for which, for one reason or another, you cannot instantly compute the visible height?

Perhaps by not "instantly" displaying the document- that is, displaying it before you are able to display its scrollbar.

Re:Infinite Scrolling: When to Use It, When to Avoid It by mananaysiempre on Saturday September 10, 2022 @09:21AM (#32790365)
That seems silly as well, doesn’t it? Why should I wait for all the 1030 pages and 155 MB of Matter and Interactions[1] or 1442 pages and 126 MB of Life[2] to load before I can do anything with it? (Not that a hundred meg should take that much time to load, but then you realize PDF is the moral equivalent of a bunch of gzipped JSON files pointing to each other...) It would be handy if PDFs included an index of all page sizes in a single place, but they don’t, so we need to make do with what they do include somehow.

[1] https://matterandinteractions.org/

[2] https://www.macmillanlearning.com/college/ca/product/Life-Th...

Re:Infinite Scrolling: When to Use It, When to Avoid It by 9dev on Saturday September 10, 2022 @09:05AM (#32790250)
But why on earth would I want to wait for a document to open, just so the height of the scrollbar is accurate when I see it first..? That is such a minor detail when viewing a document.

Maybe the metaphor of the scrollbar is just a bad one?

Re:Infinite Scrolling: When to Use It, When to Avoid It by plugin-baby on Saturday September 10, 2022 @09:21AM (#32790363)
Or just imperfect, but often useful?
Re:Infinite Scrolling: When to Use It, When to Avoid It by mananaysiempre on Saturday September 10, 2022 @09:22AM (#32790380)
Imperfection (or non-universal applicability) isn’t the problem, absence of a graceful fallback when it hits is.
Re:Infinite Scrolling: When to Use It, When to Avoid It by Waterluvian on Saturday September 10, 2022 @09:47AM (#32790589)
Could someone remind me what the name is for the eternal debate between the two valid camps: “HTML should never ever render if there’s an error” vs. “Renderer should try its best to render part of a document if there’s errors” ?

I feel that this is akin to that. I strongly believe both perspectives are valid for often overlapping contexts.

Re:Infinite Scrolling: When to Use It, When to Avoid It by mananaysiempre on Saturday September 10, 2022 @10:05AM (#32790755)
Draconian error handling vs Postel’s law? Both behaviours are still in browsers for XHTML (and XML+XSLT) resp. HTML (though the removal of <noscript> in XHTML5 makes me sad).
Re:Infinite Scrolling: When to Use It, When to Avoid It by kevin_thibedeau on Saturday September 10, 2022 @05:07PM (#32794591)
Scrollbars can be dynamically updated as the content is processed. This is also a distinct advantage of a proportional sized scollbar elevator like those in Windows since the elevator shrinks to its final size rather then starting at a small fixed size and shifting around.