-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Implement contributable tree views #26948
Comments
Awesome! Look forward to this API! 😃 |
I played around with the API and here is some feedback:
|
@bpasero Thanks for the feedback.
|
I just like the symmetry between contributing a
That is fine, I am more concerned about the name clash with the text document provider. If all providers have the same event
Instead of introducing a new concept with |
Another thing that might come up is being able to change the view label dynamically. For example for the ftp explorer I could maybe show the currently connected host in there. |
I am having an idea to expose Views as an API just like other objects (editors, extensions, documents) and have some methods to control the view. This would be next step. |
I have a very similar use case - I want to implement a tree view that shows a few folders (of dependencies) outside of the current workspace. That means tree view items should otherwise behave exactly like those in the existing file explorer. They should:
Maybe this could be tied to the planned |
@bpasero FYI Implemented remembering the view collapsible state and size. |
Implement Git History Explorer (used to view commit history and view diff in each commit) real quick. My 2 cents:
Tiny issues
cc @joaomoreno you might be interested in this tiny stuff. |
@rebornix First of all thanks for the feedback. Very much appreciated.
Yes there is no support for Paging and I thought about it. I think we need paging support in internal Tree API too.
Actions on View/Title and View/Item are supported. Its my bad that I did not document them well. I will update the API doc explaining how to contribute actions with examples. Please see the description for how to contribute menu actions to view and view items. Context value should be used for
Right, I will see why it is not working
Fixed these yesterday and should work in today's builds |
Nice! I put together a quick integration into cquery here. Some thoughts:
|
@jacobdufault Thanks for the feedback
This is good one. Added a new entry called
You can contribute commands only to those items you want to. These commands gets called when an user selects an item. This should be true with mouse and keyboard. (Will check if it is not working with keyboard).
Tree commands are triggered by the platform and it only knows the node the command belongs to. Hence only the item model is passed as an argument.
Yes, there is a plan to reuse file based icons provided that item gives a file uri. Will think about the other icons too. |
Ignore my previous comment regarding this. I am mistaken. Yes this is a bug which will be fixed here #27535 |
Is there a plan to provide virtualization support for this tree views? I would love to connect this to trees that may have 100k+ nodes or even 1million nodes under a single folder. It would be nice to be able to load more items on demand using either ranges (e.g. give me items 101 to 200) and/or using continuation tokens to get the next page when needed. |
@alvarorahul It is paging support and mentioned in the list in the description. There are no plans as of now. |
Closing this and further improvements will be tracked under #27823 |
Implement contributed views those can be shown in Explorer as trees.
Actions can be contributed to the following locations by giving proper
when
clauseview/title
view/item/context
Example:
More
Deferred
The text was updated successfully, but these errors were encountered: