microsoft / adaptivecards Goto Github PK
View Code? Open in Web Editor NEWA new way for developers to exchange card content in a common and consistent way.
Home Page: https://adaptivecards.io
License: MIT License
A new way for developers to exchange card content in a common and consistent way.
Home Page: https://adaptivecards.io
License: MIT License
Allowing a single payload to house multiple Card variations. E.g., a developer could include an AdaptiveCard targeting Skype, an FbCard targetting FB Messenger, and a SpeechCard meant to being read on a headless device.
This should also cover the the Skype scenario where a Card has a Collapsed and FullScreen view, as seen here on Facebook Messenger:
Example seen in FlightIntinerary.
{
"title": "Passengers",
"separator": "bottom",
"items": [
{
"@type": "TextBlock",
"text": "Sarah Hum"
},
{
"@type": "TextBlock",
"text": "Jeremy Goldberg"
},
{
"@type": "TextBlock",
"text": "Evan Litvak"
}
]
}
Semantics:
Should we make subtle a textColor semantic value versus the isSubtle property. Is it useful to combine them?
{ textColor: "warning", "isSubtle": true }
CalendarReminder.json shouldn't have a ColumnGroup in it. The Visualizer should simulate pulling an app logo and display name and not be part of the payload itself
A User can paste in a full Timeline or Bot payload and visualize the adaptive section
Per team meeting on 1/3
Scenario: Toast Notifications have a progress bar in their payloads
"body": [
{
"type": "TextBlock",
"text": "Serious Pie",
"textWeight": "bolder",
"textSize": "medium"
},
**{
"type": "ProgressBar",
"Value": "50"
}**
]
The Renderer should provide some kind of callback to the container to handle generating UI for any unknown types
If a bot developer absolutely requires a v2 renderer, and fallback would not be appropriate, they can add this attribute and the renderer would output something like “Unfortunately this content couldn’t be displayed”
version
is a required property on all payloads.minVersion
is an optional property that allows a developer to declare that their card must only be renderered on a supported version.{
"$schema": "../../schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "99.0",
"minVersion": "99.0",
"fallbackText": "This card requires Adaptive Cards version 99.0, which probably doesn't exist",
"body": [
{
"type": "TextBlock",
"text": "THIS SHOULD NOT APPEAR! It should show the fallback text"
}
]
}
minRequiredVersion
property in the AdaptiveCard
that is higher than the supported version, it MUST return the fallbackText
instead.// TODO: Do we have MRT issues?
// TODO: What about high contrast?
// TODO: LTR and RTL
// TODO: Should we add TileGeneric?
// TODO: Narrator support
{
"branding": "none",
"TileSmall": {
"branding": {},
"visual": [
]
},
"TileMedium": {
"branding": {},
"visual": [
]
},
"TileWide": {
"branding": {},
"visual": [
]
},
"TileLarge": {
"branding": {},
"visual": [
]
}
}
For simple cards they should be able to put TextBlock right inside the AdaptiveCard items. Or a ColumnGroup, or whatever they choose
Should this be built into the renderer or left up to the host app?
// TODO: Handle actions with input
// TODO: What about inputs that don't have actions?
// TODO: Can we go semantic with title, description, etc
{
"@type": "AdaptiveCard",
"title": "Adaptive Card design session",
"description1": "Conf Room 112/3377 (10)",
"description2": "12:30 PM - 1:30 PM",
"body": [
{
"@type": "TextBlock",
"text": "Snooze for"
},
{
"@type": "MultichoiceInput",
"size": "stretch",
"choices": [
{ "display": "5 minutes" },
{ "display": "15 minutes" },
{ "display": "30 minutes" }
]
},
{
"@type": "ActionGroup",
"items": [
{
"@type": "HttpPOST",
"name": "Snooze"
},
{
"@type": "HttpPOST",
"name": "I'll be late"
},
{
"@type": "HttpPOST",
"name": "Dismiss"
}
]
}
]
}
Selecting "Live Tile" shows additional options to choose which Tile Size to the Visualizer will show. E.g., Small, Medium, Wide, Large.
Enum values: top, bottom, both
To visually divide sections
Cortana Scenario: User says "Find a Starbucks", and it presents a customized list of numbered items that the user can choose. They need more than just a "displayName" that we have in the MultiChoiceInput
Allowing a single payload to house multiple Card variations. E.g., a developer could include an AdaptiveCard targeting Skype, an FbCard targetting FB Messenger, and a SpeechCard meant to being read on a headless device.
This should also cover the the Skype scenario where a Card has a Collapsed and FullScreen view, as seen here on Facebook Messenger:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.