Botframework-webchat: Issue with hero card template and message back action - missing display text in chat

Created on 21 Feb 2020  Â·  4Comments  Â·  Source: microsoft/BotFramework-WebChat

Version

Version 01.getting-started/a.full-bundle - Full Bundle Demo - localhost
(google chrome - Version 80.0.3987.116 (Official Build) (64-bit) browser)

name="botframework-directlinespeech:version" content="4.7.1"
name="botframework-webchat:bundle:variant" content="full"
name="botframework-webchat:bundle:version" content="4.7.1"
name="botframework-webchat:core:version" content="4.7.1"
name="botframework-webchat:ui:version" content="4.7.1"

Describe the bug

Issue with hero card template and message back action inside template defined as /__tests__/__image_snapshots__/chrome-docker/rich-cards-js-hero-card-1-snap.png.

Expected behavior :
button messageBack Action with displayText should display text and show posted value/text
button messageBack Action with no display text should display only posted value/text.

Current behavior: both buttons display only posted values(check image)
HeroCaro - No difference between two message back button

Bug noticed during implementation of web chat channel based on existing chat bot which is currently in use inside Facebook channel. Issue verified using provided test samples in this repository.

Steps to reproduce

  1. start 01.getting-started/a.full-bundle - Full Bundle Demo on localhost
  2. type help
  3. search for hero card template and press button "Show hero card"
  4. scroll down to the bottom of the chat
  5. press button messageBack Action with display text
  6. button messageBack Action with no display text

Expected behavior

We should have different behavior for buttons. Button messageBack Action with display text
should have same output as it is already implemented and presented inside test __tests__\hooks\useSuggestedActions.js.
suggested actions
meesage back with json as result

Additional context

Template with hero card should display info text to the user, and submit different text to the bot (or payload as more complex value).
PostBack action type is not resolving an issue, because we need to show user that action was performed, and message needs to be different.
Behavior should be the same as it is already implemented and presented inside test __tests__\hooks\useSuggestedActions.js

This is example of an attachment from project which should work as described when it rendered in web chat: PayloadData submitted to the back end, and user should be able to see message "Check my booking – display text "
"attachments": [
{
"contentType": "application/vnd.microsoft.card.hero",
"content": {
"title": "Check my booking",
"buttons": [
{
"type": "messageBack",
"title": "Check my booking",
"text": "Check my booking - text",
"displayText": "Check my booking – display text ",
"value": "{'PayloadData':'simplePayload'}"
}
]
}
Changes in file which resolved an issue on localhost but side effects of changes unknown.
file - packages\bundle\src\adaptiveCards\Attachment\AdaptiveCardRenderer.js
image

[Bug]

Bot Services Bug customer-replied-to customer-reported

Most helpful comment

This is a bug we should fix, will triage.

IMO, this is different than #1582, because that bug talks about "switching from postBack to messageBack". But this bug talks about "the messageBack behavior is incorrect".

All 4 comments

@bisercic89 Thank you for the detailed report. I am reviewing your content now and will get back to you shortly.

Related to #1582
Team discussion is ongoing :)

This is a bug we should fix, will triage.

IMO, this is different than #1582, because that bug talks about "switching from postBack to messageBack". But this bug talks about "the messageBack behavior is incorrect".

I've added this as a triage item to discuss what milestone we'll be able to address this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

compulim picture compulim  Â·  3Comments

filipjakov picture filipjakov  Â·  4Comments

naveen-vijay picture naveen-vijay  Â·  4Comments

mmalaiarasan-conga picture mmalaiarasan-conga  Â·  3Comments

stevengum picture stevengum  Â·  4Comments