Skip to content

Issue with hero card template and message back action - missing display text in chat  #2933

@bisercic89

Description

@bisercic89

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]

Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.bugIndicates an unexpected problem or an unintended behavior.customer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions