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

Space bar is not obvious in multi-select quick pick #1005

Closed
ejizba opened this issue Jun 18, 2019 · 8 comments · Fixed by microsoft/vscode-azuretools#523
Closed

Space bar is not obvious in multi-select quick pick #1005

ejizba opened this issue Jun 18, 2019 · 8 comments · Fixed by microsoft/vscode-azuretools#523
Milestone

Comments

@ejizba
Copy link
Contributor

ejizba commented Jun 18, 2019

I'm trying 0.6.3-alpha from https://dev.azure.com/ms-azuretools/AzCode/_build/results?buildId=6664 on Win10 with VSC:

Since Docker previously had the option for "All Containers", I wanted to maintain and improve on that functionality. Now you will see a multi-select quick pick:

I don't know if this is the desired behaviour, but I found myself trying it multiple times until I guessed it:

  • F1
  • Docke Cont Start
  • Enter
  • ArrowDown
  • Enter

Nothing happens. Due to the checkbox, the last 'Enter' has no effect, although I 'selected' a container with the arrow key. For it to work, I need to press 'Space' before the last 'Enter'. This will select the container.

I'd say that requiring to press 'space' is unnecessary when the users want to start/stop/whatever a single container.

Note that this does not apply if you do some of the steps with the mouse, because clicking on a container will select it only.

Originally posted by @1138-4eb in #966 (comment)

@ejizba
Copy link
Contributor Author

ejizba commented Jun 18, 2019

A simple fix might be to provide text similar to what exists for input boxes, except for "Space" and "Enter" instead of "Escape" and "Enter"
Screen Shot 2019-06-18 at 10 17 59 AM

@eine
Copy link

eine commented Jun 18, 2019

@EricJizbaMSFT thanks for splitting it!

I don't know if the implementation allows to read the 'active' item in the list when 'Enter' is pressed. If possible, I believe it should be implemented without further note. Or, the note could say 'Press 'Enter' to confirm, 'Space' to select or 'Escape' to cancel.

If it is not possible to retrieve the position of the cursor/selector, then the note you suggested will be helpful.

@ejizba
Copy link
Contributor Author

ejizba commented Jun 18, 2019

@1138-4eb it's not possible to fix directly in our extension. We would have to file an issue on VS Code itself

@eine
Copy link

eine commented Jun 18, 2019

@1138-4eb it's not possible to fix directly in our extension. We would have to file an issue on VS Code itself

Since I now know how it works, I don't need the fix (I always have a thumb on the spacebar). This issue is just to improve the UX for future users. Hence, I'm ok if this is handled through VSC and it takes longer because of that.

The point is, do you think it is worth opening an issue about this? Are there other extensions/features that would benefit from it? I'm asking it from absolute ignorance, since I don't know the details of the API.

@ejizba
Copy link
Contributor Author

ejizba commented Jun 18, 2019

I wholeheartedly agree it's confusing at first, but I'm just not sure what they could do to solve this. And like you - my problems went away as soon as I figured out how the space bar interacted with this.

For example, you suggested using the currently selected container as the result when you press enter, but that leads to confusion in situations like this:
Screen Shot 2019-06-18 at 2 32 43 PM
"FullTag" is selected, but not checked. IMO that means it shouldn't be included in the results when you press enter.

Also, an empty array is a completely valid response. For example in the above screenshot, those items were checked by default when I went to change the "Description" property of the containers view (You can get to that menu by hitting the gear icon at the top of the containers view from the latest on master). Maybe I want to "uncheck" the defaults and hit enter to have no description at all. However I don't think you can get no description if it always uses the selected pick.

@eine
Copy link

eine commented Jun 18, 2019

As said, I don't know the API, but I imagine that it actually returns a list of selected elements. My proposal was for it to return the list of selected elements and the active element (-1 meaning 'no active element', i.e. textbox above). Hence, it'd be possible to:

if list != Empty:
  do whatever with non-empty list
elsif active != -1:
  do whatever with empty list and active item
else
 do whatever with empty list and non-active item

Then, depending on the specific context, the 'active' value might be relevant or it might be ignored. In the example that motivated this issue, I believe it is useful. So we can assume that it can be useful in menus where you are expected to apply the same action to a single item or a group of items (it's just a shortcut to avoid repeating the same action multiple times). However, on the last example, it seems not to be useful; a configuration list is being displayed, so the list will be saved straightaway, ignoring the psudocode I wrote above.

@ejizba
Copy link
Contributor Author

ejizba commented Jun 18, 2019

@1138-4eb I see how your suggestion reduces the number of keystrokes, but it also feels confusing if sometimes we use the active element and sometimes we don't. For that reason - I probably won't file an issue on VS Code, but you're welcome to advocate your case in that repo.

In terms of this extension - would you like a setting to turn off the "multi-select" mode so that you can select a single container with the enter button?

@eine
Copy link

eine commented Jun 18, 2019

For that reason - I probably won't file an issue on VS Code, but you're welcome to advocate your case in that repo.

It's ok. I perfectly understand it.

In terms of this extension - would you like a setting to turn off the "multi-select" mode so that you can select a single container with the enter button?

I believe that multi-select is useful in other situations. I think it is a great enhancement overall. So, no, I don't think it is necessary to make it optional.

If you can change the message to Press 'Space' to select and 'Enter' to confirm, that'd be great, since it applies to both use cases (single selection or multiple). If the change is not possible, because you can only modify the keys, and not the sentence, I believe a note in the 'Details' (README) will suffice. Maybe in section Docker commands, replacing the image with those in #966.

@ejizba ejizba added this to the 0.7.0 milestone Jun 18, 2019
ejizba added a commit to microsoft/vscode-azuretools that referenced this issue Jun 21, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants