BotFramework-Emulator icon indicating copy to clipboard operation
BotFramework-Emulator copied to clipboard

The Input Choiceset type for an adaptive card renders invisible

Open AyoOlubeko opened this issue 9 years ago • 4 comments

When using the input choiceset type adaptive card (http://adaptivecards.io/explorer/#InputChoiceSet), the checkboxes that are rendered in the emulator are invisible and do not show up.

AyoOlubeko avatar May 28 '17 20:05 AyoOlubeko

Hi @AyoOlubeko I'd like to try to repro this. Could you please post the json of the adaptive card message?

eanders-ms avatar May 30 '17 17:05 eanders-ms

Sure thing, relevant code snippet I used below. When you try it out in the emulator, there is no outline of a checkbox when it is rendered, so you'll have to click around until you find where the checkbox is.

var productSelection = new builder.Message(session)
    .addAttachment({
        contentType: "application/vnd.microsoft.card.adaptive",
        content:
        {
            type: "AdaptiveCard",
            body:
            [
                {
                    "type": "TextBlock",
                    "text": "Select an Azure product"
                },
                {
                    "type": "Input.ChoiceSet",
                    "id": "productSelection",
                    "isMultiSelect": true,
                    "style": "compact",
                    "choices": 
                    [
                        {
                          "title": "Azure SQL database",
                          "value": "Azure SQL database"
                        },
                        {
                            "title": "Azure webapp",
                            "value": "Azure webapp"
                        },
                        {
                            "title": "Azure botservice",
                            "value": "Azure botservice"
                        },
                        {
                            "title": "Azure VM",
                            "value": "Azure VM"
                        },
                        {
                            "title": "Azure IOT Hub",
                            "value": "Azure IOT Hub"
                        },
                        {
                            "title": "Other",
                            "value": "Other"
                        }
                    ]
                }           
            ],
            actions:
            [
                {
                    "type": "Action.Submit",
                    "title": "Submit",
                    "data": { "message" : "productSelection"}  
                }
            ]
        }
    });

session.send(productSelection);

AyoOlubeko avatar May 30 '17 18:05 AyoOlubeko

@AyoOlubeko, Thanks for the bug report. I've made a quick fix in CSS. It will be available in the next release.

Side note: Some unintended style bleed is happening here. The emulator's CSS should not affect WebChat's styling. I'll take this as a separate issue.

eanders-ms avatar May 30 '17 21:05 eanders-ms

Fixed in emulator v3.5.31

eanders-ms avatar Aug 01 '17 22:08 eanders-ms