Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 2.56 KB

button-order.md

File metadata and controls

19 lines (10 loc) · 2.56 KB

Platform specific button order

Since this version of Desktop was released, it has been particularly difficult to find a way for our buttons to conform to expectations across platform for Windows and macOS while also conforming to expectations based on whether the action is destructive. We're primarily referencing the macOS Human Interface Guidelines around buttons and dialogs, and the Windows UX Guidelines for buttons.

Windows and macOS have different approaches when it comes to positioning standard action buttons (such as Ok/Cancel) in dialogs.

On Windows, the default order is to put the affirmative action on the left side of dismissal button (Ok, Cancel) whereas macOS does the exact opposite (Cancel, Ok.). See OK-Cancel or Cancel-OK? The Trouble With Buttons for an overview of these differences.

We think it's important for GitHub Desktop to adhere to these platform-specific conventions in the vast majority of cases because users often rely on muscle memory when reacting to a dialog.

This is how we've interpreted our convention of how destructive and non-destructive dialogs should work on each platform based on these guidelines:

button conventions

For more specific discussion of how our dialogs are implemented, please see the dialogs documentation.

Dangerous or destructive actions

Both Windows and macOS guidelines specifically call out the need for the default button to be the safest option when the action is dangerous or destructive. An example of such an action would be deleting a branch or removing a repository. In these cases, the default and initially selected button should never be the one that performs the destructive action. One exception we've made to this is when someone has explicitly tabbed to the button for a destructive action and then hits Return or Enter. In this case, we think the expectation of most people is that this will perform the destructive action, and therefore should select it to avoid confusion. We explained our reasoning for that in this issue.