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

Add support for card-level selectActions #1199

Closed
6 tasks done
tongyliu opened this issue Mar 1, 2018 · 4 comments
Closed
6 tasks done

Add support for card-level selectActions #1199

tongyliu opened this issue Mar 1, 2018 · 4 comments

Comments

@tongyliu
Copy link
Contributor

tongyliu commented Mar 1, 2018

Implementation status

The Problem

Currently, in order to have the entire card be a click target for some action, the card's contents must be wrapped in a container with the selectAction. This is cumbersome for card authors and also breaks full-bleed background images in some renderers.

Proposed Solution

Add a new selectAction field to the top-level AdaptiveCard schema. This field will be identical in type to the existing selectAction fields on containers.

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.x",
    "body": [
        {
            "type": "TextBlock",
            "text": "This is some text"
        }
    ],
    "selectAction": {
        "type": "Action.OpenUrl",
        "title": "cool link",
        "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    }
}
@matthidinger
Copy link
Member

Thanks @tongyliu, this is a good candidate for the next major schema rev.

@tuanh118
Copy link
Contributor

Is there any spec on card's look on mouse hover? Should it change background color and/or border color?

@tuanh118
Copy link
Contributor

Also, do we want to support all 3 types of actions (OpenUrl, Submit, and ShowCard) ? I think only the OpenUrl action makes sense. But in case we want to support more, we might need to discuss more on action trigger's behavior.

@khouzam khouzam modified the milestones: 1805, 1806 Jun 5, 2018
@khouzam khouzam modified the milestones: 1806, 1808 Jul 27, 2018
@khouzam
Copy link

khouzam commented Aug 31, 2018

This has been completed.

@khouzam khouzam closed this as completed Aug 31, 2018
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

4 participants