microsoft / azure-devops-extension-sample

Sample web extension for Azure DevOps
MIT License
240 stars 159 forks source link

Full screen dialog window #16

Closed shajusukumaran closed 5 years ago

shajusukumaran commented 5 years ago

Hello,

Do you have a sample which shows how to create a full screen dialog window? The current sample has an example to open custom dialog window, but in the dialog options i am not able to specify a custom width for the dialog, i am able to specify the content width, but not the dialog window width. Please help.

Something like this: https://docs.microsoft.com/en-us/azure/devops/extend/develop/using-host-dialog?view=azure-devop

What i am trying to create is a dialog window which can be maximized or minimized based on user action. Something similar to what is available in the Baclog view (when user clicks on the title of a work item, the work item form is opened in a dialog window in full screen and user has a provision to resize it.

Thanks in advance. Shaju

nkirchem commented 5 years ago

@shajusukumaran We don't currently have that option. Designs across Azure DevOps are all moving away from dialogs in favor of Panels. You'll eventually see that with work items as well. So one option would be to use openPanel with the size option of PanelSize.Large. That's not near full screen, but gives you a lot more real estate than the dialog. Meanwhile I'll follow up with our PM on what we want to do here.

shajusukumaran commented 5 years ago

@nkirchem Thanks. I will try the Panel option, as suggested. Hope it works out.

shajusukumaran commented 5 years ago

Thanks @nkirchem, i was able to work with the Panel option (for the time being), will wait for further updates on this.

I have one more question for you, I am trying to connect to an external REST API from my extension (similar to what is available in the sample Hub) and the API requires a token to be passed in the request; do you have an example which shows how to retrieve the token from the service endpoint?

Thanks, Shaju

nkirchem commented 5 years ago

@shajusukumaran Auth tokens are passed automatically in the authorization header when using the REST clients from azure-devops-extension-api like in the hub example (via getClient from azure-devops-extension-api). You can also explicitly get the auth token by calling getAccessToken from azure-devops-extension-sdk. This token carries the auth scopes requested in the extension manifest (and apprpoved by the org admin who installed the extension).

shajusukumaran commented 5 years ago

Thanks @nkirchem Appreciate all the help and support.

davidcorrigan714 commented 4 years ago

@shajusukumaran We don't currently have that option. Designs across Azure DevOps are all moving away from dialogs in favor of Panels. You'll eventually see that with work items as well. So one option would be to use openPanel with the size option of PanelSize.Large. That's not near full screen, but gives you a lot more real estate than the dialog. Meanwhile I'll follow up with our PM on what we want to do here.

Was there any follow up on this? I'm running into the same issue where I need a wider dialog and the panel just doesn't work well with work item forms.