News for hackers. Stuff that matters.
Re:Steady.js – No more scroll jank by null_ptr on Sunday June 08, 2014 @03:38PM (#7865619)
How about no more scroll jank by just delivering plain useful content without the anti-usability bells and whistles? Even the cheapest hardware out there today is able to provide a nice user experience, and in answer to that we invent new ways to make everything bloated and choppy.
Re:Steady.js – No more scroll jank by gavinpc on Sunday June 08, 2014 @03:56PM (#7865679)
While I completely agree with your principle, I find myself interested in shimming the not-yet-standard "sticky" positioning, which is in draft specifications and available in bleeding-edge [0]. Depending on how many items use it, you would have to write your scroll handlers carefully.

In cases where this would really improve usability, I consider it an exception to my general antipathy towards "bells and whistles", since it will be native before too long.

[0] https://developer.mozilla.org/en-US/docs/Web/CSS/position

Re:Steady.js – No more scroll jank by mmahemoff on Sunday June 08, 2014 @04:22PM (#7865769)
Your comment fits the general pattern of "I want to keep it simple but if I could just do X" which is entirely valid from a UX perspective and the reason why any generalised janky buster is a good step forward (assuming it does the job, and with minimial overhead).
Re:Steady.js – No more scroll jank by i_am_ralpht on Sunday June 08, 2014 @05:59PM (#7866057)
sticky isn't expected to change much, and ships prefixed (and with accelerated compositing) in iOS 7.
Re:Steady.js – No more scroll jank by madeofpalk on Sunday June 08, 2014 @09:54PM (#7866635)
But it remains unavailable in Google Chrome and they don't plan on implementing it until it hits the standards board.
Re:Steady.js – No more scroll jank by huhtenberg on Monday June 09, 2014 @12:26PM (#7869116)
How about understanding that presentation matters. In fact, in the marketing domain presentation frequently is the content.

One man's anti-usability bells and whistles is another person's essential user engagement element that shapes the perception of the product. You try and sell MBP in Courier New/13px at 100% width and we'll laugh it off as the most idiotic idea ever. And that's not even getting into derivatives like website design galleries that generate a lot of viral awareness, but won't even look at sites without a UX gimmick.

Re:Steady.js – No more scroll jank by ihuman on Sunday June 08, 2014 @02:00PM (#7865335)
What is scroll jank? Neither the author of this post nor the links posts explain it. Searching for more information just brings up those same pages.
Re:Steady.js – No more scroll jank by aroch on Sunday June 08, 2014 @02:09PM (#7865360)
It's explain at the link in the first para [1]. It's the catchy way of talking about screwing with site layout and scroll performance when manipulating the DOM with onscroll events. It became a thing to look for after Google's 2013 IO and dev conferences focused and removing jank from the web and Android - both in user facing (speed up DOM manipulation) and in code (prevent jank to begin with).

1: http://jankfree.org/

2: See videos on jankfree

Re:Steady.js – No more scroll jank by michaelmior on Sunday June 08, 2014 @02:04PM (#7865350)
Jank is basically jerky scrolling. This is normally caused by too much happening handling scroll events.
Re:Steady.js – No more scroll jank by werdnapk on Sunday June 08, 2014 @02:42PM (#7865451)
Not sure why the need to invent a new word for this. Scroll "twitch" would have been a perfectly acceptable choice I would think. ie. Twitchy scrolling.
Re:Steady.js – No more scroll jank by sehr on Sunday June 08, 2014 @02:52PM (#7865479)
It's not a new word, it's been around for decades
Re:Steady.js – No more scroll jank by codexon on Sunday June 08, 2014 @09:58PM (#7866643)
Jank is a slang word.

http://www.telegraph.co.uk/culture/10303816/Derp-YOLO-and-Ja...

They seemed to not know about proper terminology such as jitter.

Re:Steady.js – No more scroll jank by sehr on Monday June 09, 2014 @01:07AM (#7867128)
I've never heard jitter used in client side web development, so it may just be custom in this domain. That being said, claiming either one as proper seems a bit misguided
Re:Steady.js – No more scroll jank by kcbanner on Monday June 09, 2014 @01:40AM (#7867210)
jank is the accepted industry term for scrolling which is jerky, or happens out of sync with the initiating user input
Re:Steady.js – No more scroll jank by notduncansmith on Sunday June 08, 2014 @02:12PM (#7865364)
The infinite-scroll demo was pretty janky for me: Chrome 35.0.1916.114 on a Macbook Air.

Scrolled down to the bottom, and then got thrown around the page a bit before settling. Not a fun experience (and I've seen infinite scroll done right).

Re:Steady.js – No more scroll jank by Nemcue on Sunday June 08, 2014 @02:55PM (#7865487)
You're referring to "jank" when additional content is added to the page, which to my understanding isn't what this library remedies.
Re:Steady.js – No more scroll jank by notduncansmith on Sunday June 08, 2014 @08:28PM (#7866466)
True, though it's jank nonetheless. I just expected a little more from a demonstration of a "jank-free" experience. Had it been a font-rendering library, I'd gladly be more forgiving. Maybe their demo should have been some kind of parallax scrolling (from whence so much of this scroll-related jank seems to originate)?
Re:Steady.js – No more scroll jank by underwater on Sunday June 08, 2014 @03:55PM (#7865677)
This is a great idea and I love that it is self contained.

However, I don't see a lot of benefit in the way you're using requestAnimationFrame. JavaScript is single threaded, so if your callback is a long-running function then the onscroll handler won't fire until the callback is done.

Instead of using requestAnimationFrame to delay both the checking and handler callbacks (which means callbacks don't know about the scrolling until 33ms after it happens) you'd probably be better off using it to just throttle the global onscroll handler.

You might also want to take a looks at mobile scroll events. Chrome is relatively sane but iOS Safari and the native Android browser do weird things like only firing a scroll event after the page has stopped moving.

Re:Steady.js – No more scroll jank by shawnz on Sunday June 08, 2014 @09:03PM (#7866539)
> However, I don't see a lot of benefit in the way you're using requestAnimationFrame. JavaScript is single threaded, so if your callback is a long-running function then the onscroll handler won't fire until the callback is done.

When a normal onscroll handler runs, doesn't it block the browser from processing the scroll event until the handler is finished? I assume this is to keep that from happening.

Re:Steady.js – No more scroll jank by underwater on Tuesday June 10, 2014 @11:34PM (#7876409)
Yeah, but let's say scroll events happen every 10ms and the callback takes 50ms to complete. The first scroll event will be relatively fast, because it's just doing scheduling.

But when the callback kicks in, the scroll events that happen in the 50ms it takes will be buffered. The browser can't pause the callback to run the event handler.

So we will still get janky performance.

Re:Steady.js – No more scroll jank by huhtenberg on Sunday June 08, 2014 @04:00PM (#7865693)
The infinite scroll example shows a blinking "Loading..." text and that's it. Recent FF on Windows.

[1] http://lafikl.github.io/steady.js/examples/infinite.html

Re:Steady.js – No more scroll jank by TimWolla on Sunday June 08, 2014 @04:34PM (#7865814)
I can confirm problems in Firefox. It does work in Chrome, however.
Re:Steady.js – No more scroll jank by rnnr on Sunday June 08, 2014 @05:26PM (#7865966)
another scroll junk. I have my monitor positioned vertical, so 1920 vertical pixels and no scroll bars, ...next pages content not accessible, stack forever at page one!
Re:Steady.js – No more scroll jank by dmak on Sunday June 08, 2014 @11:08PM (#7866822)
Rephrasing what rnnr said: The infinite scrolling example breaks if you are not able to scroll. For example, if you just delete enough nodes in that list where the scroll disappears, then you wont be able to load in more content.
Re:Steady.js – No more scroll jank by spullara on Monday June 09, 2014 @01:27AM (#7867184)
A proper implementation of infinite scroll loads until the window is filled.
Re:Steady.js – No more scroll jank by digitalmaster on Sunday June 08, 2014 @03:44PM (#7865643)
just a wrapper for requestAnimationFrame.. useful.. but not game changing