-
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
Multi Diff Editor menus: Submenu icon not rendered #203792
Comments
Can you look into why this happens? |
I will give it a try. |
Since I'm not familiar with either TypeScript or the vscode structure, I don't have a fix, only some random findings. Inspecting the 2 HTML elements (the
For both of these, we eventually construct a
The difference between the two is that the first one creates an instance of Now, given the separation between What does work and is probably not how we should handle this is setting the class name from the start in
-super(`submenuitem.${item.submenu.id}`, typeof item.title === 'string' ? item.title : item.title.value, actions, 'submenu');
+super(`submenuitem.${item.submenu.id}`, typeof item.title === 'string' ? item.title : item.title.value, actions, ThemeIcon.isThemeIcon(item?.icon) ? ThemeIcon.asClassName(item.icon) : 'submenu'); Like I said, I'm a bit out of my depth here, I'm not familiar with the design and how this should be handled, I'm just writing this down in case it helps. |
Thank you, that is a very detailed analysis! Will look into it |
Type: Bug
An extension that contributes a submenu with a valid icon to
multiDiffEditor/resource/title
is rendered without the icon (screenshot made on mouse hover, without hovering it's not even visible):For comparison, the same submenu icon shows fine as a contribution to
view/title
:To reproduce this, I created an empty extension with a simple set of menu contributions.
[1] https://github.com/alexandruavadanii/vscode-submenu-icon
[2] alexandruavadanii/vscode-submenu-icon@098d2bb
VS Code version: Code - Insiders 1.86.0-insider (9c5eabb, 2024-01-30T03:56:13.017Z)
OS version: Windows_NT x64 10.0.18362
Modes:
Remote OS version: Linux x64 4.18.0-372.19.1.el8_6.x86_64
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
The text was updated successfully, but these errors were encountered: