If you’re going to reinvent the wheel, you should at least make sure your new version is somehow better than the previous kind. Reimplementing standard UI and OS widgets is one of the most common ways developers reinvent the wheel these days — it started with Flash developers building their own controls, and has now spread to Adobe AIR and Silverlight.
It might be a welcome trend, if the replacement widgets people were building had more functionality than the OS-native ones that are available for free in any other context. But usually, the widgets I see in these frameworks have less than half the functionality of the things they try to replace. I’m going to pick on scroll bars for now, because I’ve seen them horribly mangled too many times.
To start with one aspect of scroll bars that we often take for granted: Can you guess which of these text boxes contains more text?
Of course you can; you don’t even need to guess. The one on the left has more, and you can tell immediately because the movable slider on its scrollbar is smaller. This is a feature you get for free from the native OS widget, and one I have never seen implemented in a Flash, AIR, or similar interface.
Here are all the things a native scrollbar does. I absolutely guarantee you, if you’ve reinvented a scrollbar, your implementation is missing at least two of these features:
- As mentioned above, the slider object changes size automatically, to give a general impression of how much content the scrollable area contains.
- The arrows at the top and bottom of the scrollbar are clickable, and clicking them once will move the content up and down by a small amount (typically 1 or 2 lines).
- Clicking and holding the top and bottom arrows will cause the content to scroll more rapidly.
- Clicking and dragging on the slider will scroll the content smoothly to any position the user chooses. (Yes, I have seen scrollbar implementations in which the slider was not a draggable item!)
- Scroll wheel support: If the user’s hardware includes a scroll wheel, scrolling it will move the content up and down. This is many users’ preferred method of scrolling content these days, and yet it’s totally ignored by over half the Flash interfaces I’ve encountered in the past year. I’ve bolded it because it’s the one that gets so egregiously ignored.
- The “gutter” in between the arrows and slider is also clickable. Clicking on it once will scroll the content up or down by, roughly, the size of the visible area (a “page”, as it were).
- Of course, clicking and holding in the “gutter” area will repeatedly and rapidly scroll the content. (This is rarely apparent unless you’re dealing with a tall scrollable area and a fairly long document. Try loading a 25-page or longer document into a word processing program, and set the program to full-screen.)
- When the content is scrolled (by whatever method), the slider will move up or down to indicate how far from the beginning or end you are. (Essentially the converse of item #4: Moving the slider scrolls the content, and scrolling through the content moves the slider.)
- The arrow buttons and the gutter area give a visual indication when they’ve been clicked, so the user has better feedback. (This is one of those little things that makes the user experience so much better. It’d be so easy to do, and yet I’ve seen about 2 Flash scrollbars in my life that have bothered with that feature.)
- If you set your cursor focus on the scrollable area, using the up and down arrow keys will scroll the content. Either the Home and End or Ctrl+Home and Ctrl+End keystrokes will move directly to the beginning and end of the content. The PgUp and PgDown keys may also move the content by an amount similar to clicking in the gutter.
- The scrollbar — including its arrows, gutter and slider — looks just like every other scrollbar on the user’s computer. The user can immediately identify the items and finds them familiar.
Even if you have done a smashing job of replicating the first 10 points on this list, you simply can’t get the final one in an AIR, Silverlight, or Flash interface. If your whiz-bang interface platform provides some other benefit, then dropping that last feature might be worth it.
But it’s no excuse for dropping all the other stuff. Most non-native scroll bars I’ve seen support only 3 or 4 of these features, which means anyone who normally uses any other ways of interacting with scrollbars winds up cursing and deciding that this broken implementation is cheap and chintzy.
Which it is. If you’re going to reimplement the wheel, at least make it something that will roll smoothly.
2 Comments
On MobileSafari, the two textboxes show up side by side, full text visible, no scrollbars.
On Mac OS X, there’s a user preference for how to handle the ‘up’ and ‘down’ arrows in the scrollbar. You can either have the arrows together at the bottom of the bar, or at opposite ends of the bar. Changing this preference takes effect immediatly for all applications.
Yet more reasons why you don’t want to reinvent the scrollbar.
> On MobileSafari, the two textboxes show up side by side, full text visible, no scrollbars.
How annoying of them. They’ve got style=”height: 10em” explicitly set, so they should each show up as 10 ems in height. But the side-by-side layout is correct.
I didn’t know you could have the buttons be at opposite ends of the bar. That’s nice to know. And even if I personally wouldn’t want or use the feature that puts the buttons next to each other, I agree that removing that feature in an imitation version would be pretty annoying.