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
686 stars 95 forks source link

Outlook displays Smart Alert after Addin allows the mail #4968

Open mkondadg opened 4 weeks ago

mkondadg commented 4 weeks ago

During our addin development testing, if the addin takes more than 5 secs to respond, a first smart alert displays showing its working. Later if the addin allows the mail, Outlook still displays "Send" / "Don't Send".

This will contradict with the Addin response of Allow incase of auditing if the user clicks on "Don't Send".

Your Environment

Windows desktop
Outlook
You have Microsoft Outlook Version 1.2023.1018.300 (Production).
Client Version is 20231027003.07 .
Windows 10 Enterprise 21H2 19044.2006

You have Microsoft Outlook Version 1.2024.1002.100 (Production). Client Version is 20241004002.11. WebView2 Version is 129.0.2792.79.

Expected behavior

Allow the email to be sent without displaying Smart alert

Current behavior

Outlook displays smart alert again.

Steps to reproduce

After OnMessageSend callback is triggered, delay by 10 secs in calling asyncResult.asyncContext.completed (true)

Context

This will contradict with the Addin response of Allow incase of auditing if the user clicks on "Don't Send".

mkondadg commented 3 weeks ago

Attached Smart Alert image for reference.

Screenshot 2024-10-15 192327

neprasad-microsoft commented 3 weeks ago

Hi @mkondadg Can you please attach a video of the issue. It is not clear from the steps and the screenshot that what is the problem here.

neprasad-microsoft commented 3 weeks ago

Hi @mkondadg I was able to repro the scenario.

This is expected behaviour on all platforms. If you want this to be changed, then it will be taken up as a new feature request. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered when we go through our planning process.

alexm-plutoflume commented 3 weeks ago

My team also is facing this, it's a UX quirk that doesn't make sense in our opinion.

@neprasad-microsoft I'm wondering why this is considered 'expected' behavior and the design choice around this?

If our Add-in has finished processing and determined that the email should be allowed to send, why is MSFT showing a dialog giving the user an option to send or don't send? That seems confusing to the end user, and it seems contradictory to the Add-in completing the event with "allowEvent" set to true.

If the Add-in finishes processing before the progress popup shows up and allows the email this dialog isn't show. Why does it need to show it if the progress pop up shows?