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
665 stars 94 forks source link

Contextless Outlook add-in stays open when switching from Mail to a module extension add-in in OWA and new Outlook #4690

Open ottD opened 1 month ago

ottD commented 1 month ago

When using a contextless Outlook task pane add-in, the task pane stays open when switching from Mail to a module extension add-in such as Booking or Viva Engage in OWA and new Outlook. This is confusing as the add-in not only takes away screen real estate of the module extension add-in but the user has also no context of the selected emails that the task pane add-in might interact with. In addition, this behaviour is inconsistent as switching from Mail to Calendar closes the add-in task pane.

Environment

Expected behavior

I'd expect a contextless task pane add-in to close when switching to a module extension add-in, i.e. I would expect it to behave the same way as it currently does when switching from Mail to Calendar.

Current behavior

The current behaviour is that a contextless task pane add-in stays open when switching from Mail to a module extension add-in such as Viva Engage or Bookings but stays open when switching from Mail to Calendar.

Steps to reproduce

  1. Run and sideload attached Repro add-in
  2. In OWA or new Outlook, select an email and invoke the add-in task pane
  3. Change email selection, the add-in stays open as expected as it is contextless
  4. Switch to a module extension add-in such as Booking or Viva Engage using the left-hand navigation bar
  5. Observe how the task pane add-in remains open despite the fact that the user is no longer in Mail and the email selection is no longer visible
  6. Switch back to Mail and ensure that the add-in task pane is visible
  7. Switch from Mail to Calendar and observe how the task pane gets closed automatically

Example add-in

Out-of-the-box Outlook add-in created with yo office and updated manifest to include SupportsNoItemContext: ReproAddin.zip

Useful logs

Repro add-in task pane stays open when switching to module extension add-ins such as Booking or Viva Engage:

image

After closing the task pane add-in, the space on the right remains allocated:

image

Contextless add-in task pane should close when switching to module extension add-in:

image
AlexJerabek commented 1 month ago

Hi @ottD,

Thanks for reporting this. @exextoc, could you please investigate?

kbrilla commented 1 month ago

Preatty sure my issue is connected to this #4668

neprasad-microsoft commented 1 month ago

Hi @ottD Thanks for reporting this issue regarding pinned add-ins. It has been put on our backlog. We unfortunately have no timelines to share at this point Internal tracking id: Office: [4751127]