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

SCM Viewlet should be more keyboard friendly #90893

Closed
isidorn opened this issue Feb 18, 2020 · 10 comments
Closed

SCM Viewlet should be more keyboard friendly #90893

isidorn opened this issue Feb 18, 2020 · 10 comments
Assignees
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug scm General SCM compound issues tree-widget Tree widget issues verified Verification succeeded
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Feb 18, 2020

In short: I should be able to navigate in the SCM viewlet and press a key to stage / commit a change and the focus should remain in the SCM viewlet.
Enter currently opens the change and moves focus. I think that is fine, but we could have a shift + enter or something like that for stage / commit and keep focus.

A bit longer from @ndarilek

Sometimes I make several sets of changes, and want
to split them into logical commits. It can be hard to limit a set of
changes to a single logicl commit because often they need to be tested
together, and one won't make much sense if another is impractical or
unneeded. Right now I:

  1. Press Ctrl-Shift-G to jump to the VCS changes view.

  2. Tab to my changes.

  3. Find a change in the tree.

  4. Press the Applications key.

  5. Arrow down to Stage Changes.

  6. Press Enter.

  7. Repeat 4-6 a few times...

Is it possible to stage changes just by pressing Enter on an item? That,
to me, seems most logical, with Discard and other operations remaining
reachable through the context menu. More often than not, I'm in this
view wanting to stage changes.

Yes I can set up Smart Commit to stage everything, but I've already
accidentally committed secrets that way. :) Yes I can group untracked
files and not Smart Commit those, but that took a bit of digging to set
up. I just think that the default in this view will almost always be to
stage the currently-selected change, so Enter should do that, though I
certainly won't bikeshed it if there are good reasons not to do this.
Just felt like I had to dig a git to find this, and VSCode nudged me
toward a behavior that, in its default configuration, probably isn't
wise (at the very least, Smart Commit shouldn't default to also adding
untracked files.)

@isidorn isidorn added accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues scm General SCM compound issues labels Feb 18, 2020
@joaomoreno
Copy link
Member

joaomoreno commented Feb 19, 2020

The contextual actions in each row can also be focused by pressing Tab and then Enter to execute. The only thing that I see missing is the fact that the SCM view loses focus once that happens. I can push a fix for that.

Another thing I've decided to push is a Ctrl Shift Enter keybinding for lists which toggles the currently focused item from the selection. You could already kind of doing this with Shift Up/Down, but that would work only for consecutive elements. With Ctrl Enter, you can now select each item to be staged and then execute the action only once.

Peek 2020-02-19 09-37

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug tree-widget Tree widget issues labels Feb 19, 2020
@joaomoreno joaomoreno added this to the February 2020 milestone Feb 19, 2020
@isidorn
Copy link
Contributor Author

isidorn commented Feb 19, 2020

Thanks for pushing a fix for this. Just tried to verify it but the insiders from 5 mins ago does not contain the fix. Will try it tomorrow.

@jvesouza
Copy link

A problem I found is that using orca there is no return indicating that the file is selected or not when I press ctrl + shift + enter.
Perhaps this problem is related to the orca. I cannot test with another screen reader.

@isidorn
Copy link
Contributor Author

isidorn commented Feb 20, 2020

Adding verified label since this works as expected.
@jvesouza you are correct, this is missing. For this I have filed this issue #91061

@isidorn isidorn added the verified Verification succeeded label Feb 20, 2020
@jvesouza
Copy link

Another problem using orca is that when I browse the list, orca does not announce the selected items, if one is selected.

@isidorn
Copy link
Contributor Author

isidorn commented Feb 20, 2020

@jvesouza that sounds like an Orca issue. Can you maybe send a mail to the orca list and ask them the following:

  • VS Code sets the aria-selected: true and Orca does not announce that the item is selected. What is missing here?

@jvesouza
Copy link

@isidorn I'll check, thanks.
I found on more problem using orca:
Steps to reproduce:

  • In the list of changes use the arrows to choose a change.
  • Press the application key.
  • Choose an operation using the arrows.
  • Press the escape key.
  • Try to navigate in the list using the arrows.

On my machine the orca is muted and I need to press tab and shift + tab to get the orca to respond normally.

@isidorn
Copy link
Contributor Author

isidorn commented Feb 20, 2020

@jvesouza thanks, I can reproduce that. For that I filled a new issue #91085

@jvesouza
Copy link

jvesouza commented Feb 20, 2020 via email

@isidorn
Copy link
Contributor Author

isidorn commented Feb 20, 2020

Well the focus is left in the SCM view, it just jumps to the Tree container. Idealy the focus should be left in the same section of the view. @joaomoreno

@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues bug Issue identified by VS Code Team member as probable bug scm General SCM compound issues tree-widget Tree widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants