OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
657 stars 93 forks source link

Integrated spam reporting add-in post-processing dialog width is not window-relative and does not word wrap #4529

Open DustinBrungart opened 1 month ago

DustinBrungart commented 1 month ago

Your Environment

Expected behavior

I expect that the integrated spam reporting feature's showPostProcessingDialog would be bounded by some screen- or window-relative size and would word wrap, or that the description field of the dialog would allow for newline characters to allow developers to manage this. Without any control over the dialog, it can be difficult to determine where (and whether) to substring dynamic response labels that are not manifested.

Current behavior

The showPostProcessingDialog description property in OWA displays all content in a single line which creates dialogs larger than the allowable display area. Instead of word wrapping, the dialog appears in a single line larger than the screen's display area.

Steps to reproduce

  1. Define a post-processing dialog in an integrated spam reporting add-in such as:
    event.completed({
    onErrorDeleteItem: false,
    moveItemTo: Office.MailboxEnums.MoveSpamItemTo.JunkFolder,
    showPostProcessingDialog: {
        title: "Integrated Spam Add-in",
        description: "Any long string on one or more lines."
    }
    });
  2. Report a message in Outlook on the web.

Context

Our dialogs are sourced by customer-entered data. The post-processing dialog particularly isn't manifested so it can change more frequently than other display strings. When the text is long enough the close button is not displayed, and without control over the dialog itself it's also difficult to know when to substring.

Useful logs

SpamAddinDialog

akagarwa-msft commented 4 weeks ago

Thanks for reporting this issue regarding Integrated Spam dialog. It has been put on our backlog. We unfortunately have no timelines to share at this point. As a workaround either you can limit string size on the add-in side or add \n from the JS side to break up the string.

Internal tracking id: Office: [4624069]

DustinBrungart commented 2 weeks ago

Thanks for your reply, in the meantime we'll limit string length and encourage customers to configure same.

Unfortunately, adding \n to strings does not create newlines as expected in this dialog.

Screenshot 2024-06-20 122504

Screenshot 2024-06-20 122514