-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Provide ability to modify adaptiveCardHostConfig #2034
Comments
I'll investigate this at the same time I'm working on updating our host config. #1964 |
Lol @tdurnford figured it out below |
@compulim What are the steps for providing a new host config? |
I was able to change the AdaptiveCard button orientation, but I had to recreate the entire config to maintain the rest of Web Chat's styling options since Web Chat does not provide the ability to merge config settings. Here are the code snippets I used: Custom Host Config const adaptiveCardHostConfig = {
"hostCapabilities": {
"capabilities": null
},
"choiceSetInputValueSeparator": ",",
"supportsInteractivity": true,
"fontTypes": {
"default": {
"fontFamily": "Calibri, sans-serif",
"fontSizes": {
"small": 12,
"default": 14,
"medium": 17,
"large": 21,
"extraLarge": 26
},
"fontWeights": {
"lighter": 200,
"default": 400,
"bolder": 600
}
},
"monospace": {
"fontFamily": "'Courier New', Courier, monospace",
"fontSizes": {
"small": 12,
"default": 14,
"medium": 17,
"large": 21,
"extraLarge": 26
},
"fontWeights": {
"lighter": 200,
"default": 400,
"bolder": 600
}
}
},
"spacing": {
"small": 3,
"default": 8,
"medium": 20,
"large": 30,
"extraLarge": 40,
"padding": 10
},
"separator": {
"lineThickness": 1,
"lineColor": "#EEEEEE"
},
"imageSizes": {
"small": 40,
"medium": 80,
"large": 160
},
"containerStyles": {
"default": {
"foregroundColors": {
"default": {
"default": "#000000",
"subtle": "#767676",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"dark": {
"default": "#000000",
"subtle": "#66000000",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"light": {
"default": "#FFFFFF",
"subtle": "#33000000",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"accent": {
"default": "#0063B1",
"subtle": "#0063B1",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"good": {
"default": "#54a254",
"subtle": "#DD54a254",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"warning": {
"default": "#c3ab23",
"subtle": "#DDc3ab23",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"attention": {
"default": "#FF0000",
"subtle": "#DDFF0000",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
}
},
"backgroundColor": "#FFFFFF"
},
"emphasis": {
"foregroundColors": {
"default": {
"default": "#000000",
"subtle": "#767676",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"dark": {
"default": "#000000",
"subtle": "#66000000",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"light": {
"default": "#FFFFFF",
"subtle": "#33000000",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"accent": {
"default": "#2E89FC",
"subtle": "#882E89FC",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"good": {
"default": "#54a254",
"subtle": "#DD54a254",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"warning": {
"default": "#c3ab23",
"subtle": "#DDc3ab23",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
},
"attention": {
"default": "#FF0000",
"subtle": "#DDFF0000",
"highlightColors": {
"default": "#22000000",
"subtle": "#11000000"
}
}
},
"backgroundColor": "#F0F0F0"
}
},
"actions": {
"maxActions": 100,
"spacing": "Default",
"buttonSpacing": 8,
"showCard": {
"actionMode": "Inline",
"inlineTopMargin": 8,
"style": "emphasis"
},
"preExpandSingleShowCardAction": false,
"actionsOrientation": "horizontal",
"actionAlignment": "Stretch",
"wrap": true
},
"adaptiveCard": {
"allowCustomStyle": false
},
"imageSet": {
"maxImageHeight": 100
},
"media": {
"allowInlinePlayback": true
},
"factSet": {
"title": {
"size": "Default",
"color": "Default",
"isSubtle": false,
"weight": "Bolder",
"wrap": true
},
"value": {
"size": "Default",
"color": "Default",
"isSubtle": false,
"weight": "Default",
"wrap": true
},
"spacing": 8
},
"cssClassNamePrefix": null,
"_legacyFontType": {
"fontFamily": "Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif",
"fontSizes": {
"small": 12,
"default": 14,
"medium": 17,
"large": 21,
"extraLarge": 26
},
"fontWeights": {
"lighter": 200,
"default": 400,
"bolder": 600
}
}
}; Web Chat
Screenshot |
Awesome, thanks @tdurnford. We should document this. I'll reassign it to myself and add that to our root README.md |
@tdurnford @corinagum .. Example 2 please explain this behavior .. or is there a bug/mistake somewhere ??? |
This bug has been fixed and will be available in our next release in July. If you need these changes immediately, please see our documentation on pointing to our MyGet feed for latest bits. |
Could you please specify a date ?? |
I don't believe there is a definite date at the moment, but it should be in the next few weeks. I will be sure to follow and let you know. |
I'm trying to modify the actionsOrientation. I've tried providing just a subset:
Result:
I also tried providing the entire adaptiveCardHostConfig:
Result:
Version
https://cdn.botframework.com/botframework-webchat/latest/webchat.js
Describe the bug
Cannot figure out how to modify the Adaptive Card Host Config.
[Bug]
The text was updated successfully, but these errors were encountered: