Skip to content
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 menu contributions to "editor/title/run" seem to behave no different than to "editor/title" #12687

Closed
jcortell68 opened this issue Jul 6, 2023 · 3 comments · Fixed by #12799 or #12869
Assignees
Labels
toolbar issues related to the toolbar vscode issues related to VSCode compatibility

Comments

@jcortell68
Copy link
Contributor

Bug Description:

I see that support for menu insertion point "editor/title/run" was added to Theia in recent months. It works...but not really how it works in VS Code.

In VS Code, if you have two or more contributions to "editor/title/run", a "Run or Debug..." submenu item is added to the editor title area. It appears as a regular menu item in the editor title toolbar (as icon or text), with a carat next to it for opening the submenu.

image

In Theia, the contributions to "editor/title/run" seem to appear exactly as if they were contributed to "editor/title". I.e., there is no grouping of them into a "Run or Debug..." submenu with a caret, etc.

I don't know if this is a known limitation of the current implementation. Perhaps the point was to get the contributed menu items into the UI in the simplest form possible, but not provide the full behavior of VS Code. However, if this is an unintended behavior/gap, I'll provide reproducibility steps.

@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility toolbar issues related to the toolbar labels Jul 7, 2023
@cdamus
Copy link
Contributor

cdamus commented Aug 3, 2023

I'm happy to look into this.

cdamus added a commit to cdamus/theia that referenced this issue Aug 4, 2023
In VS Code, contributions to the "editor/title/run"
menu contribution point are not added to the
ellipsis menu but to a dedicated item on the
toolbar. This commit makes Theia do the same,
except that unlike VS Code, a pop-up menu is
always presented, even if there is only one
action available.

Fixes eclipse-theia#12687

Signed-off-by: Christian W. Damus <[email protected]>
cdamus added a commit to cdamus/theia that referenced this issue Aug 28, 2023
In VS Code, contributions to the "editor/title/run"
menu contribution point are not added to the
ellipsis menu but to a dedicated item on the
toolbar. This commit makes Theia do the same,
except that unlike VS Code, a pop-up menu is
always presented, even if there is only one
action available.

Fixes eclipse-theia#12687

Contributed on behalf of STMicroelectronics.

Signed-off-by: Christian W. Damus <[email protected]>
cdamus added a commit to cdamus/theia that referenced this issue Aug 28, 2023
In VS Code, contributions to the "editor/title/run"
menu contribution point are not added to the
ellipsis menu but to a dedicated item on the
toolbar. This commit makes Theia do the same,
except that unlike VS Code, a pop-up menu is
always presented, even if there is only one
action available.

Fixes eclipse-theia#12687

Contributed on behalf of STMicroelectronics.

Signed-off-by: Christian W. Damus <[email protected]>
cdamus added a commit to cdamus/theia that referenced this issue Aug 28, 2023
In VS Code, contributions to the "editor/title/run"
menu contribution point are not added to the
ellipsis menu but to a dedicated item on the
toolbar. This commit makes Theia do the same,
except that unlike VS Code, a pop-up menu is
always presented, even if there is only one
action available.

Fixes eclipse-theia#12687

Signed-off-by: Christian W. Damus <[email protected]>
cdamus added a commit to cdamus/theia that referenced this issue Aug 28, 2023
In VS Code, contributions to the "editor/title/run"
menu contribution point are not added to the
ellipsis menu but to a dedicated item on the
toolbar. This commit makes Theia do the same,
except that unlike VS Code, a pop-up menu is
always presented, even if there is only one
action available.

Fixes eclipse-theia#12687

Signed-off-by: Christian W. Damus <[email protected]>
martin-fleck-at pushed a commit that referenced this issue Aug 28, 2023
In VS Code, contributions to the "editor/title/run"
menu contribution point are not added to the
ellipsis menu but to a dedicated item on the
toolbar. This commit makes Theia do the same,
except that unlike VS Code, a pop-up menu is
always presented, even if there is only one
action available.

Fixes #12687

Signed-off-by: Christian W. Damus <[email protected]>
@cdamus
Copy link
Contributor

cdamus commented Aug 28, 2023

In rebasing #12804 onto the latest master branch, I discovered that the fix for this issue causes a regression in the rendering of toolbar items that have a menuPath in addition to a command: they are now rendered as pop-up menus instead of simple buttons to be clicked. For example, the actions contributed with navigation group on the menu_bug_1 branch of the OP's sample repository, for issue #12686, end up rendered like this:

CleanShot 2023-08-28 at 17 24 28

instead of this:

CleanShot 2023-08-28 at 17 27 19

@jcortell68 or @martin-fleck-at could one of you please re-open this issue? I haven't permission as non-owner and non-committer.

cdamus added a commit to cdamus/theia that referenced this issue Aug 28, 2023
The merge of eclipse-theia#12799 introduced a regression in
the rendering of MenuToolbarItems that aren't
pop-up menus but instead just commands that
happen to have a menu path: they were rendered
as pop-up menus instead of simple buttons.

This fix refines the condition for the new pop-up
menu rendering to check that the menu to be
rendered is not a command to be executed
directly on click.

Fixes eclipse-theia#12687

Signed-off-by: Christian W. Damus <[email protected]>
@jcortell68
Copy link
Contributor Author

@cdamus I also do not have the ability to re-open this issue.

martin-fleck-at pushed a commit that referenced this issue Aug 29, 2023
The merge of #12799 introduced a regression in
the rendering of MenuToolbarItems that aren't
pop-up menus but instead just commands that
happen to have a menu path: they were rendered
as pop-up menus instead of simple buttons.

This fix refines the condition for the new pop-up
menu rendering to check that the menu to be
rendered is not a command to be executed
directly on click.

Fixes #12687

Signed-off-by: Christian W. Damus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolbar issues related to the toolbar vscode issues related to VSCode compatibility
Projects
None yet
4 participants