microsoft / Viva-Connections-Extensibility-Beta

38 stars 6 forks source link

Teams Deep Link in QuickView adaptive card action always opens new browser tab #18

Closed vman closed 3 years ago

vman commented 3 years ago

Versions

[Windows 10] Operating System [v12.22.1] Node version [4.0.2] Gulp version [1.13.0-beta.5] SPFx Generator version (npm list -g @microsoft/generator-sharepoint)

Expected or Desired Behavior

In the QuickView Adaptive card, if there is a button with Action.OpenUrl which points to a deep link to a Teams tab, then this link should open in the same browser tab instead of always opening a new tab.

There should be a way to set the isTeamsDeepLink: true parameter to buttons added as part of the adaptive card.

Observed Behavior

Adaptive card buttons with action type OpenUrl always open a new browser tab even if the link contains a deep link to a Teams tab. The buttons highlighted below: image

Steps to Reproduce

In the adaptive card which is shown on the Quick View, add an action with type Action.OpenUrl and point it to a deeplink to a Teams tab:

{
    "type": "AdaptiveCard",
    "version": "1.2",
    "body": [
        ///
    ],
    "actions": [{
            "type": "Action.OpenUrl",
            "url": "https://teams.microsoft.com/l/entity/<app-id>/<entity-id>?context=%7B%22subEntityId%22%3A8%2C%22channelId%22%3A%2219%3AEwSwACREAgS2ZD1xwPFAA_PONNHZ7Aqslh1CkCRuYNU1%40thread.tacv2%22%7D",
            "title": "Go to Idea"
        }
    ]
}

Observe that clicking on the deep link always opens up a new browser tab.

johnguy0 commented 3 years ago

This is currently by design. However, if there's enough interest we could revisit this.