Imagine for the sake of simplicity I have a web app to-do list, where each item is a line and has a check mark near it. When the user clicks the check mark, the task is then "done" and the line fades out of view. Unfortunately, sometimes users check the wrong task. I want to add undo functionality. I've thought of three methods, and I can't decide between them:
- Undo button.
- Instead of fading out, leave the item but strike through it and convert the check mark to "restore" button.
- When a user clicks the check mark pop a confirm dialog (modal or otherwise).
I've seen all three options used in various configuration (for example stack overflow uses 3 for the "flag" action, Trello uses a sort of undo button - it keeps a log of actions you can undo etc.). Is one of the options preferable? Is there a better option?