Skip to content
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

Stash: Keyboard navigation #9308

Merged
3 commits merged into from Jun 28, 2021

Conversation

gerhardol
Copy link
Member

@gerhardol gerhardol commented Jun 25, 2021

Fixes #8108

Proposed changes

  • HotKeys for next/previous stash and refresh
    Ctrl-P navigates to next older stash item, similar to how navigation in RevGrid.

  • Mnemonics for the form.
    As Stashes control gets a specific hotkey, it is possible to navigate in the stashes list with Alt-H arrow /PageUp/etc too
    "&Apply stash" but "S&tash all changes" as I expect Ctrl-Alt-Up to be used for stash in current worktree.

  • Stash: Keep position when dropping a stash
    Simplify deleting stashes, unless deleting the first, you would have to search for the stash close to where you just deleted the stash.

  • Remove button for custom message, just make it writeable for worktree.
    Add label for mnemonics

Screenshots

After

image

Test methodology

Manual


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Jun 25, 2021
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Hotkey(s) for Write custom stash message (and for Refresh) would be nice.

@gerhardol
Copy link
Member Author

LGTM
Hotkey(s) for Write custom stash message (and for Refresh) would be nice.

Implemented that too (also just showing refresh when it has effect, for worktree).

For the custom text mnemonics would be more natural than a hotkey, but then the logic for the custom message would need to be changed (remove button, add label and add to command if not empty) and I am not sure exactly how to handle.

@mstv
Copy link
Member

mstv commented Jun 26, 2021

Implemented that too (also just showing refresh when it has effect, for worktree).

👍 Thank you!

For the custom text mnemonics would be more natural than a hotkey, but then the logic for the custom message would need to be changed (remove button, add label and add to command if not empty) and I am not sure exactly how to handle.

I agree, it is not perfect. But I think this would be too much effort for little gain.
Though the hotkey should be displayed in the tooltip of toolStripButton_customMessage.
(BTW: The message can be double-clicked in order to enable editing it.)

@gerhardol
Copy link
Member Author

I agree, it is not perfect. But I think this would be too much effort for little gain.

Replaced button with label, could also simplify the logic.
To some extent, also the label could be removed, the box is focused by default.
(Some struggling with WinForms layout as usual...)

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. (The failing test is unrelated.)

@gerhardol gerhardol force-pushed the feature/i8108-stash-hotkeys branch from 2c18ee5 to 1654bb0 Compare June 27, 2021 22:16
@gerhardol
Copy link
Member Author

rebased without further changes

@gerhardol
Copy link
Member Author

@msftbot merge in 24 hours

@ghost ghost added the status: auto merge label Jun 27, 2021
@ghost
Copy link

ghost commented Jun 27, 2021

Hello @gerhardol!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Mon, 28 Jun 2021 22:17:40 GMT, which is in 1 day

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

Stash: Keep position when dropping a stash

Disable and ignore refresh if worktree is not shown
@gerhardol gerhardol force-pushed the feature/i8108-stash-hotkeys branch from 1654bb0 to 4c65e21 Compare June 28, 2021 22:08
@ghost ghost merged commit 65f5868 into gitextensions:master Jun 28, 2021
@ghost ghost added this to the 3.6 milestone Jun 28, 2021
@gerhardol gerhardol deleted the feature/i8108-stash-hotkeys branch June 28, 2021 22:19
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Current stash list UI control disallow quickily navigate between the changes of all stashes
3 participants