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

Consider expanding explorer level on clicking the node text #1993

Open
bruno-f-cruz opened this issue Sep 4, 2024 · 6 comments · May be fixed by #1870
Open

Consider expanding explorer level on clicking the node text #1993

bruno-f-cruz opened this issue Sep 4, 2024 · 6 comments · May be fixed by #1870
Labels
proposal Request for a new feature
Milestone

Comments

@bruno-f-cruz
Copy link
Contributor

The tree can be expanded by clicking the '+'. This is ok but it tends to be a bit hard given the small size of the button. It would be interesting to prototype an interaction where the menu would expand after the group is selected instead of having to click on the plus sign

@glopesdev glopesdev added the proposal Request for a new feature label Sep 5, 2024
@glopesdev glopesdev added this to the 2.9 milestone Sep 5, 2024
@glopesdev
Copy link
Member

@bruno-f-cruz This makes sense. Just trying to decide whether to toggle expansion on single-click or double-click. VS seems to do it on double-click, while VS Code does it on single-click, so both might appeal to a broader base of people.

@glopesdev glopesdev changed the title [2.9-preview1] Consider expanding explorer level on selection Consider expanding explorer level on clicking the node text Sep 5, 2024
@bruno-f-cruz
Copy link
Contributor Author

My preference is towards a single click as it feels like there might be other stuff we might want to use the double for (e.g. opening workflow, separate window, etc...) and I can't think of a good example for the single click that is inconsistent with the expansion of the level(maybe you can?).

@bruno-f-cruz
Copy link
Contributor Author

Relatedly, when navigating with arrows keys i am also not able to select a current level using the keyboard.

@glopesdev
Copy link
Member

glopesdev commented Sep 7, 2024

My preference is towards a single click as it feels like there might be other stuff we might want to use the double for (e.g. opening workflow, separate window, etc...)

You are right that we are already using the node double-click for a very important function, which is navigating to the selected level. This actually raises the slightly awkward point that if we use single-click to toggle expansion you will always toggle expansion just before you navigate to a level (on the first click of the double-click), which is not very pleasant.

One alternative is to always select the level on single-click, and toggle on double-click, but also not entirely satisfying. It seems better to figure out a separate alternative for these actions. With the keyboard we can make it unambiguous, since left-right arrows already expand and collapse, and we can use the return key for navigation.

@glopesdev
Copy link
Member

glopesdev commented Sep 7, 2024

Other options include using a modifier, such as Ctrl+Click to navigate, but then it feels like we might as well just press Enter.

This is not an issue in VS code only because the "folders" are not navigated into, just "files", so it's fine to have a single click to expand.

The best metaphor for us might really be the file explorer, where folders are expanded by +/- and left/right keys and navigated into by a single click and return key respectively (or a double-click like it is now).

@PathogenDavid
Copy link
Member

if we use single-click to toggle expansion you will always toggle expansion just before you navigate to a level (on the first click of the double-click)

For some reason I thought there was a way to opt-in to single clicks being delayed until it's definitely not a double-click, but I must be misremembering (or maybe that's a web thing.) However I did find this which seems like a good philosophy on handling the difference:

Until you get the double-click message, there is no way to tell that the first mouse click is the start of a double click. Therefore, a double-click action should continue an action that begins with the first mouse click. For example, in the Windows Shell, a single click selects a folder, while a double click opens the folder.


It's worth noting the toolbox also has this issue and hasn't been a source of complaints AFAIK. The active area of expansion buttons is actually quite a bit bigger than they are visually, so this might be a case of overthinking a new feature.

An alternative might be to adopt the more modern chevron-style tree views. Visually-speaking, the chevrons are bigger than the old-school +/- buttons. They also lack any border making misleading implications of their exact size.

Winforms doesn't have them built in, but they're pretty easy to activate manually.

Screenshot of two tree views comparing the old-style and new-style expansion buttons.

@glopesdev glopesdev linked a pull request Sep 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants