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

Expose the new tree widget provider to extensions #68806

Closed
kevindiclemente opened this issue Feb 15, 2019 · 3 comments
Closed

Expose the new tree widget provider to extensions #68806

kevindiclemente opened this issue Feb 15, 2019 · 3 comments
Assignees
Labels
tree-views Extension tree view issues

Comments

@kevindiclemente
Copy link

VScode just released a new tree widget with awesome features, like inline search and more. It would be great to have this feature set exposed to extension developers. see below for vscode release notes:

New tree widget
We have pushed our widget game to the next level: a new tree widget was created to address performance issues and enable us to provide more features in several workbench areas. The new tree widget was created through composition over our high-performance list widget. We intend to write a separate blog post about this engineering work and the performance improvements. For now, we'll focus on the features instead.

Note: The new tree was adopted in the File Explorer, all Debug trees, Search, and Peek References. The features described below apply to most of those UI areas, unless explicitly disabled by us.

Improved keyboard navigation

There are now three different types of keyboard navigation in trees: simple, highlight, and filter. In both highlight and filter, typing in a tree will display a widget (control) at the top of the tree, which indicates that you are now navigating the tree:

Keyboard navigation type filter

This widget can also be used to switch between the highlight and filter modes. You can configure a keybinding to execute the list.toggleFilterOnType command if you'd like a keyboard shortcut for switching between modes. The Workbench > List: Keyboard Navigation (workbench.list.keyboardNavigation) setting sets the default mode, including the simple mode in which typing the first few characters of a tree element simply focuses that element.

Users who have single letter keybindings for list/tree actions can still use this feature by making use of the listAutomaticKeyboardNavigation context key. For example, the VIM extension sets this context key to false to disable automatic keyboard navigation and adds a keybinding / to the list.toggleKeyboardNavigation command, so users can just type / and navigate the tree. Learn more about this in the VSCodeVIM pull request.

Theme authors can customize the widget's colors with the following new theme keys:

listFilterWidget.background
listFilterWidget.outline
listFilterWidget.noMatchesOutline
Note: These keyboard navigation modes currently only work on resolved tree nodes. For example, in the File Explorer, if a folder was never expanded, the tree won't look for its children. We are considering several options to make this experience better.

Hierarchical Select All

Pressing Ctrl+A (Cmd+A on macOS) in a tree will now expand the tree's selection in a hierarchical fashion.

Hierarchical select all

Customizable indentation

You can now customize the node indentation of all trees across the workbench using the Workbench > Tree: Indent (workbench.tree.indent) setting.

Expand/Collapse All

Holding the Alt key while expanding/collapsing tree nodes will now work recursively. Note that recursive expansion only works for nodes previously revealed in the tree. For example, the File Explorer will not automatically expand folders which were never expanded before by the user.

Horizontal scrolling

The Workbench > Tree: Horizontal Scrolling (workbench.tree.horizontalScrolling) setting now enables horizontal scrolling on more trees and lists, namely Explorer, Search, SCM, Debug, etc.

@vscodebot
Copy link

vscodebot bot commented Feb 15, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@allenoleksak
Copy link

As an extension developer. I agree. The current treeview also doesn't have drag/drop, or inline editing capabilities that the main treeview has. We would love those things as well.

@bpasero bpasero assigned sandy081 and unassigned bpasero Feb 18, 2019
@sandy081 sandy081 added the tree-views Extension tree view issues label Feb 18, 2019
@sandy081
Copy link
Member

Duplicate of #63566

@sandy081 sandy081 marked this as a duplicate of #63566 Feb 18, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tree-views Extension tree view issues
Projects
None yet
Development

No branches or pull requests

4 participants