2010-11-16
When good ideas go bad: how not to do a file chooser dialog
I hate the modern Gnome file chooser dialog. Fortunately its problems make a great illustration of the perils of falling victim to a good idea.
The good idea that infected the modern Gnome file chooser dialog is showing a preview of the file you've selected (provided that it is a preview'able media type, such as a picture). This would be a great idea if it worked instantaneously, and perhaps it does on some people's machines. But on slow machines it is most of a usability disaster, because the implementation freezes the dialog while it generates the preview.
What this does is turn selecting an image file from a quick double-click into a sequence where you click, the dialog stalls as you click again, and a second later a postage stamp preview of the image flickers present for a moment before the entire dialog disappears (because you have, after all, selected a file). The implementation has turned a good idea into something that slows people down and damages system responsiveness.
The other usability problem with these previews is that they resize the file chooser dialog on the fly; when a preview is generated, the dialog expands to the right to accommodate it. This causes problems for dialog placement and is visually distracting, all for what is presumably supposed to be a bonus feature.
Unfortunately part of the problem here is the weakness of the traditional Unix library based programming model, which makes it quite hard to do asynchronous processing in a way that is sandboxed from other libraries and the rest of the application. This is especially so if you really need to be able to call other libraries that were in turn not necessarily written to be thread-safe and to carefully sandbox themselves, as the file chooser dialog may well need to in order to interpret various media formats.
Sidebar: how to do it right
In my opinion, the way to do this right is:
- preview generation should be asynchronous.
- the dialog should always have a space for the preview.
- when the preview is being generated, you can have a discreet, faded 'processing' animation of some sort occupying the space.
- if no preview can be generated, put a faded 'not available' icon in the space.
- once the preview is available, fade it in to the already-established space.
You want status information to be low-key because it is a low priority thing; you do not want it to distract people from the actual file list.