7 ms·
How To Scroll
- mbostock 12y agoThis essay is my attempt to synthesize a few general rules from recent work with custom scrolling. Scroll-based effects can be contentious, but I believe a lot of that comes violating reader’s expectations and breaking direct manipulation. There are ways to use scrolling effectively — to achieve the desired visual design without hurting usability.
- tophtucker 12y agoI love this. Thank you. - Are there general principles you'd emphasize for mapping continuous control domains to discrete content ranges? (Like input rasterization.) - If you could redesign the user control/input space (keyboards, mice, etc.), what might it look like?
- mbostock 12y agoThanks. - Ideally, no mapping is necessary; controls should be naturally suited to their application. The problem here is that scrolling is designed for homogeneous content (such as a long column of static text), while web pages increasingly have heterogeneous media. Rather than try to rewire the controls, it’s easier to adapt the content so that it fits the controls we have. By limiting the visual changes and by retaining normal scrolling text, we are less likely to harm usability. - I’d like to have access to touch events in desktop, for one, so that I could know whether the fingers are down (on track pads and magic mice, e.g.). And I always thought chording keyboards were a cool idea (particularly after observing court stenographers), but never seriously tried one. And maybe some standardization of swipe events on mobile.
- the_cat_kittles 12y agothanks, really liked the summary. I also found the linked nytimes articles incredible!
- coldpie 12y agoOne thing I noticed is missing is supporting middle-click scrolling. I'm not a webdev, so I don't know how difficult it is. But that's pretty much the only way I scroll, so it's infuriating to run into shitty websites that break it.
- mbostock 12y agoIf you follow rule 2 and adapt content to the viewport (rather than listening to wheel events directly), then middle-click scrolling should continue to work fine.
- Vendan 12y agoHave you thought about some kind of toggle for those of us for whom this scrolling junk irks? I've yet to see any site that actually uses it to present content that wouldn't have been fine without it.
- mbostock 12y agoToggles aren’t a great solution; it’s a pain for you since you need to opt-in, and it’s a pain for the designer since they now have to create two different versions of the site. I think either we figure out how to use scrolling effectively or we collectively realize it’s a mistake and abandon it as a fad. My personal belief is that we can make it work, and improve the visual presentation without harming usability, but perhaps there are a few more things to figure out.
- Vendan 12y agoUnfortunately, I don't care how much of a pain something is for the designer. Remember, the designer wants me on the page, not the other way around. And I'd rather be able to have a sane website experience rather then a crappy one. Most of the examples you had were absolutely horrible to deal with, even though I'm not on a weird platform. Win7 with latest Chrome, and the mac one won't let me get past the second tick thingy. IMHO, I wish this fascination with "Oh, let's screw with the user experience cause we want to be special" would just disappear.
- SiVal 12y agoI strongly disagree. I like the variety and the experiments. When you try new things, some will work out, some won't, and which do and don't vary depending on who you ask. I'm still sympathetic. There are certainly UI experiences I can't stand. Pages that throw things in my face on hover are my biggest pet peeve. You jump to a page, your mouse happens to land on top of some random thing. You don't click, but it doesn't matter, because it throws a blanket over what you're trying to see because you hovered over something you didn't want to see, and now you have to figure out how to somehow get rid of it. It's a revolting experience that I see everywhere, but I seem to be the only one who notices that trying to move my mouse to something I DO want to click ends up stepping on a hover-mine, which covers what I was trying to click..., so it's not like I can get anyone else to complain. I feel your pain (even though I LIKE some of these scroll effects.) But if we were to tell designers to "stop screwing with the user experience", we'd just as likely have every page throwing random things in your face as part of the "standard hover UI" as get rid of it. We're better off in the end with lots of experiments, seeing what new ideas seem to work, and adding support for those into the evolving Web platform.
- kyptin 12y agoWell-written and well-reasoned. Thank you. I'd like to propose a sixth rule: don't move the goal posts. In other words, don't load additional content dynamically. This violates the user's expectation of when they will be finished scrolling. I find this frustrating, and I doubt I'm the only one. Thoughts?
- bengali3 12y agoI definitely agree with not moving the goal posts, I think this makes the scroll indicator useless since we make mental 'bookmarks' based on position. I believe a good compromise would be to keep the document height fixed and without loading everything. This wouldn't work for 'infinite scrolling' solutions, but scale-resetting could be minimized this way.
- gohrt 12y agoConsider adding: "If you think you need custom scrolling, think again."
- JetSpiegel 12y agoAlternatively, replace the entire page with "Don't" in bold big letters.
- experimental- 12y agoI happen to like many of the New York Times articles that "mess" with your scrolling (that is, use the position changes to trigger events). To me, they somewhat resemble magazine articles with full page images in them, and I don't see a problem in there.
- snegu 12y agoI found this very interesting, but I was wondering if you have any data around these points? I'd love to see results of user testing or A/B testing, as right now I'm just surrounded by differing opinions.
- dwwoelfel 12y agoAre you doing any kind of throttling on the scroll events? When I was optimizing transitions based on scroll position, I found that pulling the scroll events off of a queue of size 1 was really effective in reducing dropped frames [1]. [1] https://github.com/circleci/frontend/blob/master/src-cljs/frontend/scroll.cljs https://github.com/circleci/frontend/blob/master/src-cljs/fr...
- 3rd3 12y agoI think side notes are the single most underappreciated visual design element, and you make great use of them. I’m very much in favor of Ted Nelson’s idea that everything should have a content related, even editable/interactive sidebar.
- maxmcd 12y ago#3 is the biggest offender for me. The feeling of "well, I'm scrolling, but nothing's happening. Am I doing something wrong...oh there it is" can really throw off an otherwise positive content experience.
- MisterBastahrd 12y agoYeah... sometimes I'm scrolling and there's some sort of effect on the page that some design nerd spent a couple work-weeks on, but it may not always be readily apparent. If I do what I'm apt to do when scrolling doesn't work, aka click on the scrollbar to jump ahead, then it breaks the entire presentation. Having to scroll forever to get at the content I'm looking for is incredibly annoying.
- tripa 12y agoShift-space scrolls up a page. Thank you! I come from Unix, I'd have expected b or backspace to scroll up a page, been disappointed by browsers numerous times, and just lived without it.
- gohrt 12y agoOMG this works in Chrome.
- jessaustin 12y agoMy mind boggles. This is like a relative of mine, who has used desktop computers for decades, and recently revealed an ignorance of ctrl-c, ctrl-v. I think I actually cried a little bit for her.
- xorcist 12y agoI too am stunned that someone has used their computer for many years without ever having to send SIGINT, but perhaps she only uses very well behaved applications? It's not often however you have to send raw characters. Several of my coworkers didn't even know what that particular control sequence did when I quizzed them, so that doesn't surprise me at all.
- 0942v8653 12y agoWell, I don't know. Control+V is pretty important for paging through content. Even people who don't use raw characters have to be able to scroll (which just happens to be what this article is about…)
- jessaustin 12y agoHaha, well done. Yes I would have had to look that up.
- josho 12y agoThis is a common (and brilliant) pattern on Mac's. Once you learn the keyboard shortcut for an action, you've immediately learned how to do the opposite action, eg. Undo: Cmd-Z Redo: Cmd-Shift-Z.
- Vendan 12y agoTo be honest, hijacking scrolling takes me to about the 90% "I'm ready to leave this site" frustration level. I've learned to live with it for a few sites, but if you don't get my attention is about 10 seconds, I'm gone.
- mortenjorck 12y agoNumber five is the rule that’s being broken by an increasing percentage of the web without any custom scrolling at all: Every site with a sticky top bar breaks spacebar / pgdn scrolling by covering up the top few lines of text after a full-page scroll, requiring the user to back up a few lines to see what was hidden. There should be a fairly straightforward Javascript workaround for this, intercepting the spacebar or pgdn keys to scroll the height of the unobstructed viewport instead of the full viewport, but I haven’t seen anyone implement it (I’ve been considering creating my own open-source library for it but I have no experience managing an OSS project). Still, I wouldn’t consider that ideal, and maybe it’s time for some standards action. Here’s my proposal: body { scroll-offset: 72px; // body will page-scroll 72px less than the window height to compensate for the sticky header }
- RobotCaleb 12y agoHear, hear! I've made this same complaint on this site many times, but less eloquently. I frequently use spacebar to scroll down one page. More and more I have to hit space, then up arrow a few times. :(
- amelius 12y agoSpace-scrolling doesn't work anyway, because when you're about to hit the bottom of the document, you don't know where to continue reading. If space-scrolling were smooth, this problem probably didn't exist. But still, in its current state, I'm not using it.
- 12y ago
- badusername 12y agoThis is great, and perfectly encapsulates all the irksome interactions and usability problems with scroll hijacking that has taken over the web in the last couple of years. I hope this article travels wide and forces a rethink of some of the strategies.
- jameshart 12y agoUsing scroll-driven websites on a Mac with its gesture-based trackpad scrolling is often a beautiful experience, and it's usually also delightful on an iPad. Sometimes it even translates well to mice with scrollwheels. Using the same site on a windows laptop with weak trackpad gestures, where you instead rely on arrow keys, or awkward middle-button-synthesis for scroll, it's all too often completely frustrating. Even this piece seems to regard users using anything other than an apple trackpad or a scrollwheel mouse as a secondary concern.
- smoe 12y agoIn my opinion if you have a site that mainly consits of text (e.g. News sites, blogs) you should never interfere with scrolling behaviour. Lazy loading content is ok, but please keep dynamic stuff to a minimum. Because I'm traveling I'm using a cheap 70$ Android. So the phone isnt very fast and the internet connections slow. This makes a good number of "modern", especally SPA news sites completely unusable. Scrolling callbacks constantly freezing the whole interface. It's not per se the fault of using too much javascript – gmail and facebook work pretty well. But if you dont have ressources to optimize your sites fancy js magic please consider not doing it at all. I dont expect much of my cheap phone. But reading plain text is definitely something i do.
- jplur 12y agoI just gave up trying to read a newsweek mobile form article because of this (site kept resetting the scrollpoint to the top of page). If I can't read a text article on my $500 pocket super computer, I'm beyond annoyed. And I agree, even if your scroll .js works perfectly, the callbacks leave a perceptible pause on most phones.
- Joeri 12y agoEven on a high-end phone all that fancy js uses a lot of battery. Some "mobile" sites cause my phone to get warm. I don't like visiting them because it's like I can feel my battery draining.
- ajcarpy2005 12y agoLarger jumps in page-scroll-position could possibly be less distracting on our vision systems. I just don't want to be unsure about what will happen when I trigger the scrolling behavior.
- thisjepisje 12y agoIt makes me sad that very little applications support scrolling by clicking the mmb/scrollwheel then dragging the mouse, this is my preferred method of scrolling.
- pestaa 12y agoI liked that too, but for some reason my KDE + Firefox didn't support it out of the box.
- TheLoneWolfling 12y agoI'll add: Don't break accessibility. Hijacking scrolling can easily confuse screenreaders, spiders, old browsers, etc. Especially when you start doing tricks with hiding content in weird ways, etc, etc.
- mariusmg 12y agoReal men scroll only with space bar (and shift + space) :)
- InclinedPlane 12y agoPosition:fixed isn't a panacea either, I've seen it horribly overused as well. Lately I've seen a lot of UIs recreating the worst mistakes of the era in the late '90s when everyone discovered frames. I've seen some cases where sites are so broken that they have maybe one line of text of scrollable content on mobile devices because of all the dumb mostly useless fixed content on every page (ads on the bottom, headers on the top).
- boomlinde 12y agoYes, but you have to have the "share on X" buttons follow you through the whole document. You never know when the moment is lost!!!
- 205guy 12y agoGood god, how about "don't break anything!" Is that too much to ask for? As in "don't break scrolling, don't break forward and back navigation, don't break link highlighting, don't break resizing (desktop and mobile), don't break clicking (I kid you not, some websites entice you to click and then can't be bothered to respond), don't break plain text." I agree with everything in this article, but it should be common sense for a designer/developer/writer. Stop breaking the Internet. Serve up data, not apps, give me some viewing hints if you must, but let me or my browser settings control my viewing experience. I suppose plain data doesn't make money, which is why all the apps/JS and interaction got added to the page to hijack our attention which could be then monetized.
- vanderZwan 12y agoAlso, if I select a piece of text to copy, don't unselect and show a damn popup with "share on facebook/twitter" when I right click!
- MichaelGlass 12y agoHe proposes event based and scroll based interfaces. The Mac Pro example is hideous, but Apple's retina iMac page is quite beautiful (and lives somewhere between the two, not using gestures but giving the user the impression that no scrolling is happening) http://www.apple.com/imac-with-retina/ http://www.apple.com/imac-with-retina/