microsoft / microsoft/azure-devops-extension-sdk

unable to set the openCustomDialog size in dialogOptions

Open
#115 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
159
Forks
53
PR merge metrics
No merged PRs in 30d

Description

We want to implement a Modal in ADO plugin where we should be able to update the Modal size ie. The height and the width.

As there was the modal size issue, we were using panels as an alternative option.

We are using "ms.vss-features.host-dialog-service" service and openCustomDialog method
for implementing the Modal in our extension.

Below is the code snippet for openCustomDialog method.

import * as SDK from "azure-devops-extension-sdk";
SDK.init();

const openDialog = async() => {

const dialogService = await SDK.getService(
"ms.vss-features.host-dialog-service"
);
await dialogService.openCustomDialog(context.id + ".registration-form", {
message: "This is a custom message",
title: "Improve Form",
configuration: {
isModalOpen: true
},
onClose: (result) => {
if (result !== undefined) {
console.log("Dialog result:", result);
}
},
});
}

openDialog();

Also, we don’t have an option in the interface to manage the size of the Modal
https://learn.microsoft.com/en-us/javascript/api/azure-devops-extension-api/idialogoptions

Can someone help me with fixing this issue?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the openCustomDialog usage and the IDialogOptions interface linked in the issue, then trace how dialogOptions are passed to the host dialog service. Define how height and width should be represented and verify that a custom dialog can open with the requested dimensions without breaking existing options.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.