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

explorer: fixed 'doOpenNode' implementation #8659

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Oct 21, 2020

What it does

Fixes: #8658

The following pull-request addresses the bug present in the explorer (navigator) when no selection is present, and the ENTER keybinding to open a node is triggered. Since the root node is not visible, the explorer ends up in a state where the tree is hidden producing a negative user-experience.

In order to fix the issue, the doOpenNode implementation for the FileNavigatorModel is updated to only attempt to open nodes which are not explicitly hidden since they cannot be opened.

master:

bug

pull-request:

pr

How to test

  1. start the application with a workspace folder opened (ex: theia)
  2. hide the additional tree-views (for instance npm scripts)
  3. clear the selection in the explorer (ex: using the collapse-all command or toolbar item)
  4. click the open area
  5. press ENTER (the tree nodes should not be hidden)
  6. using the keyboard ensure that ENTER on individual file nodes successfully open the editors
  7. verify that multi-root workspace still work correctly.

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

@vince-fugnitto vince-fugnitto added bug bugs found in the application navigator issues related to the navigator/explorer labels Oct 21, 2020
@vince-fugnitto vince-fugnitto self-assigned this Oct 21, 2020
The following commit fixes an issue with the `explorer` where the
workspace folder node is incorrectly opened (despite not being visible) causing
an issue where the explorer is empty.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto changed the title explorer: fixed 'openNode' implementation explorer: fixed 'doOpenNode' implementation Oct 22, 2020
Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested according to the steps described in How to test section:

  • tree nodes are not hidden in the explorer view at pressing Enter if no selection in the view
  • it's possible to expand and collapse a node using Enter when the node is selected

Works well for me!

Copy link
Contributor

@DucNgn DucNgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and confirm everything works well on my side 👍

@vince-fugnitto vince-fugnitto merged commit deccec6 into master Oct 26, 2020
@vince-fugnitto vince-fugnitto deleted the vf/nav-fix branch October 26, 2020 21:34
@github-actions github-actions bot added this to the 1.7.0 milestone Oct 26, 2020
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 navigator issues related to the navigator/explorer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigator allows users to collapse workspace node
3 participants