-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
VS Code submenu contribution to editor/title and view/title not working correctly #12706
Comments
jcortell68
changed the title
VS Code submenu contribution to editor/title not working correctly
VS Code submenu contribution to editor/title and view/title not working correctly
Jul 13, 2023
jfaltermeier
added a commit
that referenced
this issue
Jul 27, 2023
jfaltermeier
added a commit
that referenced
this issue
Jul 27, 2023
* add option RenderContextMenuOptions to ask renderer to no render a menu with single submenu but to render the children instead * add helper method to menu-model-registry to remove the parent nodes from a menu node as described above * adjust renderers and callers accordingly
jfaltermeier
added a commit
that referenced
this issue
Aug 8, 2023
* add option RenderContextMenuOptions to ask renderer to no render a menu with single submenu but to render the children instead * add helper method to menu-model-registry to remove the parent nodes from a menu node as described above * adjust renderers and callers accordingly
jfaltermeier
added a commit
that referenced
this issue
Aug 8, 2023
* introduce option in RenderContextMenuOptions to ask renderer to not render a menu with single submenu. Instead render only the children * add helper method to menu-model-registry to remove the parent nodes from a menu node as described above * adjust renderers and callers accordingly
1 task
jfaltermeier
added a commit
that referenced
this issue
Aug 17, 2023
* introduce option in RenderContextMenuOptions to ask renderer to not render a menu with single submenu. Instead render only the children * add helper method to menu-model-registry to remove the parent nodes from a menu node as described above * adjust renderers and callers accordingly
jfaltermeier
added a commit
that referenced
this issue
Aug 17, 2023
* introduce option in RenderContextMenuOptions to ask renderer to not render a menu with single submenu. Instead render only the children * add helper method to menu-model-registry to remove the parent nodes from a menu node as described above * adjust renderers and callers accordingly
jfaltermeier
added a commit
that referenced
this issue
Aug 17, 2023
jfaltermeier
added a commit
that referenced
this issue
Aug 17, 2023
* fix icon * also skip virtual nodes
martin-fleck-at
pushed a commit
that referenced
this issue
Aug 21, 2023
#12814) * introduce option in RenderContextMenuOptions to ask renderer to not render a menu with single submenu. Instead render only the children * add helper method to menu-model-registry to remove the parent nodes from a menu node as described above * adjust renderers and callers accordingly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Description:
I was testing support for contributing a submenu via a VS Code extension. It works as expected in all the locations I tried but two:
The buggy behavior is identical in both. The following will refer to only "editor/title" for simplicity, though.
The submenu appears in "invisible" fashion. The submenu's icon (a pen) should appear in the editor title toolbar, as shown here in an equivalent VS Code sample:
In Theia, the submenu does in fact end up in the editor title toolbar, but without its icon (and without its label). And so it's effectively invisible. I.e., you can't see that it's there. If you hover the mouse over that area, you will see a tooltip pop up with the submenu's name. This hints that your mouse is over something you can't see. And sure enough, if you left click there, you will end up seeing the submenu.
But even with this "workaround" you still end up with undesirable behavior. Instead of being presented with the three submenu items (Larry, Curly and Moe), you see the submenu title and icon, and you have to click yet again to get to the submenu items.
This all works intuitively in VS Code. In Theia, the implementation is off.
Note that this might seem similar to issue 12686, since it's related to the same menu insertion point ("editor/title") and it's also involves an "invisible" menu contribution. But this is a different case and I don't think fixing one will fix the other. In that other ticket, the problem is that if a menu item lacks an icon, it's shown invisibly instead of with its title. That does not apply here. Here, the submenu is given an icon (in package.json) but it does not appear in the UI. And then as mentioned above, even if it did, there's a second issue at hand...the additional click that would be necessary to get to the submenu items.
Finally, note that the example below contributes the submenu to other locations as well and the behavior seems to be good there. I.e., if you right click in the editor body, you see this
Steps to Reproduce:
In the launched Theia, initiate the Hello World command via the Command Palette, to ensure the VS Code extension is activated and the Tree View is populated. Not technically needed to see the problem reported here.
Additional Information
The text was updated successfully, but these errors were encountered: