You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can register a command for selection changes and menus, but I don't see a way to register a command for the "open" mouse gesture (usually double-click). That would make sense to have.
Is it possible to obtain the default vscode icons for the iconPath? I would prefer to be able to delegate the iconPath to the default icons instead of specifying one myself.
I don't know if I'm missing something, but I didn't find a way to have direct access to the TreeItems, after they are created/provided using getChildren and getITreeItem.
I mean, let's suppose I need to add/remove a level 0 node. Instead of simply push/splice another TreeItem in the TreeDataSomething, I have to call onDidChangeTreeData(null) event and reload the entire tree. Similarly, if I need to *add/remove/rename a non level 0 node, I have to had backups of the TreeItem previously provided, search for them when I need to update their children, and to call onDidChangeTreeData(foundTreeItemNode) to update only their children.'
As I said, I don't know if I'm missing something. But if I am, could you please point me in the right direction? Otherwise, I thing that you could expand the API to scenarios like this.
Alessandro Fragnani (@alefragnani) Yes, It is PULL instead of PUSH. It is designed to register a data provider where the core can ask for data (similar to other providers in API). Regarding triggering changes, you do not need to have the back up of TreeItem but element of type T. If you do no want to store, you can always provide element of type string which you can resolve uniquely from your data model.
Sandeep Somavarapu (@sandy081), I understand (and agree) the decision to use a PULL design, but I expected to have a bit more APIs to access/look for the data already provided. Still, I also understand that this API is in early stages, just recently published, and the current issue exists for the exact purpose to enhance it 😄 .
I ended up adding a reference to my model inside the TreeItem, so I can look for it when the update events are triggered, by the model. The backup was limited only for the Level 0 nodes, because they are re-created only if I call onDidChangeTreeData with null as parameter.
I would like suggest a few enhancements:
Built-in commands to expand and collapse, located in the tree's title (like the one that already exists in explorer/find trees)
Built-in property/event to display a notification counter in the tree's title (like the Extension's panel)
Add an Secondary Command to TreeItem, which should be executed if you Ctrl + Click the node
Add an Secondary Command to TreeItem, which should be executed if you Double Click the node
Add a Hint to TreeItem
Thanks
Reacted by Shen Z, TZ | 天猪, Mike Lischke and Yukai Huang
Provide an API to add a dynamic "secondary" name to a view
For example -- something like GitLens -- branches where GitLens is the name of the view, the -- is a vscode controlled separator (or unneeded if the styling or weight is different between the name and secondary name), and branches is a dynamic additional name for a view to provide more context
Support the navigation group for TreeItems -- so that they can have toolbar buttons (like search and source control viewlets)
Provide a way to set a decoration on a TreeItem -- like strike-through, etc
Provide a secondary icon (on the right) similar to the source control viewlet
Provide a way to support double-height TreeItems (similar to the way you can in the quickpicks)
I'm assuming that adding a Hint to TreeItem is about customizing the tooltip of a TreeItem -- if so 👍 otherwise, I would like to be able to customize the tooltip of a TreeItem 😄
Thanks for the consideration!
Reacted by TZ | 天猪, Mike Lischke, Yukai Huang and Jie Shen
I suggest to add #33371, #30535, and #39340 to the list and give them high priority.
Without those fixes all the other other items are only "nice to haves".
Reacted by Sandeep Somavarapu, Holger Benl, Mike Lischke and Yukai Huang
Does the ' Ability to update the view label' concern tree items? I'm currently looking at a way to update the Tree-Item label without having to fire refresh (to preserve the state of the Tree-Item's children). For example, this issue in the vscode-cosmosdb would be easily solved if this functionality was provided. :-)
I also have a number of things I'd like to see in a tree. Here's a list of items I mentioned already in #28338.
Not just a single icon per tree, but one for each node (just like the file tree has).
Colors for text; markdown support would be awesome.
Tooltips/hovers per node.
Read and set selection status (for multiple nodes) programmatically.
Check box support is also a pretty common requirement.
Multi column support! This content:
would then show much nicer. All the individual values nicely aligned.
Support docking, so that views can be spread accross all the available space. Currently I have 10 views stacked vertically. Even on a 4K screen this is all but easy to consume.
Reacted by Eric Amodio, Dakara and Julien Roncaglia
Support docking, so that views can be spread accross all the available space. Currently I have 10 views stacked vertically. Even on a 4K screen this is all but easy to consume.
There is another issue I don't see referenced here that I believe is same or related #41686
Closing this item as mentioned items in the description are done. I would request to create a separate issue for each of your feature requests or bugs as it is becoming very difficult to track in a single item. Thanks for understanding.
Sandeep Somavarapu (@sandy081) I don't consider it as appropriated action on this issue to simply close it and have everyone do their own issue filing. It's a pretty nice collection of FRs all revolving around the same element and the issue itself started out as a collection of ideas/wishes. Usually I also prefer to separate issues, as it's just better to solve each of them. But this issue is more about development of a core element that needs consolidation of the individual requests. Of course each FR then has to go into its own Github issue, but a central collection/discussion issue is pretty useful too.
Mike Lischke (@mike-lischke) The pain point here is that these feature requests are spread across multiple comments and its very hard to track them and to prioritise.
You are right that this issue was created initially to capture improvements to be done to custom views. But they are scoped to those listed in the summary. This could get easily side tracked by multiple feature requests in multiple comments. They are so important that I do not want to miss them.
Hence, I asked to create an issue per feature request. Hope it makes sense.
Activity
chrmarti commentedon Jun 5, 2017
I can register a command for selection changes and menus, but I don't see a way to register a command for the "open" mouse gesture (usually double-click). That would make sense to have.
#27823 Implement view visibility using when context key expression
#27823
#27823 Fix tests
Thaina commentedon Jun 16, 2017
One of my case is cloudant design database. It is a json that contains javascript string
What is a plan if I want to make a tree of json and show js icon for a child that is javascript string?
#27823 Prepare views to suppor toggling
#27823 Fix size is not updated when header is toggled
#27823 Prepare toggling views
#27823 Use view state of toggling opening editors view
atian25 commentedon Jun 20, 2017
https://github.com/Microsoft/vscode-extension-samples/blob/master/tree-view-sample/USAGE.md is outdated.
4 remaining items
Chillee commentedon Jul 14, 2017
Is it possible to obtain the default vscode icons for the iconPath? I would prefer to be able to delegate the iconPath to the default icons instead of specifying one myself.
Ah nvm I see it was mentioned here: #26948 (comment)
alefragnani commentedon Aug 27, 2017
Hi Sandeep Somavarapu (@sandy081) ,
I don't know if I'm missing something, but I didn't find a way to have direct access to the
TreeItems, after they are created/provided usinggetChildrenandgetITreeItem.I mean, let's suppose I need to add/remove a level 0 node. Instead of simply
push/spliceanotherTreeItemin theTreeDataSomething, I have to callonDidChangeTreeData(null)event and reload the entire tree. Similarly, if I need to *add/remove/rename a non level 0 node, I have to had backups of theTreeItempreviously provided, search for them when I need to update their children, and to callonDidChangeTreeData(foundTreeItemNode)to update only their children.'As I said, I don't know if I'm missing something. But if I am, could you please point me in the right direction? Otherwise, I thing that you could expand the API to scenarios like this.
Thanks for your help
sandy081 commentedon Aug 28, 2017
Alessandro Fragnani (@alefragnani) Yes, It is PULL instead of PUSH. It is designed to register a data provider where the core can ask for data (similar to other providers in API). Regarding triggering changes, you do not need to have the back up of
TreeItembut element of typeT. If you do no want to store, you can always provide element of typestringwhich you can resolve uniquely from your data model.alefragnani commentedon Aug 30, 2017
Sandeep Somavarapu (@sandy081), I understand (and agree) the decision to use a PULL design, but I expected to have a bit more APIs to access/look for the data already provided. Still, I also understand that this API is in early stages, just recently published, and the current issue exists for the exact purpose to enhance it 😄 .
I ended up adding a reference to my model inside the
TreeItem, so I can look for it when the update events are triggered, by the model. Thebackupwas limited only for theLevel 0nodes, because they are re-created only if I callonDidChangeTreeDatawithnullas parameter.I would like suggest a few enhancements:
expandandcollapse, located in the tree's title (like the one that already exists in explorer/find trees)notification counterin the tree's title (like the Extension's panel)Secondary CommandtoTreeItem, which should be executed if youCtrl + Clickthe nodeSecondary CommandtoTreeItem, which should be executed if youDouble Clickthe nodeHinttoTreeItemThanks
eamodio commentedon Aug 30, 2017
I would add a few more to that list:
navigationgroup forTreeItems -- so that they can have toolbar buttons (like search and source control viewlets)TreeItem-- like strike-through, etcTreeItems (similar to the way you can in the quickpicks)I'm assuming that adding a
HinttoTreeItemis about customizing the tooltip of aTreeItem-- if so 👍 otherwise, I would like to be able to customize the tooltip of aTreeItem😄Thanks for the consideration!
weinand commentedon Nov 29, 2017
I suggest to add #33371, #30535, and #39340 to the list and give them high priority.
Without those fixes all the other other items are only "nice to haves".
PrashanthCorp commentedon Dec 12, 2017
Does the ' Ability to update the view label' concern tree items? I'm currently looking at a way to update the Tree-Item label without having to fire refresh (to preserve the state of the Tree-Item's children). For example, this issue in the vscode-cosmosdb would be easily solved if this functionality was provided. :-)
weinand commentedon Dec 12, 2017
Another high priority item is #40018
mike-lischke commentedon Feb 6, 2018
I also have a number of things I'd like to see in a tree. Here's a list of items I mentioned already in #28338.
would then show much nicer. All the individual values nicely aligned.
d-akara commentedon Feb 6, 2018
Mike Lischke (@mike-lischke)
In regards to
There is another issue I don't see referenced here that I believe is same or related #41686
sandy081 commentedon Feb 14, 2018
Closing this item as mentioned items in the description are done. I would request to create a separate issue for each of your feature requests or bugs as it is becoming very difficult to track in a single item. Thanks for understanding.
mike-lischke commentedon Feb 14, 2018
Sandeep Somavarapu (@sandy081) I don't consider it as appropriated action on this issue to simply close it and have everyone do their own issue filing. It's a pretty nice collection of FRs all revolving around the same element and the issue itself started out as a collection of ideas/wishes. Usually I also prefer to separate issues, as it's just better to solve each of them. But this issue is more about development of a core element that needs consolidation of the individual requests. Of course each FR then has to go into its own Github issue, but a central collection/discussion issue is pretty useful too.
sandy081 commentedon Feb 14, 2018
Mike Lischke (@mike-lischke) The pain point here is that these feature requests are spread across multiple comments and its very hard to track them and to prioritise.
You are right that this issue was created initially to capture improvements to be done to custom views. But they are scoped to those listed in the summary. This could get easily side tracked by multiple feature requests in multiple comments. They are so important that I do not want to miss them.
Hence, I asked to create an issue per feature request. Hope it makes sense.