AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

AdaptiveCards - selectAction property didn't work on iOS Teams app

Open levotragiang opened this issue 8 years ago • 17 comments

Platform

  • iOS
  • Node.js
  • MS Teams

Hi guys,

I'm developing a chat bot, using MS Teams as a channel on both desktop app and mobile app, and Adaptive Cards of course. Everything just worked smoothly until yesterday, i did updated the latest version of MS Teams on iOS device. Then, selectAction property of my Adaptive Cards didn't work anymore :'(

I think maybe MS got this bug while releasing this version...

Could anyone help me, or to raise this issue on MS teams at least?!

Thanks in advance!

levotragiang avatar Sep 14 '18 07:09 levotragiang

Hi Team,

How was the issue fixed ?

Even i am facing the same problem. My adaptive card submit action button is not working in Ms TEAM IOS app

vishmonne avatar May 29 '19 10:05 vishmonne

@nesalang can you take a look at this?

shalinijoshi19 avatar Jun 03 '19 16:06 shalinijoshi19

Hi Team, How was the issue fixed ? Even i am facing the same problem. My adaptive card submit action button is not working in Ms TEAM IOS app

@vishmonne Can you share your json payload?

jwoo-msft avatar Jun 03 '19 16:06 jwoo-msft

@shalinijoshi19 Since the issue is raised in the context of Teams, I will check first if this is reproducible on our SDK, if not reproducible, I will hand it over to Teams.

jwoo-msft avatar Jun 03 '19 17:06 jwoo-msft

Same here on ios teams 1.0.75 (french locale if it matters) here the json response send back to ms bot platform (we use rest calls), this card is not showing, just blank :

{
   "type":"message",
   "from":{
      "id":"xxxxx",
      "name":"Beesy-Local"
   },
   "attachments":[
      {
         "contentType":"application/vnd.microsoft.card.adaptive",
         "content":{
            "type":"AdaptiveCard",
            "body":[
               {
                  "type":"TextBlock",
                  "text":"Et voici la liste des actions pour vous  :",
                  "wrap":true
               },
               {
                  "type":"ColumnSet",
                  "columns":[
                     {
                        "type":"Column",
                        "items":[
                           {
                              "type":"TextBlock",
                              "text":"**1** - test",
                              "wrap":true
                           }
                        ],
                        "width":"stretch"
                     },
                     {
                        "type":"Column",
                        "selectAction":{
                           "type":"Action.Submit",
                           "data":{
                              "action":"showaction",
                              "actionData":{
                                 "id":"2254803"
                              }
                           }
                        },
                        "items":[
                           {
                              "type":"TextBlock",
                              "color":"Accent",
                              "text":"Modifier"
                           }
                        ],
                        "width":"auto"
                     }
                  ]
               }
            ],
            "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
            "version":"1.0"
         }
      }
   ],
   "conversation":{
      "conversationType":"personal",
      "tenantId":"xxxxx",
      "id":"xxxxx"
   },
   "recipient":{
      "id":"xxxxx",
      "name":"Jean-Charles Ragons",
      "aadObjectId":"xxxxx"
   },
   "replyToId":"1559808259248",
   "locale":"fr-FR"
}

and this one is showing well :

{
   "type":"message",
   "from":{
      "id":"xxxxx",
      "name":"Beesy-Local"
   },
   "attachments":[
      {
         "contentType":"application/vnd.microsoft.card.adaptive",
         "content":{
            "type":"AdaptiveCard",
            "body":[
               {
                  "type":"TextBlock",
                  "text":"Et voici la liste des actions pour vous  :",
                  "wrap":true
               },
               {
                  "type":"ColumnSet",
                  "columns":[
                     {
                        "type":"Column",
                        "items":[
                           {
                              "type":"TextBlock",
                              "text":"**1** - test",
                              "wrap":true
                           }
                        ],
                        "width":"stretch"
                     },
                     {
                        "type":"Column",
                        "items":[
                           {
                              "type":"TextBlock",
                              "color":"Accent",
                              "text":"Modifier"
                           }
                        ],
                        "width":"auto"
                     }
                  ]
               }
            ],
            "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
            "version":"1.0"
         }
      }
   ],
   "conversation":{
      "conversationType":"personal",
      "tenantId":"xxxxx",
      "id":"xxxxx"
   },
   "recipient":{
      "id":"xxxxx",
      "name":"Jean-Charles Ragons",
      "aadObjectId":"xxxxx"
   },
   "replyToId":"1559808316499",
   "locale":"fr-FR"
}

the only difference in the card in attachments is the selectAction block. And for sure it's working well on osx electron client or chrome.

Jcragons avatar Jun 06 '19 08:06 Jcragons

@Jcragons Thanks for sharing the payload. I tested your payload in iOS sample app included in this repo. The card rendered properly and selection action worked.

I'm checking with Teams; meanwhile, I'm closing this issue since it's not reproducible. but I will update this thread once I get more info from Teams.

jwoo-msft avatar Jun 06 '19 17:06 jwoo-msft

@vishmonne,

if you are referring to submit.action of actions since you mentioned that "button" is not working, then can you please bring this up to Teams? This issue is about embedded action in collection types such as column, columnest, and container.

Thanks,

jwoo-msft avatar Jun 07 '19 20:06 jwoo-msft

@levotragiang @Jcragons Hello, I checked with Teams, and they confirmed that they are using v1.0.3 of SDK. SelectAction is supported v1.1 and above. Thank you.

jwoo-msft avatar Jun 07 '19 20:06 jwoo-msft

Hi @nesalang, thanks for replying. Unfortunately, according to Teams' document, Adaptive Cards v1.1 is currently not supported by MS Teams...

Do you have any ideas when it will be supported? I'll also try to leave a feedback on Teams site.

Thank you.

levotragiang avatar Jun 10 '19 02:06 levotragiang

@levotragiang we are working with the Teams side to come with an upgrade plan to AC 1.2 which should contain the bug fixes that @nesalang refers to ; @jjustinms (Justin) from Teams for FYI also. We'll keep this issue open until we have an upgrade plan/timeline in place for you! Thanks for your patience and for reporting this.

shalinijoshi19 avatar Jun 11 '19 18:06 shalinijoshi19

Hopes, it's coming :)

Jcragons avatar Jun 12 '19 07:06 Jcragons

@Jcragons MessageBack seems to work with MSTeams if you want temporary fix (clickable button).

card.Actions.Add(new AdaptiveSubmitAction()
            {
                Title = "Confirm",

                DataJson = "{\"msteams\": {\"type\": \"messageBack\", \"displayText\": \"Confirm\", \"text\": \"Confirm\"} }"
            });

droidriz avatar Aug 14 '19 05:08 droidriz

Thanks @droidriz, I'll try as soon as I can!

Jcragons avatar Aug 14 '19 07:08 Jcragons

@VikrantSingh01 this isn't a bug on AdaptiveCards but rather blocked on Teams upgrading to 1.2.* ; Assigning to you for tracking

shalinijoshi19 avatar Nov 12 '19 22:11 shalinijoshi19

BB Paylaod samples/v1.0/Elements/ Column.SelectAction.json Container.SelectAction.json Image.SelectAction.json

jwoo-msft avatar Nov 21 '19 19:11 jwoo-msft

Closing this issue out since we are using #3480 to track the 1.2.* upgrade over at Teams end.

shalinijoshi19 avatar Nov 26 '19 22:11 shalinijoshi19

hello All, I am using the Adaptive Card 1.1v for Rendering card in IOS mobile application.card is showing but thumb up and down selectAction not working , here the json response.please let me know what is issue and how to solve this.

{"type":"AdaptiveCard","speak":"Your Working Days values are","body":[{"type":"TextBlock","text":"Working Days for Feb 01, 2020 - Feb 29, 2020","wrap":true},{"type":"ColumnSet","columns":[{"type":"Column","width":"100","items":[{"wrap":true,"spacing":"none","weight":"bolder","type":"TextBlock","text":"8 days"}]}],"separator":true},{"type":"ColumnSet","columns":[{"items":[{"spacing":"none","type":"ImageSet","images":[{"size":"small","selectAction":{"type":"Action.Submit","data":{"conId":"9kC5cLqGlT4KFvRPxKyKFI-c","activityId":"9kC5cLqGlT4KFvRPxKyKFI-c|0000004","userFeedback":"positive"}},"type":"Image","url":"https:\/\/iocontentdev.blob.core.windows.net\/kpi-images\/thumbs_up.png","altText":""},{"size":"small","selectAction":{"type":"Action.Submit","data":{"conId":"9kC5cLqGlT4KFvRPxKyKFI-c","activityId":"9kC5cLqGlT4KFvRPxKyKFI-c|0000004","userFeedback":"negative"}},"type":"Image","url":"https:\/\/iocontentdev.blob.core.windows.net\/kpi-images\/thumbs_down.png","altText":""}],"imageSize":"small"}],"type":"Column","width":"auto","horizontalAlignment":"Right"}],"horizontalAlignment":"Right"}],"version":"1.0"}

rekha06 avatar Feb 16 '20 19:02 rekha06