unable to resize the dialog using the new functions provided in teams version v2.23

Sai Sankar Matam 5 Reputation points
2024-05-22T14:39:28.1933333+00:00

The CDN being used :

<script     src="https://res.cdn.office.net/teams-js/2.23.0/js/MicrosoftTeams.min.js"     integrity="sha384-08XJvrutoSVYTA8PQeUgetTKn8B7JE73C5BdAfWnHZ5WnSFFQO6g1FGmSqxsrAzb"     crossorigin="anonymous"   ></script>

const taskInfo = {         title: "Title",         height: "large",         width: "large",         url: URL,         fallbackUrl: null     } microsoftTeams.dialog.url.open(taskInfo, submitHandler);

we are sending the above task info to url.open(), we are seeing dialog size as small even if we pass expected params of DialogSize

we tried checking the config from the below function getDialogInfoFromBotUrlDialogInfo(), looks like DialogSize params are being overridden to small every time

microsoftTeams.dialog.url.getDialogInfoFromBotUrlDialogInfo(taskInfo)

// result for above function : { completionBotId: null         fallbackUrl: null         height : "small"         title: "Title"         url: URL         width : "small"     }  

 

microsoftTeams.dialog.update.isSupported() //result : true newSize = {         height: "large", width: "large"     } microsoftTeams?.dialog?.update.resize(newSize)

we tried updating the dialog size using the above function , still its defaulting to small.

Any help will be appreciated

Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,360 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Nivedipa-MSFT 3,106 Reputation points Microsoft Vendor
    2024-06-10T08:31:31.41+00:00

    The dialog.url.open API should be called as follows:

    const urlDialogInfo = {
    

    There is a nested size object in the urlDialogInfo. The full interface for this parameter is documented here:

    https://learn.microsoft.com/en-us/javascript/api/@microsoft/teams-js/urldialoginfo?view=msteams-client-js-latest#@microsoft-teams-js-urldialoginfo-size


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.