Open Cameramorphic opened 1 year ago
Hi Cameramorphic! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.
Best regards, Teams Platform
Hello @Cameramorphic - Thanks for reporting your issue. We will look into it and let you know the updates.
@Cameramorphic - We are not able to repro the issue, we have tried with the above manifest, card is rendering successfully in IOS device. IOS Version - 16.2
Thank you for the quick response!
I think you didn't exactly reproduce the output I'm having issues with though, it's happens when the Action.ShowCard
is repeated by the bound $data
.
To be sure I also updated to iOS 16.2 but that didn't change anything.
By testing various other simplified variants I managed to narrow down the error:
-> If the AdaptiveCard contains the ShowCard
action with the comment input more than once, it doesn't render.
I think I found the issue now:
The problem seems to be the comment input field inside the nested card
that is triggered by Action.ShowCard
.
If I modify the id
s of the Input.Text
elements so that they are globally unique in the the entire top-level AdaptiveCard, it renders.
This seems to be a bug in the rendering on iOS as I would expect the id
s to be scoped by the nested card
, after all it does seem to work that way on the desktop and web client.
The separate scope is also one of the reasons to use nested cards, because it will only send its own input fields rather than every input there is.
@sayali-MSFT can you confirm the scoping of nested cards is a bug on iOS? At least I can now work around the problem by adding the index to the id
, but I can't just access the input data values directly, I have to do a prefix match on the keys first.
@Cameramorphic -We have tried with the below adaptive card as well but both cards are showing properly. As you mention above nested comment input field inside the nested card. Could you please share the card Json with nested card, so that we are try it from our end and raise the bug accordingly.
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "This card's action will show another card"
}
],
"actions": [
{
"type": "Action.ShowCard",
"title": "Action.ShowCard",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "What do you think?"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Neat!",
"data": {
"neat": "true"
}
}
]
}
}
]
}
@sayali-MSFT As mentioned, the problem starts to appear if the nested card (containing an input) is repeated multiple times.
As I found out it is caused by the colliding id
s of the Input
fields, which shouldn't happen due to the nested card scope (which works fine on desktop and web client):
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "Item 42"
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.ShowCard",
"title": "Comment",
"card": {
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"type": "Input.Text",
"id": "commentText"
}
],
"actions": [
{
"type": "Action.Execute",
"title": "Send",
"verb": "postComment",
"data": {
"key": 42
}
}
]
}
}
]
},
{
"type": "TextBlock",
"text": "Item 43",
"separator": true
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.ShowCard",
"title": "Comment",
"card": {
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"type": "Input.Text",
"id": "commentText"
}
],
"actions": [
{
"type": "Action.Execute",
"title": "Send",
"verb": "postComment",
"data": {
"key": 43
}
}
]
}
}
]
}
]
}
@Cameramorphic - We are able to repro that issue, we have raised bug for the same and concerned team is looking into it. For workaround you can use unique ids only.
We will inform you once we get any update.
I'm building a Teams bot that responds with an AdaptiveCard containing a list of items and I'd like to add quick actions for each of the list items. If I put an
ActionSet
withAction.ShowCard
into the container that is repeated by the bound data array, the card doesn't render on iOS. It does render as expected in the desktop (Linux) and web client. If I add the sameActionSet
at the end of the card, or if I replace theAction.ShowCard
withAction.OpenUrl
in the repeated container, it works as expected.If I inspect the invisible card in iOS it shows the following error:
Also, confusingly the AdaptiveCard version in the shown card payload is "1.2", even though I'm using "1.4".
Below is a simplified example of the card:
example data:
Versions iOS 16.1.1 (iPhone 12 Pro)
Teams: Version: 4.22.1 Build: 4.22.77.2022223502/1212 (general)