Giter Site home page Giter Site logo

microsoftdocs / adaptivecards Goto Github PK

View Code? Open in Web Editor NEW
72.0 24.0 137.0 12.44 MB

Docs for Adaptive Cards

Home Page: https://docs.microsoft.com/en-us/adaptive-cards/

License: Creative Commons Attribution 4.0 International

PowerShell 12.61% CSS 87.39%
adaptive-cards

adaptivecards's People

Contributors

alexbuckgit avatar almedina-ms avatar andrewleader avatar chenhao2020 avatar cillroy avatar cmcclister avatar compulim avatar corinagum avatar dclaux avatar dcthegeek avatar eschavez avatar jeanroca avatar jwoo-msft avatar kcpitt avatar learn-build-service-prod[bot] avatar matthidinger avatar meganbradley avatar microsoft-github-policy-service[bot] avatar mollyd26 avatar paulcam206 avatar rahulamlekar avatar riarenas avatar shalinijoshi19 avatar sowrabh-msft avatar stephenbrentpeters avatar tfosmark avatar tony-xia avatar v-kents avatar v-vafune avatar vivekvijayakrishnan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adaptivecards's Issues

Is this the correct way to use AdaptiveCard in a LUIS BOT C#?

Is this the correct way to use it in a LUIS BOT C#?
I am getting error message that: Sorry, my bot code is having an issue. Please help!

[LuisIntent("ScheduleAnAppoitment")]
public async Task ScheduleAnAppoitmentIntent(IDialogContext context, LuisResult result)
{

    var replyMessage = context.MakeMessage();
    var json = await GetCardText("a");

    AdaptiveCardParseResult cardParseResult = AdaptiveCard.FromJson(json);

    replyMessage.Attachments.Add(new Attachment()
    {
        Content = cardParseResult.Card,
        ContentType = AdaptiveCard.ContentType,
        Name = "Card"
    });

    await context.PostAsync(replyMessage);

}
public async Task<string> GetCardText(string cardName)
{
    var path = HostingEnvironment.MapPath($"/Cards/{cardName}.json");
    if (!File.Exists(path))
        return string.Empty;

    using (var f = File.OpenText(path))
    {
        return await f.ReadToEndAsync();
    }
} 

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Is there a service converting Adaptive Card to an image?

I’ve recently worked on project integrating bot to another channel using directline and handling adaptive card is the huddle at the moment.
Is there any service or future support plan for converting adaptive card to an image?
Due to the limitations of the message format supported by that channel, it is not possible to transform the contents of the adaptive card into the proper format.
I’ve checked that Facebook messenger support adaptive card by converting it to an image.
(Link: https://stackoverflow.com/questions/48313198/adaptive-cards-are-converted-to-image-in-facebook-messenger )
There is a similar discussion on stack overflow. ( https://stackoverflow.com/questions/49242790/adaptive-card-image )

Unable to view adaptive card with multiple Input.Choice schema

Hi I'm unable to view adaptive card with multiple Input.Choice schema. I'm able to view a card with single Input.Choice schema but unable to do so for an adaptive card with multiple schema. I'm using 3 android phones. Google Pixel XL, Google Pixel 3, and Sony Xperia XZ1. The cards work fine with iPhones.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Coming "soon"

Hi guys,

What does coming "soon" mean? Over a year has passed since there was an update on native styling for UWP. Thanks in advance for any hints!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Render2Image

Is the Render2Image available anywhere? From what I can see the webpage doesn't exist anymore.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Windows Timeline (Spring Creators Update)

Is it please possible to show the full code to implement the code in UWP and timeline?
This code has unknown variables. Thanks, Dennie


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Adaptive Card on Facebook

I have been using AdaptiveCard on Facebook Messenger, using the rendered image, but now it's not working properly all of a sudden. The rendered image is not clickable and has a zoom that doesn't allow it to be seen in it's totality. Any idea on why this started happening?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

When Adaptive card supports for MS Teams?

Hi,
I'm diving in developing a Bot with MS Teams channel, my bot will be deployed both on PC and mobile Teams app. However, when I intended to create a card which allows users to pick a date time, then I have no idea with it. I've searched a lot about Adaptive Cards and O365 Connector Cards, but only O365 Connector Card work for me because Adaptive cards are only supporting in Dev Preview version at present.
I just wondered when Adaptive card supports for MS Teams? It will really helps me a lot.

Thanks in advance! :)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

I'm looking for something I don't find anywhere in all documentation.

I'm doing a service app which will gather data from SQL and send an AC but I've been told to put the script in the head tag however how can I show the body html BEFORE the adaptive card because when in the head, I can't have the card after the html.

why I'm asking is because the customer wants to read the detail of the approval BEFORE going on and click Approve or Reject


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Markdown Lists

The bullet list and numbered list do not render as described in web chat or in bot framework emulator. The number or bullet is not shown and spacing is not correct.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Error with msTeams

Excuse me but i can't use the adapatative card for my Bot in teams. Return ERROR 400 Bad Request. Why this ? This adaptative card works in Bot framework emulator


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Perpetually "Coming Soon"???

This page has said "Coming soon" for nearly a year. PLEASE create the documentation soon!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bucketlist of improvements

Have you ever used the ability for Docs to share markdown content between pages? I feel like our SDKs table would be a great use case for doing that, versus copy/pasting it everywhere. We also have “Learn more” on many pages that I just copy-paste. Would be cool if we could author and update that in one place and all the pages benefit.

For example, on Getting Started – Bots, we have Platform SDKs which is outdated. Should prob just show our standard SDK table here and link to the SDKs page?

Speaking of the SDKs page, do you think we should add an Overview file to the SDK root? Which would show a unified table of SDKs? Are we currently showing that table anywhere? The one with install badges, build badges, etc

Other thoughts, the thing I love about google’s card docs is heavy use of images paired for the text.
E.g., our first example card shows JSON and no idea of what it renders as, leaving that as an exercise for the reader.
https://review.docs.microsoft.com/en-us/adaptive-cards/authoring-cards/getting-started?branch=master#example-card

Other thought: we could also add a Try it Yourself to all JSON payloads. I wonder if that’s easy to create a Docs control that does that automatically?

We should file an issue to improve the Extensibility page with maybe a JSON snippet of an extended card and a sample C# or JS showing it?

Last thought, there is some good content buried under “Resources” – any thoughts on how we could maybe surface that content better without hiding it under a pretty generic term?

Base64 image not rendering in WPF

Is it a known issue that base64 image is not rendering on WPF client? if yes then lets know when this issue will be fixed and if no please share the solution.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Spelling Mistake

Instead of rendererdCard.Warnings; it must be renderedCard.Warnings;


Document details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Training Manager

Hi Team,

When will AdaptiveCards be available in Skype for Business?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Code sample on UWP Client

Would it be possible to provide a code sample on UWP client to demonstrate how the adaptive card be rendered? Thanks.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Input.Date

Max and min attributes are not working with adaptive card in microsoft teams,
I am using node sdk

Hyperlink mardown feature doesn't work in bot framweork emulator

This markdown feature in - Hyperlinks Title doesn't seem to work in bot framweork emulator


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Adaptive Card - Carousel Navigation Issue

We are implementing the adaptive carousel cards. We have noticed that when the user clicks on the navigation arrows left or right multiple times that the slide function visually stops between 2 cards. Has this been addressed?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

schema location should be https

for vscode the reference should be https...
{
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": []
}


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

selectAction property didn't work on iOS Teams app

I'm developing a chat bot, using MS Teams as a channel on both desktop app and mobile app. I also use MS Bot Framework, which have supported Adaptive Cards already. Everything just worked smoothly until 30' ago, i did updated the latest version of MS Teams on iOS device. Then, selectAction property of my Adaptive Cards didn't work anymore.
I think maybe MS had a mistake while releasing this version.

Could anyone help me, or to raise this issue on MS teams at least?

Thanks in advance!

Code sample on .NET HTML Client on rendering adaptive card

Would .NET HTML rendering also apply to Razor page of MVC?

Would it be possible to provide a code sample on .NET HTML client to demonstrate how the adaptive card be rendered? Thanks.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

How to parse data from Action.Submit?

I am trying to use adaptive cards in a waterfall scenario to get a decision from the user. How can I use the adaptive card in prompts to parse the entered data? I use the "Action.Submit" action to send the data from the adaptive card to the bot. This dcoumentation (https://docs.microsoft.com/en-us/healthbot/scenario-authoring/adding-cards#getting-data-from-forms) talks about using the adaptive card in a prompt but I can't seem to leverage the sparse information. Thank you!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ChatBot in "talk to our Scuba Bot" link is not working

When I click "talk to our Scuba Bot" link, I navigate to new link however embeded webUI for chat is not working.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

No info on how to change card's values

Here we have "Example: Parse an AdaptiveCard from JSON", but there's no information about how I can change the parsed card values. If I load the JSON schema taken from the Adaptive Cards Designer (https://adaptivecards.io/designer/), the values there are just sample values from the Designer. I need to change them. Maybe I could find an element by its id, but how?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Can you add a Getting Started for Swift?

I get it, the library is originally for Objective-C, but I find the usage for Swift quite confusing. For instance, I don't understand the importing of the library inside my controller, and since I can't do that, I'm unable to see if my code is actually working (spoiler: it isn't compiling either).


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Xamarin Support

Very disappointed that although there is support for Android/Java and iOS/Swift, there is no support for Xamarin.Android, Xamarin.iOS or Xamarion.Forms. As Xamarin is a Microsoft technology, it should have been supported out of the box from day 1. Instead for Xamarin developers, this is just a specification to define a visual object in JSON, which we have to deserialize and then create a complete custom renderer from scratch.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Multiple adaptive cards in one email sent via c# SMTP

We have a need to have HTML detail information of approval first then a card to accept or reject and this multiple times in one single email so we don't have to send one card in 10 emails that the boss needs to approve. Is that possible because I can't find any information about it.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Platform feedback

We're very interested in Actionable Messages in particular, but also Adaptive Cards in Teams. Our back-end systems are Java, so a templating engine based around Apache Velocity would be great for us.

With regards to front-end development we currently use AngularJS, and will be upgrading to Angular in the near future - but we are open to implement ReactJS too.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Is Type really not required?

Most of the elements say that "type" is not required - is this correct? i.e. How can you create a TextBlock if you do not set the type to "TextBlock"?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

MS Teams Adaptive Cards Support [Question]

Hello Everyone,

I need to know when Adaptive Cards is supported for MS Teams (NodeJS).
Now the state is "Coming Soon".

Does anyone know when the state is "coming soon"?

Thanks 👍

Outdated schema

Seems the schema in this article is out of date. The newer one is at https://github.com/Microsoft/AdaptiveCards/blob/master/samples/v1.0/HostConfig/sample.json.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

What elements do you want or need?

I would like an element for containing meta data. This element would be ignored by a render, but could be used by bots to modify or enhance behavior. For example, I want a citation notice in the card about the card itself (and other Dublin Core see http://www.ietf.org/rfc/rfc5013.txt ).


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Page link broken

https://github.com/Microsoft/AdaptiveCards/blob/master/samples/v1.0/HostConfig/sample.json is not found mentioned for sample HostConfig json


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Use User Input in an Adaptive Card

Is there a way to build adaptive cards "on the fly"? I am looking for a way to display user input to the user in a more aesthetic way than just sending a text message like:

"Your profile:
Name: John Doe
Age: 30
Profession: Student"

Enhencement...

When we change a property in the right pane for an object, let say an Action.OpenURL, nothing changes in the view until we go in the json payload and just change something there will trigger a refresh of the preview. It would be good to make sure that the preview shows exactly what we change regardless where we change it.

https://acdesignerstaging.azurewebsites.net/

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

renderedAdaptiveCard.FrameworkElement != null even attachment.Content != null

The Bot is ContosoScuba, in following code sample, after render, renderedAdaptiveCard.FrameworkElement = null, no matter either generate card by .FromJson() or .FromJsonString(). Please comment on how to generate var card. Thanks.


    //This method is responsible for handling messages from bot:
    async Task ReadBotMessagesAsync(DirectLineClient client, string conversationId)
    {
        var renderer = new AdaptiveCardRenderer();

        //You can optionally set watermark - this is last message id seen by bot
        //It is for paging:
        string watermark = null;


        while (true)
        {
            //Get all activities returned by bot:
            var activitySet = await client.Conversations.GetActivitiesAsync(conversationId, watermark);
            watermark = activitySet?.Watermark;

            //Extract the activies sent from our bot.
            var activities = from x in activitySet.Activities
                                      where x.From.Id == botId
                                      select x;

            //Iterate through all activities:
            foreach (Activity activity in activities)
            {
                // Extract each attachment from the activity.
                foreach (Attachment attachment in activity.Attachments)
                {
                    switch (attachment.ContentType)
                    {
                        // Display a adaptive card.
                        case "application/vnd.microsoft.card.adaptive":
                            if (attachment.Content != null && !string.IsNullOrEmpty(attachment.Content.ToString()))
                            {
                                string jStr = attachment.Content.ToString();
                                var card = AdaptiveCard.FromJsonString(jStr);
                                var renderedAdaptiveCard = renderer.RenderAdaptiveCard(card.AdaptiveCard);
                                if (renderedAdaptiveCard.FrameworkElement != null)
                                {
                                    myGrid.Children.Add(renderedAdaptiveCard.FrameworkElement);
                                }
                            }
                            break;
                    }
                }
            }
          
            await Task.Delay(TimeSpan.FromSeconds(2)).ConfigureAwait(false);
        }
    }

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Add Input.Password

Can we have a new input type for password type of fields. It can be helpful to get the user credentials directly from the bot itself.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Need better documentation for ElementRenderers 'Set' method

What are the 'types' I can override the rendering of besides TextBlock? Is it based on the Card Schema? Can I override the Action Button rendering?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Adaptive cards on Skype

When do you guys expect the adaptive cards to be ready on skype? got a couple of customers that saw it interesting and the limitation found was the unavailability on skype.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Embed type

There are several interesting presentation scenarios that could be achieved with card that embeds some website. This would not necessarily have to allow embedding of any website, but instead gradually add support for more popular ones (e.g. YouTube, Twitter, PowerBI etc.)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AdaptiveShowCardAction event only fires if HostConfig ShowActionMode is Popup

See HostConfig and ShowActionMode


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

metadata

Can we add an object in card scope for metadata that would be ignored by renderers but could be used by hosts for behavior extensions?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Very sparse documentation

This documentation doesn't say anything about how to override any behavior or rendering, i.e., what exactly do you have to do to, say, change which DOM elements are used.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.