BotFramework-WebChat
BotFramework-WebChat copied to clipboard
Action.execute (AC 1.4) support Related to #3828
Add support for the Action.Execute command and various flows, including the action/execute invoke and auth flows.
OBI spec is here: microsoft/botframework-obi#128
Hacked up webchat that can do AC 1.4 cards: https://github.com/clearab/CateringDemo
Tracking status
- [ ] PR
- [ ] Merged
@kaerm when will the schema spec be merged in?
semi-dupe of #3828
not sure if there is a specific date. @clearab might know
@compulim I'm assuming it's safest to wait until the schema is updated - thoughts?
@DDEfromOR @p-nagpal Is there any info from the service side on a schedule for supporting this on DirectLine?
DirectLine currently supports the 1.4 protocol, it is necessary for the new Outlook and Search channels. The 1.4 schema itself is already GA.
@Jeffders has done the work on the service/DirectLine side.
Sorry for the confusion, folks. Spoke with DDEfromOR offline and he clarified about the service/DirectLine side. I've added this to R14 candidates (which was the hopeful plan already), and we'll probably consolidate this with 3828 in the next several days. :)
The latest version of adaptivecards
package on NPM is 2.9.0
as of now. The README only say it support up to 1.3, but not 1.4.
We generally wait until our deps is in production before we move to the newer version. It reduce risks on our customers, also reduce risks on release. But sometimes, we will simul-ship (2+ products goes to production at the same time), usually, if the management think a bigger splash outweigh its risks, or, if we can take the opportunity to provide feedbacks for them.
As we are close to Build, please let us know sooner. From our experiences, bumping AC usually takes us a few days due to breaking changes or accessibility issues. As AC 1.4 introduce new features, it will also requires new code, i.e. more time to integrate, plus upgrading our test bot to support new commands.
Checked with the team, 2.9 is supposed to support 1.4.
The table in the readme is mapping prior versions to card schema versions - I do know that Teams, Outlook, and Search are all rev'ing to support 1.4 schema cards by build.
Please let us know when the spec is finalized. David from Adaptive Cards team is still commenting on the spec.
Do you know if there are any sample apps on how to use Adaptive Cards renderer 2.9 with Action.Execute
? I mean, I know how it works on the protocol level, but I don't know how to use the 2.9 package and integrate it with the protocol.
The spec is as finalized as it is going to be for this iteration I believe - Teams, Outlook, and Search are all building to it. We can schedule a meeting with David if you've got specific questions you need answered, and probably connect you with the folks doing the Teams implementation.
For the app, I believe @Jeffders has a couple working demo apps for this (and can probably also help answer any spec questions).
List of stuff we do after Adaptive Cards rendered the card (from adaptiveCardRenderer.js
):
- (Accessibility) AC root container support tap action. If it is set, end-user can (use a pointer) to click to activate the action
- However, it does not support ENTER or SPACEBAR, we added code to handle
keypress
- However, it does not support ENTER or SPACEBAR, we added code to handle
- (Accessibility) End-user pushed a button on the AC, we will set a few ARIA attributes
-
aria-press="true"
-
role="button"
(when rendered by AC, it setrole="menuitem"
) - If end-dev provided
actionPerformedClassName
, we will set it to the buttonclassName
after the button is pushed - Q to AC team: Why at the first place, the list of action buttons is grouped as
role="menubar"
?
-
- Disable/enable all widgets in Adaptive Cards
- If the dev set Web Chat control to disabled, we will also disable all widgets in the AC
- If the card is re-rendered, we will save/restore input values and focus (
document.activeElement
)- For example, if
actionPerformedClassName
ordisabled
is changed
- For example, if
- (Accessibility) Setting RTL in
useParseAdaptiveCardJSON.ts
- After
AdaptiveCard.parse
, we callupdateRTLInline
to walk the AC-specific DOM tree to addrtl
property to every element of typeAdaptiveCard.Container
- After
Extra notes:
- If the card refreshed by the bot failed validation, what should we do?
- Today, if the (initial) card failed validation, we will show an error
- Some actions are handled differently
-
Action.OpenUrl
(default, it will becomewindow.open
) -
Action.Submit
becomepostBack
andimBack
- End-devs can provide an override for these default actions, including disabling them
-
@compulim did this ever get implemented? I thought I remembered seeing that support for 1.4+ and action.execute was added.
Any news about this? How can we use Action.Execute with botframework-webchat ?
Getting the error react_devtools_backend_compact.js:2367 Web Chat: received unknown action from Adaptive Cards with botframework-webchat 4.15.7
any updates on this issue?
Me too . Web Chat: received unknown action from Adaptive Cards