-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 to use codicon in menu-contributions #84695
Comments
Related: Support to allow re-using VSCode icons in user extensions #31466 |
Related: allow codicon use in tree view contributions. |
I'm going to use this issue as the umbrella issue for the 2 other related ones: #85579 & #85624. Here is backstory on my thinking and approach here for all 3 issues. First, I wanted to ensure a somewhat unified experience across menus, hovers, and views. I would have also liked it to be consistent with quickpicks and statusbar items, but because of the needs/requirements I didn't feel that was possible. Quickpicks and statusbar items use Given the hover learnings/requirements, I opted to use the same uri style for both menus and views as well. Which has very similar benefits to the hover case, explicit intent, minimal perf imact, and tiny code surface area. At the same time, I did think about having something like Also for menus, I also thought about just having /cc @aeschli |
@eamodio Thanks for the great writeup.
|
@aeschli 👍 I don't have really have a strong preference for either url formats: @jrieken Do you have a preference? |
Talked over this with @aeschli this morning and we came up with the slightly different proposal which builds on the existing
Internally, we should only have one type and that should be uri, e.g an ThemeIcon will be translated into |
I'm in agreement with all of that, except for the Could we use |
+1 on using $() syntax to reference icons. The simplicity of it is so appealing. But of course, we need ways to escape for exceptions. |
We should be supporting backslash to escape codicons - that's something we needed for messages already. So |
Can't wait to adopt this in stable build. |
`appendMarkdown` is now the only way to use ThemeIcons
@chrmarti I have added you because quickpick.buttons = [
vscode.QuickInputButtons.Back,
{ iconPath: vscode.ThemeIcon.File },
{ iconPath: vscode.ThemeIcon.Folder },
{ iconPath: new vscode.ThemeIcon('zap') }
]; |
Yeah - it also supports the spin, e.g |
That's exactly what I want 😆 ---- support spinning in the treeview. In some cases, like Test Explorer, I want to show the status of |
Hm... You should get a loading icon in tree by default, e.g when the promise that is returned from |
Yes, but I think that does not apply to the leaf node, right? 😄 |
Adding @alexr00 but I think it applies for all nodes, the twisty should turn into a spinning circle when fetching children is taking its time |
Since leaf nodes have no children, we don't have a way built into the tree to show a progress spinner on them. |
@jdneo well, maybe in your case in does make sense to use spinning codicons in the tree then... |
@jrieken It would be great if spinning codicons can be used in the tree. Cannot wait for it. 👍 |
From a different discussion
@akaroml
idea: add new URI scheme likevscode-icon://codicon/flat-list
with which this becomes possible.idea: allow the
$(name)
syntax in more places, e.g in json"icon": "$(zap)"
and in markdownHello *World* $(zap)
.The text was updated successfully, but these errors were encountered: