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

editor: combine left gutter context menus #12794

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

cdamus
Copy link
Contributor

@cdamus cdamus commented Aug 1, 2023

What it does

For compatibility with the VS Code behaviour of the "editor/lineNumber/context" menu contribution point, combines the context menus created by

  • debug extension in the area to the left of the line numbers and
  • editor extension 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.

Fixes #12688

How to test

  1. Clone the menu_bug_3 branch of the sample repository provided by the OP of VS Code menu contribution to "editor/lineNumber/context" doesn't behave as in VS Code #12688 as described in that issue and build it.
  2. Link the myext extension from step 1 into your plugins/ directory.
  3. Launch Theia.
  4. Open a code editor on some TS file or something and right click anywhere in the left gutter of the editor where there is some line of text. You should see something like this:
    CleanShot 2023-08-01 at 14 11 21
  5. Observe that the "Hello, World!" action shows the message toast as expected.
  6. Verify also that the menu actions to create and remove breakpoints work as expected whether the context menu was summoned by right-clicking on an actual line number or to the left of it.
  7. Verify further that simply clicking in the gutter area to the left of a line number, without summoning the context menu, still toggles line breakpoints.

Review checklist

Reminder for reviewers

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 <[email protected]>
@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility menus issues related to the menu labels Aug 3, 2023
@jcortell68
Copy link
Contributor

@cdamus Thanks for fixing this!

@martin-fleck-at martin-fleck-at self-requested a review August 7, 2023 15:53
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me and the behavior is now as in VS Code where all actions are visible and the debug actions are generated on the fly. Great work, Christian! Thank you!

@martin-fleck-at
Copy link
Contributor

@colin-grant-work @msujew: Would any of you like to have a look at this as well? I saw you guys did some work in this area.

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as well 👍

@martin-fleck-at martin-fleck-at merged commit 2d91943 into eclipse-theia:master Aug 11, 2023
6 checks passed
@cdamus cdamus deleted the issue/12688 branch August 11, 2023 15:03
@vince-fugnitto vince-fugnitto added this to the 1.41.0 milestone Aug 31, 2023
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
Archived in project
Development

Successfully merging this pull request may close these issues.

VS Code menu contribution to "editor/lineNumber/context" doesn't behave as in VS Code
5 participants