You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why is "cancel" the primary button in the delete branch dialog? #2988
@adamreisnz that's because that screenshot's from Windows where the button order is flipped.
On Mac, Cancel is on the left like your screenshot:
Cancel is the default button in the case of destructive actions, as per the HIG:
Users sometimes press Return merely to dismiss a dialog, without reading its content, so it’s crucial that a default button initiate a harmless action. [...] Alternatively, when a dialog may result in a destructive action, Cancel can be set as the default button.
I still find this very confusing, not sure if I know of any other applications that work this way, whether on Mac or on Windows.
In our own software, when there are potentially very destructive operations, we just force the user through an additional check, like ticking a checkbox to confirm before they can hit the primary button.
I don't think users of Github desktop are computer users of the kind that will consciously click on Discard Changes but then blindly hit enter. Most of us (I think) know what we're doing.
Activity
shiftkey commentedon Oct 8, 2017
@adamreisnz if you're on macOS, the button order matters in some "destructive" situations. There's more details about this here #1311.
adamreisnz commentedon Oct 8, 2017
Hmm, that still doesn't clarify really. In the example in that issue the order is switched, and "Cancel" is still the primary (blue) button:
In both of these cases, "Cancel" should be the secondary (non-blue) button, and positioned on the left (as it is correctly in my screenshot).
joshaber commentedon Oct 9, 2017
@adamreisnz that's because that screenshot's from Windows where the button order is flipped.
On Mac,
Cancelis on the left like your screenshot:Cancelis the default button in the case of destructive actions, as per the HIG:adamreisnz commentedon Oct 9, 2017
I still find this very confusing, not sure if I know of any other applications that work this way, whether on Mac or on Windows.
In our own software, when there are potentially very destructive operations, we just force the user through an additional check, like ticking a checkbox to confirm before they can hit the primary button.
I don't think users of Github desktop are computer users of the kind that will consciously click on Discard Changes but then blindly hit enter. Most of us (I think) know what we're doing.