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

Fix #8581 - WPF crash on clicking container with select action #8612

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eyadon
Copy link

@eyadon eyadon commented Jul 12, 2023

Fixes #8581

Description

The RenderContext was crashing on validating inputs because Submit/Execute SelectActions were not registered in the SubmitActionCardId dictionary.

Sample Card

Here's a card with the previously crashing SelectActions.

{
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.5",
    "body": [
        {
            "type": "Container",
            "style": "accent",
            "selectAction": {
                "type": "Action.Submit",
                "id": "option1",
                "title": "option1"
            },
            "items": [
                {
                    "type": "TextBlock",
                    "text": "Option 1",
                    "wrap": true
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "Option 2",
                    "wrap": true
                }
            ],
            "style": "good",
            "selectAction": {
                "type": "Action.Execute",
                "id": "option2"
            }
        },
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Column 1",
                            "wrap": true
                        }
                    ],
                    "selectAction": {
                        "type": "Action.Submit"
                    }
                },
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Column 2",
                            "wrap": true
                        }
                    ],
                    "selectAction": {
                        "type": "Action.Execute"
                    }
                }
            ]
        },
        {
            "type": "ActionSet",
            "actions": [
                {
                    "type": "Action.Submit",
                    "title": "Cancel"
                }
            ]
        }
    ]
}

How Verified

Verified that renderer no longer crashes when you click containers and columns with Visualizer.

Microsoft Reviewers: Open in CodeFlow

@microsoft-github-policy-service
Copy link
Contributor

Hi @eyadon. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.

2 similar comments
@microsoft-github-policy-service
Copy link
Contributor

Hi @eyadon. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.

@microsoft-github-policy-service
Copy link
Contributor

Hi @eyadon. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.

@microsoft-github-policy-service
Copy link
Contributor

Staleness reset by jwoo-msft

@microsoft-github-policy-service
Copy link
Contributor

Hi @eyadon. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.

@microsoft-github-policy-service
Copy link
Contributor

Hi @eyadon. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.

@paulcam206 paulcam206 enabled auto-merge (squash) November 14, 2023 18:58
@paulcam206 paulcam206 force-pushed the dev/eyadon/8581-SelectActionCrashWPF branch from 3207ffa to 8c70194 Compare November 14, 2023 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Rendering] Crash on clicking Container with SelectAction
2 participants