Page MenuHomePhabricator

Few suggestions related to the "Discard edits" modal
Closed, ResolvedPublic

Description

  1. Allow users to express their preference using the keyboard

    It's currently not possible to switch preference from the default "Discard edits" to "Continue editing" option in the "Are you sure?" modal using the arrow keys. The user has to use the "Tab" key to switch between the options which is a little unintuitive as they are closely aligned to consider them as different elements.
  1. Make it difficult to discard edits

    The default option selected in the "Are you sure?" modal is "Discard edits". To make sure users don't lose their edits easily wouldn't it be better to choose "Continue editing" by default ?

Event Timeline

It's currently not possible to switch preference from the default "Discard edits" to "Continue editing" option in the "Are you sure?" modal using the arrow keys.

This is the same as most system dialogs we have tested. Not sure we should re-invent the wheel.

The default option selected in the "Are you sure?" modal is "Discard edits".

This is the same as the system behaviour for onBeforeUnload messages. If users already expect the selected option to be "Yes" we probably shouldn't change this. (The same default is also used on CX's delete translation prompt)

It's currently not possible to switch preference from the default "Discard edits" to "Continue editing" option in the "Are you sure?" modal using the arrow keys.

This is the same as most system dialogs we have tested. Not sure we should re-invent the wheel.

If you mean that the testing you did showed that users are comfortable with switching the options using Tab / Shift+Tab and I'm just an odd ball complaining about not being able to switch options using arrow keys, I'm fine with it :-) It happens at times. I guess the fact that those options are very close with no space-gap between them makes me think that arrow keys should be working (as stated in the task description). Anyways, this isn't a great deal as far as there's a way to switch options using the keyboard (Tab/Shift+Tab) :-)

The default option selected in the "Are you sure?" modal is "Discard edits".

This is the same as the system behaviour for onBeforeUnload messages. If users already expect the selected option to be "Yes" we probably shouldn't change this.

I'm not sure about the messages you're referring to here. What I'm sure about is that there are at least two different ways in which you can look at "Yes" as the default value when it comes to modals. Before I get into that, let me give a little context as to why I thought the default of "Discard edits" was a bad idea.

I was once editing a page using the 2017 Wikitext editor and had done considerable amount of changes to it. Then I accidentally hit the Escape button. This brought up the "Are you sure?" modal asking me whether I wished to leave editing mode without saving ("saving" ?. I thought it should be "publishing"). On seeing the modal with the "Discard edits" option selected by default and the close layout of the buttons my mind expected the left arrow key to select the "Continue reading" option. So, I clicked the left arrow key and the Enter button consecutively. Unfortunately, my assumption was wrong and I lost the changes I did to that page and had to re-so them from scratch. :-(

Coming back to the different interpretations of "Yes" as the default option. The two different interpretations are:

  1. "Yes" as default option for an operation that can be undone, recovered or for one which doesn't incur much loss. For example, a hypothetical "Would you like to save this edit for sure?" modal when it is a null-edit. I wouldn't mind if "Yes" is the default here as there's nothing I lose as a consequence of the default.
  2. "Yes" as default option for an operation that cannot be undone or recovered or one that incurs considerable loss. For example, the "Discard edits confirmation" modal. I would not like this one to have "Yes" as the default as I lose what I did. I would want to take more action when it comes to losing things. What kind of editor would like to lose his edits easily? That said, if "Yes" has to be default then I would like to see the modal that asks me whether I would like to Continue editing (but that doesn't sound intuitive).

(The same default is also used on CX's delete translation prompt)

What does CX refer to here?

  1. Make it difficult to discard edits

    The default option selected in the "Are you sure?" modal is "Discard edits". To make sure users don't lose their edits easily wouldn't it be better to choose "Continue editing" by default ?

(This problem was reported again in T249880)

Kaartic changed the task status from Duplicate to Resolved.May 29 2020, 3:34 AM
  1. Make it difficult to discard edits

    The default option selected in the "Are you sure?" modal is "Discard edits". To make sure users don't lose their edits easily wouldn't it be better to choose "Continue editing" by default ?

(This problem was reported again in T249880)

Thanks for the heads up. I've closed this as a duplicate :)