-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Support proposed DecorationProvider api on custom views #47502
Comments
Yes, plan is to make the
|
Hrm, showing decorations where ever a URI is seems like it could be very undesirable in many cases. If I have a custom view that I want to decorate items with (that represent files) and my decorations would now show everywhere they would now conflict with the scm/git decorations and vice versa. If that was still the desired behavior, it would be nice if the custom view (or custom view item) could opt-in (or out) of global decorations. Will there be a way to decorate custom tree items then (that would not affect anything outside a specific tree)? Maybe those decorations could be applied directly on the custom tree item itself (i.e. props or something provided to the TreeItem)? For example, I am definitely looking for ways of bolding, italicising, coloring, badging tree items for the CodeStream extension I am currently working on. |
I see there are two kinds of requests here from a custom view perspective.
First one looks sensible but there are no plans yet to support second one. |
I think so, but #1 is more nuanced imo. I honestly was more thinking about #1 as a way to get #2 -- use "custom" uris ( Maybe an alternative would be to add a way (property or something) on the custom view to opt-out of decorations if they wanted. |
This is a very needed feature for tree views that I'm creating. It places significant impediments on the readability of the data presented when there are lots of attributes. |
Adding to July as stretch item. |
Added support for resource based decorations in custom views. Decorations are shown automatically when a resource uri is provided and there are decorations for that resource. These can be controlled by user using the existing following settings explorer.decorations.colors
explorer.decorations.badges If the extension providing custom view does not want the decorations to be shown, then it should not provide resource uri. This is much analogous to theme icons derived from resources. Created a separate feature request #54938 to make decoration provider api public. |
Currently it looks like the DecorationProvider api, only applies to the explorer file tree. Can this be expanded to apply to custom view trees as well?
Maybe expand to include an optional viewId
The
DecorationProvider.provideDecoration
will also need to be updated to support TreeItem (or the item element itself?)Also while its probably not ideal, I did wonder if setting a
resourceUri
on a TreeItem would trigger the decoration, but it doesn't either./cc @sandy081
The text was updated successfully, but these errors were encountered: