OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
457 stars 187 forks source link

Hyperlink markdown displays as plain text in Adaptive Card #5083

Closed someonelikeTIM closed 2 years ago

someonelikeTIM commented 2 years ago

Describe the bug Markdown for hyperlink [title](url) is displaying as plain text. It displays properly when previewed at https://adaptivecards.io/ but not in the actual Teams client. The card is delivered via bot as a modal. Adaptive Card version 1.3.

{ "type": "Input.Toggle", "title": "I understand this message will be posted publicly to the [Rec Room](https://www.peopleareeverything.com/Dashboard/RecRoom)", "id": "agree", "isRequired": true, "errorMessage": "You must check the box to agree and continue.", "wrap": true, "separator": true, "spacing": "Large" },

Expected behavior The markdown should display as a hyperlink.

Screenshots image

VS Code Extension Information (please complete the following information):

ghost commented 2 years ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

dooriya commented 2 years ago

@someonelikeTIM Thanks for reporting this! I think it's probably because Teams client doesn't support rendering Markdown hyperlink in a Input.Toggle element, but it can work in a TextBlock, see below: image

According to this doc, it's said

"Markdown is supported in Adaptive Card Textblock field, as well as Fact.Title and Fact.Value"

But it doesn't mention Input.Toggle :(

So maybe you can try to propose a request here to adaptive card / Teams team to see if they can support it or have any other workaround :)

someonelikeTIM commented 2 years ago

Thank you @dooriya for the response. The reason I am reporting this as a bug is because it was displaying as a hyperlink a couple weeks ago. I returned from holiday this week and that is when I noticed it is displaying as plain text. Nothing in my app code changed.

dooriya commented 2 years ago

Interesting, if the markdown hyperlink can be rendered correctly in a Input.Toggle element in a couple weeks ago, that might be a regression issue in Teams Client for the adaptive card rending.

Currently, the Teams Client (both desktop and web client) can no longer render the markdown format in a Input.Toggle element (including bold, Italic). Since this is a platform issue and not control by the toolkit, maybe you can ask help from the Teams team (e.g. open issue in the adaptive card repo, and they'll involve the related dev team to help :))

someonelikeTIM commented 2 years ago

Thank you @dooriya! I will do just that.