Open Jochem-agro opened 1 year ago
What should this contribution exactly do? What example are you following? If you are trying to extend some TFS menu as an extensibility point, It has been a long time since I tried it, but we can discuss it.
@karelkral first of all thanks for responding. Yes im trying to extend a TFS work item menu:
The idea is to add a dropdown to the dialog and perform some action (change some properties regarding the selected work item) based on the selected value of the dropdown. Nothing that special or extensive, should be just one dropdown and an "OK" and "Cancel".
The inspiration I'm getting from this repo and the new documentation page
Showing a dialog from the local menu is some kind complicated and not easy to understand. From my observations this is how it works:
SDK.register("to-development-button-handler"...
does not have rights to show anything on HTML surface. Because TFS host is strictly separated from the client area. So you cannot directly use CustomDialog from your code - this does not do anything.const panelService = await SDK.getService<IHostPageLayoutService>(CommonServiceIds.HostPageLayoutService);
panelService.openPanel<boolean | undefined>(SDK.getExtensionContext().id + ".panel-content", {
Using a dialog service to show custom dialog content is covered here:
private async onCustomPromptClick(): Promise<void> {
const dialogService = await SDK.getService<IHostPageLayoutService>(CommonServiceIds.HostPageLayoutService);
dialogService.openCustomDialog<boolean | undefined>(SDK.getExtensionContext().id + ".panel-content", {
https://github.com/microsoft/azure-devops-extension-sample/blob/master/src/Samples/Hub/Hub.tsx
As in the panel example, the dialog content must be registered as a separate extension.
@karelkral this is very valuable information. Unfortunatly my focus shifted at the moment and currently not doing any development for our azure boards process. So I can't look at your information until I think november-decemberish (might be sooner if i put in some extra effort). Can I get in touch with you regarding this in the near future?
@karelkral after some long delay (hench last post where I said I would be working on it november-decemberish), ive succesfully added the popup! thnx for your information. Any chance you can give me some information about conditionally adding a context menu item based on work item type?
Would you be able to share your working code for creating a popup from the context menu?
Hello
I've ran into an issue while displaying an dialog from the context menu and im kinda in the blue of whats wrong. I've started out from one of the examples from this repository.
Given following contribution:
JSON:
JS:
When adding the extension to our Devops environment all the logs seems to execute perfectly, so the code is working. But the dialog doesn't show at all. Am I missing something? when browsing through the examples you have a contribution type: "ms-vss-work-web.action-provider", am I missing that implementation?
Hopefully someone can help me out here :D.
Note: I exclude the HTML file because it does nothing more then pointing to the js file and having the root component