New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Discard" shortcut does not work with box appearing on mouse hover #103

Open
hmemcpy opened this Issue Sep 23, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@hmemcpy
Copy link

hmemcpy commented Sep 23, 2017

When I select a few lines in the diff window, and press Cmd+Shift+D, I get the Discard dialog for the selected lines, which is the expected result:
image

However, if I just hover over a hunk, when I get the selection box:
image

Pressing the Discard shortcut key tries to discard the entire file!

I would expect it to activate the Discard changes... button on the box.

@DanPristupov

This comment has been minimized.

Copy link
Contributor

DanPristupov commented Sep 24, 2017

Hi Igal,

This is a tricky question. Technically, there's no selection, so the shortcut should be applied to the whole file. Hovering mouse over an element doesn't make it selected.

I need to figure out how this behaves is os x.

Updated: I just checked XCode. Hovering item doesn't make it respond to shortcuts. However selection makes the item responsible.

For example, autolayout constraints in XCode. Mouse hover + delete key will not remove the item item. But after a click the item will handle the hotkey.
2017-09-24 at 19 28

Does it make sense?

@clounie

This comment has been minimized.

Copy link

clounie commented Sep 25, 2017

Agreed with @hmemcpy here...having the button and keyboard shortcut do different things given the same visual cue is pretty confusing.

Maybe one answer could be letting the user select hunks? That way Fork maintains consistency with the standards you mentioned, Dan, but also provides the user a clearer pattern of behavior to cue off of.

@DanPristupov

This comment has been minimized.

Copy link
Contributor

DanPristupov commented Sep 26, 2017

@clounie not sure about allowing users to select hunks. I don't want to complicate things so much. Then we will get requirements for obvious selection mechanics: move selection by up/down arrow keys, multiselection, selection with cmd etc.

Probably it should work like @hmemcpy advised and highlight or blink the active chunk after pressing the key, so user could clearly see what chunk is currently processed.

@DanPristupov DanPristupov added this to the 1.0.73 milestone Dec 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment