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

Narrow formatting of card responses in embedded version #2885

Closed
gsoper78 opened this issue Feb 6, 2020 · 2 comments
Closed

Narrow formatting of card responses in embedded version #2885

gsoper78 opened this issue Feb 6, 2020 · 2 comments
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. question Further information is requested. Stack Overflow candidate

Comments

@gsoper78
Copy link

gsoper78 commented Feb 6, 2020

We're embedding https://webchat.botframework.com/embed/ in a mobile app and I'm observing that card responses are formatted unnecessarily narrowly compared to returned answers. The following screenshot should illustrate my point:

webchat botframework com_embed_CivicaConferenceApp-Bot_s=jHBNXGn94l0 RjR1uvEaNdZYQfAzrG1dOVffZJMPRNESIImobKdAeJg(iPhone X)

To reproduce this in Chrome, enter Developer Tools, set the device to iPhone X and then ask a question which yields a card with suggested questions. These questions should be reasonable long e.g. "Reasonably long test question 1" and be associated with long answers as per the screenshot.

This behaviour means that card suggestions are often truncated and therefore ambigious (as per the screenshot). If the cards were formatted to the same width as the answers, this ambiguity would often be removed.

Version

To determine what version of Web Chat you are running, open your browser's development tools, and paste the following line of code into the console.

[].map.call(document.head.querySelectorAll('meta[name^="botframework-"]'), function (meta) { return meta.outerHTML; }).join('\n')

If you are using Web Chat outside of a browser, please specify your hosting environment. For example, React Native on iOS, Cordova on Android, SharePoint, PowerApps, etc.

Describe the bug

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Additional context

[Bug]

@gsoper78 gsoper78 added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. Pending customer-reported Required for internal Azure reporting. Do not delete. labels Feb 6, 2020
@corinagum corinagum self-assigned this Feb 6, 2020
@corinagum
Copy link
Contributor

Hi @gsoper78,
Based on your screencaps, you are using the deprecated v3 of Web Chat which is no longer supported beyond security fixes.

I recommend you migrate to v4, where you can use the CDN or npm package of Web Chat to customize your Adaptive Card hostconfig to wrap button title text in the card. Please see the following: microsoft/AdaptiveCards#3416

Please note that embedding (v4) does not allow for the same level of customization that you are looking for. https://github.com/microsoft/BotFramework-WebChat#customize-web-chat-ui

@corinagum corinagum mentioned this issue Feb 6, 2020
37 tasks
@corinagum corinagum added question Further information is requested. Stack Overflow candidate customer-replied-to Required for internal reporting. Do not delete. and removed bug Indicates an unexpected problem or an unintended behavior. Pending labels Feb 6, 2020
@corinagum
Copy link
Contributor

I have added this question to the Web Chat FAQ list regarding changing the length of button title in Adaptive Cards. Closing this issue as answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. question Further information is requested. Stack Overflow candidate
Projects
None yet
Development

No branches or pull requests

2 participants