Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rendering] Secondary actions don't work in teams task dialog on Android #9119

Open
boog opened this issue Feb 22, 2025 · 2 comments
Open

[Rendering] Secondary actions don't work in teams task dialog on Android #9119

boog opened this issue Feb 22, 2025 · 2 comments

Comments

@boog
Copy link

boog commented Feb 22, 2025

Target Platforms

Android

SDK Version

1.5

Application Name

Microsoft Teams

Problem Description

Adaptive Card with actions using mode=secondary do not open a menu on Android in Teams Task Dialogs. To reproduce create a staticTab with contentUrl, open a teams with example javascript. Works as expected on web/desktop/ios, only Android issue.

Use example card below. Open in Android and observe non-functional behavior shown in video.

Screenshots

bug.mp4

Card JSON

{
    "type": "AdaptiveCard",
    "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5",
    "body": [
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "items": [
                        {
                            "type": "TextBlock",
                            "wrap": true,
                            "text": "Case"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "items": [
                        {
                            "type": "ActionSet",
                            "actions": [
                                {
                                    "type": "Action.Submit",
                                    "title": "Edit",
                                    "mode": "secondary",
                                    "data": {
                                        "actionid": "EDIT",
                                        "metadata": {
                                            "formId": "a01Ov00000fIN9rIAG"
                                        },
                                        "msteams": {
                                            "type": "task/fetch"
                                        }
                                    }
                                },
                                {
                                    "type": "Action.Submit",
                                    "title": "Delete",
                                    "mode": "secondary",
                                    "style": "negative",
                                    "data": {
                                        "actionid": "DELETE_FORM",
                                        "metadata": {
                                            "formId": "a01Ov00000fIN9rIAG"
                                        },
                                        "msteams": {
                                            "type": "task/fetch"
                                        }
                                    }
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "type": "ActionSet",
            "actions": [
                {
                    "type": "Action.Submit",
                    "title": "New Form",
                    "style": "positive",
                    "data": {
                        "actionid": "APP_HOME_NEW_FORM",
                        "msteams": {
                            "type": "task/fetch"
                        }
                    }
                }
            ]
        }
    ]
}

Sample Code Language

JavaScript

Sample Code

let taskInfo = { title: action.title, size: { width: 520, }, card: JSON.stringify(card), completionBotId: botId, }; dialog.adaptiveCard.bot.open(taskInfo, (err, result) => { if (err) console.log(err); if (result) console.log(result); });

@Meghana-MSFT
Copy link

@boog - Could you please confirm if my understanding is correct that the card having secondary actions doesn't work when the card is shown inside a task module? Issue happens only on Android.

@boog
Copy link
Author

boog commented Feb 24, 2025

@Meghana-MSFT yes that is correct, I tried a simplified card with only a secondary action and a few different types of actions etc using adaptive cards 1.4-1.6 and I was not able to get any to work as expected on Android in the Microsoft Teams native app. The button appears as [...] but nothing happens when you click it (as shown in video). Interestingly, secondary actions work as expected on Android when using a custom renderer in a staticTab iframe using the JavaScript library, they just don't work in the task dialogs that use the Microsoft Teams native renderer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants