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 contribution to "editor/lineNumber/context" doesn't behave as in VS Code #12688

Closed
jcortell68 opened this issue Jul 6, 2023 · 5 comments · Fixed by #12794
Closed
Assignees
Labels
menus issues related to the menu vscode issues related to VSCode compatibility

Comments

@jcortell68
Copy link
Contributor

jcortell68 commented Jul 6, 2023

Bug Description:

Support for contributing a menu to "editor/lineNumber/context" was added in recent months. It works but not the way it works in VS Code and not in an intuitive way.

In VS Code, the menu contribution is added to the menu that appears when you right click anywhere in the area shown here:

image

With Theia, that same area seems to be divided into a left area and a right area. If you right click on the left area, you get only the built-in menus, if you click on the right area, you get only the contributed menus. Besides being inconsistent with VS Code, this separation isn't intuitive. That in such a small area with no deliniation, that right clicking in one area brings up one menu and clicking in the other area brings up a different menu...again, not intuitive.

VS Code:

image

Theia

image

Steps to Reproduce:

git clone -b menu_bug_3 https://github.com/jcortell68/theiasandbox
cd theiasandbox
yarn
yarn start:electron

Additional Information

  • Operating System: Windows
  • Theia Version: 1.39
@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility menus issues related to the menu labels Jul 7, 2023
@cdamus
Copy link
Contributor

cdamus commented Jul 27, 2023

I'll be happy to look into this issue.

@cdamus
Copy link
Contributor

cdamus commented Jul 27, 2023

My investigation is falling down at the first hurdle: on the latest master branch commit 6607185 I don't get the gutter menu for plug-in contributions at all. In the following screenshot you can see that ① the built-in menu on the left side of the gutter works for me in my Windows VM, but trying to call up the right-hand side gutter menu ② only shows a faint circle figure where the pointer was when I right-clicked.

CleanShot 2023-07-27 at 17 24 49

I can confirm that the myext extension provided by the OP is correctly loaded because I can run the "Hello World" command from the palette.

@cdamus
Copy link
Contributor

cdamus commented Jul 28, 2023

My investigation is falling down at the first hurdle: on the latest master branch commit 6607185 I don't get the gutter menu for plug-in contributions at all. In the following screenshot you can see that ① the built-in menu on the left side of the gutter works for me in my Windows VM, but trying to call up the right-hand side gutter menu ② only shows a faint circle figure where the pointer was when I right-clicked.

From debugging, it seems that this is just what an empty context menu looks like. Not intuitive. Created #12779 for it. So I need to determine why the menu contribution from the provided sample project isn't picked up.

@cdamus
Copy link
Contributor

cdamus commented Aug 1, 2023

So I need to determine why the menu contribution from the provided sample project isn't picked up.

It was (mingw) user error.

cdamus added a commit to cdamus/theia that referenced this issue Aug 1, 2023
Combine the context menus created by

  - debug in area left of the line numbers and
  - editor in the line numbers, themselves

into one context menu, managed by the editor
extension, opened either from the line numbers
or from the gutter area to their left, for
consistency with the VS Code behaviour of the
'editor/lineNumber/context' contribution point.

Fixes eclipse-theia#12688

Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
@cdamus
Copy link
Contributor

cdamus commented Aug 1, 2023

I've created PR #12794 to address this issue.

martin-fleck-at pushed a commit that referenced this issue Aug 11, 2023
Combine the context menus created by

  - debug in area left of the line numbers and
  - editor in the line numbers, themselves

into one context menu, managed by the editor
extension, opened either from the line numbers
or from the gutter area to their left, for
consistency with the VS Code behaviour of the
'editor/lineNumber/context' contribution point.

Fixes #12688

Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
menus issues related to the menu vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants