Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Fix so dialogs are canceled when pressing escape/closing them #1452

Merged
merged 1 commit into from
May 8, 2018

Conversation

Ben3eeE
Copy link
Contributor

@Ben3eeE Ben3eeE commented May 8, 2018

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

The label for canceling a dialog needs to be "Cancel" or "No" so that when canceling the dialog either by pressing escape or by closing the dialog cancels the dialog. Otherwise these actions default to the first item. This can be a bad default choice for the force push dialog which would force push when you close the dialog.

image

Alternate Designs

There is a cancelId option according to the electron documentation but this is not supported on Windows.

Benefits

  • Don't accidentally force push or merge with conflict markers when the user intended to cancel the dialog
  • Moves the cancel button to where it should be

Possible Drawbacks

  • Someone relies on pressing escape to execute a force push? 😅

Applicable Issues

Fixes #1368

@smashwilson
Copy link
Contributor

Someone relies on pressing escape to execute a force push? 😅

Oh no my workflow!

Haha, thanks @Ben3eeE 🚀

@smashwilson smashwilson merged commit 383cb59 into master May 8, 2018
@smashwilson smashwilson deleted the b3-escape-dialogs branch May 8, 2018 13:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pressing "Escape" when asked to confirm a Force Push executes the Force Push
2 participants