-
Notifications
You must be signed in to change notification settings - Fork 27.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
Allow product icon themes to override icons defined in contribute
entries of an extension
#211811
Comments
If an extension want's that their icon(s) is/are themable, it should not use a SVG but a product icon:
Extensions can define new product icons with the icon contribution point
With that, any product icon can define a customized bookmark icon by defining a new icon for |
Yes, the request was understood perfectly, so we're on the same line.
Yes, this of course will always be the case so there's no problem here. Indeed the solution proposed in your comment is (and should be) the solution to the described problem. I made the assumption that VSCode's contribution point API was not capable of this, so you've cleared that up. From this point onwards it's clearly the responsibility of extension authors (or those who provide pull requests) to change the hardcoded icons to product icons. I could probably argue to deprecate providing a hardcoded icon in the contribution API but I think nobody is waiting on that. Perhaps updating the documentation on the contribution point API page to show/encourage using newly defined product icons would be a good idea though. I don't need any further information and an acceptable solution is already possible. If no further discussion is warranted, the issue can be closed. |
Thanks for reply and feedback. You are right, it would be reasonable to deprecate SVG icons, they have other limitations too (e.g. we can't easily change the color). We haven't done that (yet) as contributing a icon is not that trivial as a font need to be created. Closing the issue then |
Extensions can add
contributes
entries of which some accept custom icons. For example, take the vscode-bookmarks extensions, which defines a contribution endpoint forviewsContainers
in itspackage.json
:This adds an entry to the activity bar with a provided custom icon to access the view. However, this icon cannot be overridden by a product icon theme.
Since product icon themes can provide new icons for the built-in codicons, of which icons are used for the 'standard' activity bar items, an extension's activity bar icon could be overridden to match the theme's style.
This use-case applies to all of the following, which allow an extension author to define custom icons:
Food for thought is how to define the entrypoints for icons. I was thinking along the lines of adding a new key(s) to a product icon definition file
"commands"
,"languages"
,"views"
,"viewsContainers"
. But then how would one reliably set the icons? Use extension ID in combination with the ID defined in one of those contribution entrypoints?Would love to hear input from the VSCode team, and if if this use-case would be considered an in-scope issue,
The text was updated successfully, but these errors were encountered: