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

Add viewContainer contribution point #212499

Merged
merged 12 commits into from
Jul 31, 2024

Conversation

thegecko
Copy link
Contributor

@thegecko thegecko commented May 11, 2024

As discussed in #200880 we are keen to add a contribution point to the debug viewlet.

This proposal implements this as well as allowing contributions to other view containers.

To use this proposal, the package.json would look similar to:

{
        ...
	"enabledApiProposals": [
		"viewContainerContext"
	],
	"contributes": {
		"commands": [
			{
				"command": "proposed.dummyMenu",
				"title": "Dummy Menu",
				"icon": "$(beaker)"
			}
		],
		"menus": {
			"viewContainer/title": [
				{
					"command": "proposed.dummyMenu",
					"group": "navigation",
					"when": "viewContainer == workbench.view.debug"
				}
			]
		}
	},
        ...

An example can be found here: https://github.com/thegecko/vscode-proposed-debug

Screenshot 2024-05-11 at 12 08 52

Partially fixes: #200880

@jrieken
Copy link
Member

jrieken commented Jul 2, 2024

It this be viewContainer/... instead of view/container/..?

@thegecko
Copy link
Contributor Author

thegecko commented Jul 2, 2024

It this be viewContainer/... instead of view/container/..?

I've renamed this to viewContainer/. The original format was based on items such as this:
https://github.com/thegecko/vscode/blob/9d4274e5599f6ba2c667a54ec0d1d6594d30145b/src/vs/workbench/services/actions/common/menusExtensionPoint.ts#L242

Readme and example updated to reflect the changes above.

@roblourens
Copy link
Member

Discussed with @jrieken earlier, pushed a change to require that this contribution point only apply to the debug view container, for now. Also, the proposal is mentioning "context menus" but this is only about the title menu, right? I'm renaming the proposal, but otherwise this is ready for Insiders :)

@roblourens roblourens added this to the August 2024 milestone Jul 31, 2024
@roblourens roblourens requested review from jrieken and removed request for jrieken July 31, 2024 19:41
@roblourens roblourens merged commit 2b8881a into microsoft:main Jul 31, 2024
6 checks passed
@thegecko thegecko deleted the view-container-contrib branch August 8, 2024 12:26
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug viewContainer menu contribution points
4 participants