Skip to content

Why is "cancel" the primary button in the delete branch dialog? #2988

Closed

Description

@adamreisnz

image

This is very confusing, why is Cancel the primary button here?
I've clicked it by accident several times now when wanting to delete a branch.

Normally actions like "Cancel" or "Back" are the secondary buttons.

Activity

  1. shiftkey commented on Oct 8, 2017

    @shiftkey
    Member

    @adamreisnz if you're on macOS, the button order matters in some "destructive" situations. There's more details about this here #1311.

  2. adamreisnz commented on Oct 8, 2017

    @adamreisnz
    Author

    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:

    image

    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).

  3. added
    macOS
    on Oct 9, 2017
  4. joshaber commented on Oct 9, 2017

    @joshaber
    Contributor

    @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:

    screen shot 2017-10-09 at 9 12 35 am

    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.

  5. adamreisnz commented on Oct 9, 2017

    @adamreisnz
    Author

    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.

  6. locked as resolved and limited conversation to collaborators on Jul 19, 2018
  7. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    macOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions