Skip to content
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

Streaming extensions: Difference in handling Adaptive Cards #125

Closed
compulim opened this issue Sep 4, 2019 · 4 comments
Closed

Streaming extensions: Difference in handling Adaptive Cards #125

compulim opened this issue Sep 4, 2019 · 4 comments
Assignees
Labels
Azure Bot Service P1 Streaming Extensions Related to Streaming Extesnsions

Comments

@compulim
Copy link

compulim commented Sep 4, 2019

Background

We send Adaptive Cards from a bot, but the result is different if the AC JSON is sent through Streaming Extensions vs. Web Socket.

The original JSON sent from the bot can be found at https://github.com/compulim/BotFramework-MockBot/blob/master/src/commands/Cards/Inputs.ts.

The screenshot shows JSON captured through network trace.

  • Left one is Adaptive Cards sent through Streaming Extensions, same as raw JSON
  • Right one is Adaptive Cards sent through Direct Line channel, altered

image

  • Left one is through SE, with the Input.ChoiceSet in "compact" mode
  • Right one is through Web Socket, with the Input.ChoiceSet in "expanded" mode

image

Looks like in SE, if style is not set, it default to compact. But in Web Socket, if it is unset, it default to expanded (set explicitly through Direct Line channel).

Reproduce

  1. Go to https://compulim.github.io/webchat-loader
  2. Click "Dev" on the version
  3. Select "MockBot"
  4. Click "Open Web Chat in new window"
  5. Type "card inputs"
  6. Observe the output
  7. Open https://compulim.github.io/webchat-loader again
  8. This time, select "MockBot with Streaming Extensions"
  9. Click "Open Web Chat in new window"
  10. Type "card inputs"

Expected result

They are the same. Either both in expanded state or compact state.

I am unsure if we should change the current behavior. But sending the JSON as raw as possible sounds like a better idea to me. But on the other hand, we should not change users' expectations.

Additional context

It is probably related to this, #87 (comment).

@compulim compulim added the Streaming Extensions Related to Streaming Extesnsions label Sep 4, 2019
@swagatmishra2007
Copy link
Member

Documentation needs to be updated to highlight the difference in behaviour between directline and dl-ase

@mickeydjw
Copy link

@Jeffders Any updates on this issue?

@jameslew
Copy link

Updating documention coming shortly per @DDEfromOR

@Jeffders
Copy link
Member

Documentation is now merged. Thanks @DDEfromOR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure Bot Service P1 Streaming Extensions Related to Streaming Extesnsions
Projects
None yet
Development

No branches or pull requests

6 participants