The Second Edition is out!
Visit designinginterfaces.com to read excerpts and learn more.

Smart Selection


Photoshop's magic-wand selection tool selects a red area

What:

Make the software smart enough to automatically select a coherent group of items, rather than making the user do it.

Use when:

The user works with selectable objects of any kind -- text, pixels, geometric objects, even tree items or table cells. The selectable items are organized into coherent visual groups, like words or sentences in a text editor, or pixels of contiguous color in an image.

Normally, selection of all the items in one of these groups requires the user to click and drag the mouse pointer with some precision. This isn't always easy. For instance, lassoing all the red pixels might be difficult because they're not contained in a tidy rectangular area.

Why:

Not all users are good at fine, precise mouse movements. Also, sometimes circumstances make them hard or impossible for everyone! (Consider a laptop's trackpad, for example.) Once it becomes clear to the software that the user is trying to select a particular group if items -- or when the user intentionally begins a smart selection -- then the software ought to help out the user and select that group automatically. Let computers do what computers are good at, and let humans do what they're good at!

How:

Figure out which UI gesture you ought to use to make a "smart selection." The gesture might be any of the following actions:
  • A double click or double tap
  • A single click while in a particular tool or mode, such as Photoshop's magic wand
  • A single click while a key is held down
  • The act of enlarging the selection out towards the boundaries of a group, as many text editors do
If larger groups contain the smaller groups, consider ways to enlarge the smart selection to the enclosing groups, too -- like expanding the selection of a word to the selection of a sentence, and then a whole paragraph.

But be careful. When done thoughtlessly, smart selections can be irritating. Imagine the user's aggravation when he tries to precisely select a group of pixels, but every time he comes close to a color boundary, the selection "snaps" out to where he didn't want it! The equivalent problem happens in some text editors; see the following example.

Examples:


From Word

Word does smart selection on words and lines. These screenshots show the results of a mouse click-and-drag (first), a double click on a word (second), and a triple click on the whole paragraph (third).

Note the inclusion of the trailing space when a whole word is selected. You wanted that space to be selected too, right? No? Well, that's too bad, because you can't not select it if you invoke smart selection via double-click. If you don't want it, you have to click-and-drag over the word yourself, and carefully stop before accidentally including that space.

This kind of behavior causes Word to tread the fine line between being appropriately helpful and being obnoxious. When you design software to make decisions for users, be sure you're correct most of the time, for most users, under most circumstances.