UsabilityDesignPatterns/UndoNotConfirmation

From MozillaWiki
Jump to: navigation, search

UndoNotConfirmation

When the user issues a command, don't ask the user whether they really want to do it; just do it, but provide an easy undo.

Rationale

The interface includes a command which is "scary" in some way, such as deleting something, closing something, etc. You want to protect users from hurting themselves by accidentally activating this command due to misunderstanding, misclicks, or sudden changes of heart.

Benefits

UsabilityDesignPatterns/ConfirmationDialogBox is an antipattern because the dialog box is a useless time-wasting annoyance if the user did want to hit the delete command, and it offers very poor protection if the user didn't want to hit the delete command (because it [[UsabilityDesignPatterns/TeachingUnsafeHabits teaches unsafe habits).

The "Undo" command stays out of the user's way when they really do want to delete things, it doesn't teach unsafe habits, and it lets the user change their mind 'at any point' after issuing the command. With a well-done undo feature, deleting things begins to feel like a safe action.

A single undo only lets you change your mind about the last thing you did; if you do something else that is undoable, you clobber your "undo buffer" and lose your work permanently. That's why the best kind of undo is UsabilityDesignPatterns/InfiniteUndo.

When to use it

When not to use it

For obvious reasons, it's hard to apply undo to actions such as sending an email or otherwise launching something across the network to other people. At that point, it's generally too late to provide an undo feature (unless you introduce a hidden time-based delay between when the user hit "send" and when the sending was actually carried out, but then you run into all the problems of a UsabilityDesignPatterns/TimeSensitiveInterface.

Adding an Undo command means you need to find space in your interface for a button, link, menu item, or other affordance, so it does come with some cost of added complexity.

Implementation Patterns

Case Studies

"Recently Closed Tabs" in the Firefox history menu is essentially an "Undo Close Tab" feature.

GMail has a prominently placed "Undo" link that is hilighted whenever you delete or move an email.

The Trash Can on Mac is essentially an undoable way of deleting files. To undo deletion, open the trash can and take the file back out. (It still gives you a confirmation dialog before you empty the trash can, though.)

Supporting Research

Mistakes and Pitfalls

Introducing the Pattern to New Users

Open-source implementations