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
swap buttons in 'remove repository' and 'discard changes' dialog on Windows #2463
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.
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.)
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:
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.
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.
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
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.
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.
@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...
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.
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.
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.
@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:
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. 😄
Activity
j-f1 commentedon Aug 14, 2017
It looks like the “Discard Changes” dialog has the “Cancel” button in the same position:
shiftkey commentedon Aug 14, 2017
Walking through the first example...
The button group for
confirm-remove-repositorydefaults to Cancel for the submit behaviour:desktop/app/src/ui/remove-repository/confirm-remove-repository.tsx
Lines 51 to 54 in 4791d54
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:
desktop/app/src/ui/lib/button-group.tsx
Lines 50 to 55 in 4791d54
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.
shiftkey commentedon Aug 15, 2017
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.
shiftkey commentedon Aug 15, 2017
Putting this in the design queue to get their feedback on changing these forms on Windows.
[-]Suggestion: Swap buttons in 'Remove repo' dialog[/-][+]swap buttons in 'remove repository' and 'discard changes' dialog on Windows[/+]j-f1 commentedon Aug 15, 2017
The native default buttons on macOS get activated by return, too.
iridinite commentedon Aug 15, 2017
If the intention is to warn users about a potentially dangerous action, how about making the confirmation option red?
Just trying to be helpful here ^^
joshaber commentedon Aug 15, 2017
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.
shiftkey commentedon Aug 15, 2017
@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...
joshaber commentedon Aug 16, 2017
Ahhh, I missed that 👍
bjcull commentedon Sep 9, 2017
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.
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.
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.
joshaber commentedon Sep 11, 2017
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.
shiftkey commentedon Jan 22, 2018
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).
shiftkey commentedon Feb 28, 2018
Dropping
help-wantedon here while we figure out how to proceed.billygriffin commentedon Nov 5, 2019
@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:
bjcull commentedon Nov 6, 2019
I think having the cancel button in blue is still weird, but putting it in the right place is a big improvement, thank you!
billygriffin commentedon Nov 7, 2019
Thanks @bjcull! The blue is our way of depicting which button gets initial focus, and therefore would be selected when hitting
EnterorSpacebar. Totally understand that might feel odd to some folks, but glad it's in the right direction. 😄