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

Added support for webview/context menu contributions #13166

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

jonah-iden
Copy link
Contributor

@jonah-iden jonah-iden commented Dec 12, 2023

What it does

closes #12756
implements the webview/context menu contributions from the missing declarative api as seen in #13051

How to test

A small test extension can be found here
this repo also contains a vsix file to download directly.

Go to explorer tab, expand the Webview Test View webview. This contains two elements opening the context menu on each should return a different command because of their given context through the data-vscode-context property

Follow-ups

Review checklist

Reminder for reviewers

Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden marked this pull request as ready for review December 12, 2023 10:25
@msujew msujew added vscode issues related to VSCode compatibility webviews issues related to webviews menus issues related to the menu labels Dec 12, 2023
Copy link
Contributor

@tortmayr tortmayr 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 an works as expected! Thanks.
There is just one minor unnecessary log in the onContext menu handler but other than that
everything is fine.

packages/plugin-ext/src/main/browser/webview/pre/main.js Outdated Show resolved Hide resolved
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@jonah-iden jonah-iden merged commit ad2e106 into master Dec 13, 2023
13 of 14 checks passed
@github-actions github-actions bot added this to the 1.45.0 milestone Dec 13, 2023
@msujew msujew deleted the jiden/support-for-webview-context-menu-contrib branch December 13, 2023 14:57
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 webviews issues related to webviews
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

vscode: implement support for webview/context menu contributions
3 participants