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

Adaptive Card v1.6 #7105

Merged
merged 13 commits into from
Mar 17, 2022
Merged

Adaptive Card v1.6 #7105

merged 13 commits into from
Mar 17, 2022

Conversation

sowrabh-msft
Copy link
Contributor

@sowrabh-msft sowrabh-msft commented Mar 9, 2022

Changes made:

  • Add support for top level property metadata and metadata.webUrl
  • Add support for expires property in refresh

Details:

Metadata and metadata.webUrl

Metadata is a top level property to host non-functionality related metadata properties that do not affect rendering or actionability. The first property we are introducing here is the webUrl which can be used as a fallback by hosts to redirect users to the URL and uniquely map cards to their source URL.

refresh.expires property

refresh.expires is a way for card authors to indicate the freshness of content delivered. The canonical scenario is a flight tracking card. If the flight is a month away, the developer could set the expiration weekly, but as the flight time approaches the expiration window can be reduced.

The client is able to use this information as it sees fit, up to and including automatically refreshing the content if the expiration time has passed or avoiding refresh while the content is still valid.

Example payload

{
    "type": "AdaptiveCard",
    "version": "1.0",
    "metadata": { 
        "webUrl": "[https://](https://../)asana.com/ticket/5"
    },
    "refresh": {
        "expires": "2022-01-01T12:00:00Z",
        "action": { 
            "type": "Action.Execute",
            "verb": "..."   
         }
    },
    "body": { ... }
}
Microsoft Reviewers: Open in CodeFlow

sowrabh and others added 4 commits March 9, 2022 12:02
- Add support for toplevel property `metadata` and `metadata.webUrl`
- Add support for `expires` property in `refresh`
Copy link
Member

@matthidinger matthidinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved but some minor verbiage updates may help. @paulcam206 could you also poke into this?

schemas/src/shared/Refresh.json Show resolved Hide resolved
Copy link
Member

@paulcam206 paulcam206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good -- should fix indentation in AdaptiveCard.json though...

schemas/src/AdaptiveCard.json Outdated Show resolved Hide resolved
@matthidinger matthidinger enabled auto-merge (squash) March 17, 2022 17:20
@matthidinger matthidinger merged commit 3db0973 into microsoft:main Mar 17, 2022
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* Adaptive Card v1.6

- Add support for toplevel property `metadata` and `metadata.webUrl`
- Add support for `expires` property in `refresh`

* Move changes to src folder

* Updating description for refresh.expires

* Indent and TOC fix

* Adding version to expires

Co-authored-by: Sowrabh N R S <sowrabh@users.noreply.github.com>
Co-authored-by: Karthik Baskar <kabaska@microsoft.com>
Co-authored-by: karthikbaskar-ms <72971116+karthikbaskar-ms@users.noreply.github.com>
Co-authored-by: Vsevolod <sevkorobot@gmail.com>
Co-authored-by: Matt Hidinger <matt.hidinger@gmail.com>
Co-authored-by: Sowrabh N R S <sonrs@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants