OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
452 stars 183 forks source link

Adaptive card collapses in message area when not in focus #12205

Open jker-org opened 1 month ago

jker-org commented 1 month ago

Describe the bug We have just published a new app to Microsoft Teams store. The app utilizes message extension feature and a bot from teams toolkit example. First users are complaining about something that most likely is a bug in the Teams app. You can reproduce the issue with our app: https://tinyurl.com/teams-issue-example-app . The link will expire automatically on 31th August 2024. Please do not share any screenshots of our app due to privacy. Thanks!

Our app gathers input from the user and returns an adaptive card for the message area. The user can then post the adaptive card to the chat. Under certain circumstances (see below), the adaptive cards collapses inside the message area and the user is forced to key in the data again. The users are already complaining to us, but it seems that this is a Teams bug that need to be fixed by Microsoft.

To Reproduce

Positive case (when it works):

  1. Select the message area so that it has the focus (purple line at bottom).

image

  1. Add an app via '+' in message area that utilizes message extension and returns an adaptive card for the compose area (like our app):

image

  1. Adaptive card is shown in compose area. The user can submit the message:

image

Everything works fine in this case.

Negative case:

  1. Click the '+' button in the message area. The text box does not have the focus (no purple line at bottom):

image

  1. Add the app that return an adaptive card (like our app).

image

  1. The adaptive card can be seen for < 1 sec and then it collapses in the compose area. The user has to start again. (Note: Sometimes you have to repeat this scenario 2-3 times to see the effect.)

Our app produces a very powerful adaptive card (universal adaptive card) with refresh capabilities. Maybe the preview in the compose area can not handle this when there is no focus? We have no tested this with other apps as we don't know which apps also produce adaptive cards via message extension.

Expected behavior

The adaptive card must not collapse / disappear in the compose area when the control does not have the focus.

Actual behavior

The adaptive card collapses / disappears in the compose area when the control does not have the focus. This leads to a bad user experience for our users and forces them to gather their data again. In worst case, it can lead to users stop using our app.

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

jker-org commented 1 month ago

@adashen : We worked all day to find a workaround for this issue. Unfortunately we have not been successful. A few things we learned on the way:

image

We tried everything imaginable from our side with no effect. It would be really great if you could priotize this issue as we think that this issue can only be resolved in Microsoft Teams. Users are already deserting our app.

adashen commented 3 weeks ago

Hi @jker-org, it seems a teams platform issue. So upstream issue is opened at https://github.com/MicrosoftDocs/msteams-docs/issues/11462 Please it there.