These sorts of incidents make me pine for the site to give me pause
- Begin writing or editing an issue or comment
- Click "Preview"
- Forget that you need to click the "Preview" (now "Edit") button, especially if the post is long, and instead hit "Cancel" at the bottom
- Lose all your work without a moment's pause.
If the user does want to "Cancel", they can simply navigate away without updating a wiki page or issue. Most modern browsers seem to keep form state if one goes back then immediately forwards again, but the JS that "Cancel" fires irrecoverably destroys the information, mildly amusing for a VCS hosting provider.
Looking at another site, StackOverflow, there are a couple major differences that I feel make for far superior UX:
- You are warned about potentially destructive actions (going to another post, closing the window, hitting back, etc), and also:
- There is no "cancel". Web forms are not modal, you do not need to "abort" entering data in order to go do another task instead. I'll let the Nielsen Norman group, a UX research firm explain it.
- What you call "Cancel", Nielsen calls "Reset", a much more destructive thing:
- The worst problem about Reset is that users click the button by mistake when they wanted to click Submit . Bang — all your work is gone!
- Having two buttons at the bottom of a form clutters up the interface and makes it harder for users to clearly see their next step. Some small amount of wasted time is spent scanning the useless button and deciding which of the two buttons is the correct one.