Skip to content

swap buttons in 'remove repository' and 'discard changes' dialog on Windows #2463

Closed

Description

@iridinite

Description

I would like to suggest swapping the Cancel and Remove buttons in the confirmation dialog for removing a repo from Desktop. The reason is that in other dialogs, such as branch creation, cloning and creating a new repo, the button to proceed/confirm is always on the left side and colored blue.

image

For the sake of consistency, I think this should go for the repo removal confirmation as well. It's quite easy for a user who might not exactly be paying attention, to hit the wrong button, because they were expecting Cancel to be on the other side.

I guess it might be nitpicky, but this really struck me as an odd design decision. 😄 If this was done intentionally to draw the user's attention to the Cancel button (as removing something might be destructive), might I suggest instead coloring the Remove button red, like the 'danger zone' buttons on a repo's controls on the GH site?

Other dialog boxes, to illustrate my point: (Note that the "yes, continue"-like option is colored and is on the left.)

image
image

Version

GitHub Desktop version: 0.7.2

OS version: Windows 10 Home

Activity

  1. j-f1 commented on Aug 14, 2017

    @j-f1
    Contributor

    It looks like the “Discard Changes” dialog has the “Cancel” button in the same position:

    screen shot 2017-08-14 at 17 49 39

  2. shiftkey commented on Aug 14, 2017

    @shiftkey
    Member

    Walking through the first example...

    The button group for confirm-remove-repository defaults to Cancel for the submit behaviour:

    <ButtonGroup destructive={true}>
    <Button type="submit">Cancel</Button>
    <Button onClick={this.onConfirmed}>Remove</Button>
    </ButtonGroup>

    We're not allowed to put the submit button last, because we have this rule that expects the submit button to go first, for consistency when implmenting dialogs.

    When rendering the button group it's this code that determines when to flip the buttons around on Windows:

    } else if (
    __WIN32__ &&
    buttons[buttons.length - 1].props.type === 'submit'
    ) {
    buttons.reverse()
    }

    So we're enforcing the submit action is rendered first, which on macOS does make sense - but maybe it's not as logixal on Windows, when you compare it to the create and clone dialogs.

    I need to refresh my memory on what Windows expects for these sorts of "destructive" actions.

  3. added
    more-info-needed
    on Aug 14, 2017
  4. self-assigned this
    on Aug 14, 2017
  5. shiftkey commented on Aug 15, 2017

    @shiftkey
    Member

    An assortment of example Windows dialogs:

    (this last one is Sublime)

    What's interesting here is the "Confirm" action is focused, and pressing "enter" to submit would perform the action. This is inverse to the macOS convention and how these dialogs work currently. Need to ponder a way out of this that works with our conventions.

  6. removed their assignment
    on Aug 15, 2017
  7. added
    design-input-needed
    and removed
    more-info-needed
    on Aug 15, 2017
  8. shiftkey commented on Aug 15, 2017

    @shiftkey
    Member

    Putting this in the design queue to get their feedback on changing these forms on Windows.

  9. changed the title [-]Suggestion: Swap buttons in 'Remove repo' dialog[/-] [+]swap buttons in 'remove repository' and 'discard changes' dialog on Windows[/+] on Aug 15, 2017
  10. j-f1 commented on Aug 15, 2017

    @j-f1
    Contributor

    What's interesting here is the "Confirm" action is focused, and pressing "enter" to submit would perform the action. This is inverse to the macOS convention.

    The native default buttons on macOS get activated by return, too.

  11. iridinite commented on Aug 15, 2017

    @iridinite
    Author

    If the intention is to warn users about a potentially dangerous action, how about making the confirmation option red?

    image

    Just trying to be helpful here ^^

  12. added
    windows
    on Aug 15, 2017
  13. joshaber commented on Aug 15, 2017

    @joshaber
    Contributor

    I think the question here is specific to Windows.

    To provide some context on our behavior on macOS: when an action is destructive (e.g., discard changes), the convention is that the default button should be Cancel. Otherwise the default button should be the action button.

    So the question is, what's the Windows convention? In @shiftkey's examples, those all seem to be non-destructive actions, so I'm not sure they give us the answer.

  14. shiftkey commented on Aug 15, 2017

    @shiftkey
    Member

    @joshaber those screenshots are from dialogs where you are about to lose unsaved changes to a file, and they are favouring the safe option of saving the file, rather than the destructive result of discarding...

  15. joshaber commented on Aug 16, 2017

    @joshaber
    Contributor

    Ahhh, I missed that 👍

  16. bjcull commented on Sep 9, 2017

    @bjcull

    The confirmation button should always be the coloured one (and in my opinion always on the left, for windows users at least). I almost accidentally deleted a branch precisely because I snapped to the right hand side for a cancel.

    image

    This type of action is different to the examples given above, as it's the primary action and not a side effect of something else (like closing a file and losing changes). An example of a direct action like this is permanently deleting a file in windows.

    image

    The buttons are in the correct order and the safe action is outlined by default. My only change would be to colour the primary action red, as it's destructive.

  17. joshaber commented on Sep 11, 2017

    @joshaber
    Contributor

    It sounds like everyone's agreed: the confirmation button should always be on the left, where currently it's on the right for destructive actions.

  18. removed
    design-input-needed
    on Sep 11, 2017
  19. added
    help wanted
    on Nov 16, 2017
  20. shiftkey commented on Jan 22, 2018

    @shiftkey
    Member

    We took a shot at this in #3347 but unfortunately encountered some issues with how the Dialogs currently work - this is summarized in #3347 (comment).

  21. removed
    help wanted
    on Feb 28, 2018
  22. shiftkey commented on Feb 28, 2018

    @shiftkey
    Member

    Dropping help-wanted on here while we figure out how to proceed.

  23. billygriffin commented on Nov 5, 2019

    @billygriffin
    Contributor

    @niik and I are working on this, and because it became really hard to follow all the potential cases for both macOS and Windows, we wanted to share this diagram to help guide our path. We'll also include this in docs about how these should work:

    button conventions

  24. bjcull commented on Nov 6, 2019

    @bjcull

    I think having the cancel button in blue is still weird, but putting it in the right place is a big improvement, thank you!

  25. billygriffin commented on Nov 7, 2019

    @billygriffin
    Contributor

    Thanks @bjcull! The blue is our way of depicting which button gets initial focus, and therefore would be selected when hitting Enter or Spacebar. Totally understand that might feel odd to some folks, but glad it's in the right direction. 😄

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

    enhancementwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions