microsoft / microsoft/BotFramework-WebChat
Turing: Extending Adaptive Cards using AC extensibility feature
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 1.6k
- Avg merge
- 22h 58m
- Merged PRs (30d)
- 2
Description
Background
Show how to use AC JavaScript extensibility in Web Chat, as a sample.
Goals
- Load a custom version of Adaptive Cards
- From https://unpkg.com/adaptivecards@1.2.6/dist/adaptivecards.min.js
- In
README.md, please also mention, this work can allow devs to load different versions of Adaptive Cards- By different, it should have similar behaviors as the one shipped in Web Chat, that means, same minor version
- Load the AC extensibility sample in the custom-loaded AC package
- Keep the
ProgressBarcomponent as original as possible- Keep TypeScript, use
@babel/standaloneto transpile TypeScript on-the-fly@babel/standaloneprobably not support TypeScript by default- You can register additional plugin/preset with
@babel/standalone, some references
- The AC sample is currently not working because
Adaptive.getStringValueOrDefaultandAdaptive.getValueOrDefaultare not implemented, please ping David Claux to fix them
- Keep TypeScript, use
Non-goals
- Turn into a NPM project
- This sample is simple enough to be kept as a NPM project
Action items
Implement https://docs.microsoft.com/en-us/adaptive-cards/sdk/rendering-cards/javascript/extensibility in Web Chat as a sample.
+ <script crossorigin="anonymous" src="https://unpkg.com/adaptivecards@1.2.6/dist/adaptivecards.min.js"></script>
+ window.AdaptiveCards.AdaptiveCard.elementTypeRegistry.registerType('ProgressBar', () => new window.WebChatSample.ProgressBar());
window.WebChat.renderWebChat(
{
+ adaptiveCardsPackage: window.AdaptiveCards,
directLine: window.WebChat.createDirectLine({ token })
},
document.getElementById('webchat')
);
Prototype

Very preliminary POC for this sample in this sample.zip.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with README.md and the provided sample.zip, then trace the sample's window.WebChat.renderWebChat entry point and Adaptive Cards registration. Done means demonstrating the JavaScript extensibility sample with a custom Adaptive Cards package, preserving the TypeScript ProgressBar, documenting compatible versions in README.md, and addressing the missing Adaptive.getStringValueOrDefault and Adaptive.getValueOrDefault behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, html, javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100