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
641 stars 92 forks source link

Addin does not change state when switching from Compose to Read mode (Addin is pinned, Conversation View is enabled) #4384

Open max-yushchuk opened 4 weeks ago

max-yushchuk commented 4 weeks ago

The bug happens with every addin that works in Compose and Read message mode and can be pinned. I'm showing MS Addin "Viva Insights" as an example. But tried on different addins and the issue persists everywhere.

The Addin does not change its state when switching from Compose to Read mode (Addin is pinned, Conversation View is enabled). When Conversation View is enabled the Addin does not work properly. If the Addin is pinned and the user switches between Compose and Read mode the Addin is not updated and shows the previous version which is not correct. So, looks like the Addin is in Read message mode but actually it wasn't updated and it still works in compose mode even if the Outlook UI shows that it's read message mode.

As an example, I'm looking for itemId which exists only in Read message mode and does not exist in Compose message mode.

Your Environment

Expected behavior

The Addin switches correctly between Compose and Read message modes. It should close the Compose Addin and then open the Read Addin. The itemId should always exist in Read message mode

Current behavior

The Addin does not switch correctly between Compose and Read message modes. It does not close the Compose Addin and does not open the Read Addin. So, UI shows that you're in Read message mode but actually the Addin is from Compose message mode and does not have itemID.

Steps to reproduce

  1. Select the message - The message content is shown
  2. Open the Addin and pin it
  3. Click "Reply" - The edit mode is active
  4. Open the same Addin and pin it
  5. Discard editing or remove the message
  6. The Compose Addin is not closed
  7. The message in read mode is active
  8. The active Addin is the old one from the Compose message mode.

Link to live example(s)

Use any add-in that supports Compose and pin mode. I saw the issue on our addin. But it exists on MS add-in as well. Look at "Viva Insights" for example.

Provide additional details

This bug appears if "Conversation View" is enabled in the Outlook. If it's disabled the Add-in works correctly and switches between compose and read modes as expected.

Context

It's a critical issue because the user cannot use the Add-in at all. The Add-in is shown as active and correct but does not work because it does not have any information from the message.

Useful logs

Video recording: https://drive.google.com/file/d/1W2x3yjkyRFNR8JJMTAUqFmrcCNxzLSLU/view?usp=sharing

ajays-msft commented 3 weeks ago

@max-yushchuk - Thanks for reporting the issue. Added the issue to backlog. We will investigate and let you know the progress. Internal Tracking ID: 4522372

svehera commented 2 weeks ago

@ajays-msft any updates on the progress for this issue?