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

[tree] RETURN should not expand nodes #1142

Closed
JanKoehnlein opened this issue Jan 26, 2018 · 10 comments
Closed

[tree] RETURN should not expand nodes #1142

JanKoehnlein opened this issue Jan 26, 2018 · 10 comments
Labels
bug bugs found in the application tree issues related to the tree (ex: tree widget)

Comments

@JanKoehnlein
Copy link
Contributor

RETURN should not expand a node, at least if they are openable.
This yields to strange behavior in the call hierarchy: When you hit RETURN on a node, the respective call gets highlighted in the editor, the editor grabs the focus and the node is expanded. The latter feels odd. To expand a node using the keyboard you can still use left-arrow.

@JanKoehnlein JanKoehnlein self-assigned this Jan 26, 2018
@epatpol
Copy link
Contributor

epatpol commented Mar 13, 2018

@JanKoehnlein This seems to work now no? Should we close it?

@JanKoehnlein
Copy link
Contributor Author

@epatpol it has been locally fixed for call hierarchy, but not for trees in general, e.g. the navigator.

@vince-fugnitto
Copy link
Member

I believe this issue should be closed.
We have the same behavior as VSCode, tree nodes can be collapsed/expanded using ENTER

@JanKoehnlein
Copy link
Contributor Author

Checking with VSCode again, in the explorer RETURN on a node triggers rename and doesn't expand.

@vince-fugnitto
Copy link
Member

I tested against the latest vscode (I also don't have any custom keybindings):

Peek 2019-08-13 11-11

@JanKoehnlein
Copy link
Contributor Author

Also latest VSCode, but on a MacBook, German keyboard. There is no additional ENTER key as on Windows, just RETURN: RETURN triggers rename.

@vince-fugnitto
Copy link
Member

@JanKoehnlein I initially tested on Linux. I re-tested using Mac and I see that ENTER triggers a rename in the navigator. The fix then is thus likely to be OS-dependent.

@vrubezhny
Copy link
Contributor

@JanKoehnlein Does it mean that we have wrong behaviour in Class Hierarchy and Type Hierarchy Dialogs then?

@vince-fugnitto
Copy link
Member

@JanKoehnlein I believe that in general ENTER should expand/collapse nodes, and only if some other functionality is required (ex: 'explorer' with the rename) should the individual tree override the default behavior. In the case of 'class hierarchy' and 'type hierarchy' the ENTER was problematic and thus was updated to not expand/collapse nodes. In most cases ENTER to expand/collapse aligns with VSCode, but we can take a look at individual cases to see which trees should not be expanded/collapsed with it.

@JanKoehnlein
Copy link
Contributor Author

Our problem is that we want to mimic VSCode behavior as close as possible while VSCode behaves differently on different OSs. Keybindings seem to be particularly problematic, as it is even hard to detect the keyboard when running in the browser.

I'd vote for keeping it simple and just put the same default behavior for all OSs and runtime scenarios (electron and browser), e.g. as you describe it. I cannot foresee whether that will bring us trouble in the long run, e.g. when running 3rd party VS Code extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application tree issues related to the tree (ex: tree widget)
Projects
None yet
Development

No branches or pull requests

5 participants