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

New Repository Dropdown Order option that follows the order of multi-root workspace folder #479

Closed
jsg2021 opened this issue Mar 12, 2021 · 6 comments
Assignees
Labels
improvement An improvement to existing functionality
Milestone

Comments

@jsg2021
Copy link

jsg2021 commented Mar 12, 2021

I have a large multi-root workspace. I frequently interact with the select box to switch between. It would be nice to make it more keyboard friendly such as:

  • auto focus input on open
  • arrow select/enter confirm
  • sort options to match explorer
@jsg2021 jsg2021 added the feature request Feature request label Mar 12, 2021
@mhutchie
Copy link
Owner

mhutchie commented Mar 12, 2021

Hi @jsg2021,

Thanks for raising this feature request!

  • auto focus input on open

Unfortunately this is not feasible to do. Quite a number of users requested that the table of commits be focused on initial load, as it allows them to easily scroll through the commits using keyboard shortcuts (up/down arrows, home/end, page up/down). Also, the portion of users with many repositories in their workspace is definitely the minority, so always focusing on the Repo Dropdown (only visible when multiple repositories exist) on load would only benefit a smaller portion of users, and be a detriment to everyone else.

  • arrow select/enter confirm

This is definitely something I want to implement (and have been meaning to for some time). Originally neither the dropdowns (used for the Repo and Branches Dropdowns on the Git Graph View Control Bar), or the select inputs on dialogs, supported keyboard navigation. Last year I updated the select input implementation on dialogs to be keyboard friendly - I definitely want to update the dropdown implementation to match!

  • sort options to match explorer

The extension setting Repository Dropdown Order, allows the users to customise their preferred order for the Repo Dropdown. There are two options, either sorting by the full path of the repository (which should match the Visual Studio Code Explorer View), or sorting just by the name of the repository. Would you please provide an example where the dropdown's order differs from the explorer, so I can work out why they aren't matching? (what value have you set for explorer.sortOrder)

Edit: I just experimented with this, and in multi-root workspaces the order of the roots can be set by the user (not necessarily the alphabetical order of full file paths). I'll work out how to support this as a new option for Repository Dropdown Order, and make it the default.

@mhutchie mhutchie added improvement An improvement to existing functionality and removed feature request Feature request labels Mar 12, 2021
@jsg2021
Copy link
Author

jsg2021 commented Mar 12, 2021

Hi @jsg2021,

Thanks for raising this feature request!

  • auto focus input on open

Unfortunately this is not feasible to do. Quite a number of users requested that the table of commits be focused on initial load, as it allows them to easily scroll through the commits using keyboard shortcuts (up/down arrows, home/end, page up/down). Also, the portion of users with many repositories in their workspace is definitely the minority, so always focusing on the Repo Dropdown (only visible when multiple repositories exist) on load would only benefit a smaller portion of users, and be a detriment to everyone else.

I'm sorry, I jotted the idea down incompletely. I meant to auto focus the input on opening the drop down not the main view. 😊

  • arrow select/enter confirm

This is definitely something I want to implement (and have been meaning to for some time). Originally neither the dropdowns (used for the Repo and Branches Dropdowns on the Git Graph View Control Bar), or the select inputs on dialogs, supported keyboard navigation. Last year I updated the select input implementation on dialogs to be keyboard friendly - I definitely want to update the dropdown implementation to match!

awesome 😊

  • sort options to match explorer

The extension setting Repository Dropdown Order, allows the users to customise their preferred order for the Repo Dropdown. There are two options, either sorting by the full path of the repository (which should match the Visual Studio Code Explorer View), or sorting just by the name of the repository. Would you please provide an example where the dropdown's order differs from the explorer, so I can work out why they aren't matching? (what value have you set for explorer.sortOrder)

I believe it's the default value. I will confirm in the morning. I believe it's sorting by full path.

With multi root workspaces you can order your projects how ever you want. Having an option to mirror that order would be nice. Most of mine are alphabetical. However I keep a few hot spots at the top.

@mhutchie
Copy link
Owner

Your first point is definitely something I'd like to do, thanks for the clarification!

I just experimented with your third point before your comment came through, and in multi-root workspaces the order of the roots can be set by the user (not necessarily the alphabetical order of full file paths) - as you also now mentioned. I'll work out how to support this as a new option for Repository Dropdown Order, and make it the default. I wasn't aware of this nuance in Visual Studio Code's ordering 😄 .

@jsg2021
Copy link
Author

jsg2021 commented Mar 12, 2021

thank you 😊

@mhutchie mhutchie added this to the v1.30.0 milestone Mar 14, 2021
mhutchie added a commit that referenced this issue Mar 14, 2021
… sorts repositories according to the workspace folder order, then alphabetically by the full path of the repository. This is the new default order.
@mhutchie mhutchie changed the title Improve workspace selector New Repository Dropdown Order option that follows the order of multi-root workspace folder Mar 14, 2021
@mhutchie
Copy link
Owner

mhutchie commented Mar 14, 2021

I've decided to split this improvement request into two, so they can be delivered independently. This improvement request now only refers to (1).

  1. New Repository Dropdown Order option that follows the order of multi-root workspace folder (the new default order) - you're third point.
  2. Allow Repository & Branches Dropdown's to be navigated via keyboard - you're first & second points. This is now tracked in Allow Repository & Branches Dropdown's to be navigated via keyboard #484.

This will be available in v1.30.0.

If you'd like to use it before the next release, you can download v1.30.0-beta.2, and install it following the instructions provided here.

@jsg2021
Copy link
Author

jsg2021 commented Mar 14, 2021

This is awesome 😊 thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants