-
Notifications
You must be signed in to change notification settings - Fork 30k
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 webview panels to provide a custom icon #48864
Comments
@mjbvz Since the title is provided dynamically in code, why not provide the icon there as well? |
Yeah, it's little weird to now start mixing declarative and symbolic information... @mjbvz why isn't this a property like the title? |
The declarative approach has a few advantages:
|
Fixes microsoft#48864 Adds a new top level `webview` contribution point. Use this new contribution point to contribute the declarative part of a webviews, such as icons
Fixes microsoft#48864 Adds a new top level `webview` contribution point. Use this new contribution point to contribute the declarative part of a webviews, such as icons
Discussion ended in agreeing to disagree. There is the declarative vs in-code approach, arguments for the declarative are listed above, concerns against it are: (1) it uses package.json/contributes in a new way, not describing parts of the UI before loading code, but augmenting parts of the UI after loading & executing code. (2) it won't be possible to use a |
Probably not the best idea (because of the extra work, etc), but maybe support both? Support the declarative as spec'd above, which will be the default unless overridden in-code, where more features ( |
I still think a static contribution is the correct design.
In fact, I believe that this would be required even if we did use
Two follow up ideas:
with {
"iconDefinitions": {
"_markdown_preview": { "iconPath": "..." }
},
"webviewPanels": {
"markdown.preview": "_markdown.preview"
}
} /cc @sandy081 |
I agree that web-view icon contribution is not a good fit into |
Any update on this? |
Allows webviews to provide icons used in UI. Adds a new `WebviewPanel.iconPath` property for this. Replaces the static contribution approach from microsoft#49657 Fixes microsoft#48864
Allow webview panels to set an icon. This should probably be done declaratively in the
package.json
, something like:/cc @jrieken
The text was updated successfully, but these errors were encountered: