-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Using word-wrap in Adaptive Cards ActionSet and markdown list #4075
Comments
@compulim could you please triage? |
Thanks @avrum for the repro, this is very useful. Will investigate. |
@compulim you're welcome :) |
Some early investigations. I have a tool called "Adaptive Card loader", which load AC JSON outside of Web Chat. But also have an option to pass styling (a.k.a. AC Host Config). I use it to verify if it is an issue on AC vs. Web Chat. Here is my quick tool, https://compulim.github.io/adaptive-card-loader/. Check the "Enable Markdown" checkbox. With default styling, the But if I manually removed Need more investigations to see if it's AC vs. Web Chat. |
Status: InvestigatedBackgroundAdaptive Card Designer has this CSS rule and it assume the hosting app must run in #designerRootHost * {
box-sizing: border-box;
} However, in Web Chat, we never assume our host is in SolutionsI need some time thinking if we should do one of the followings: Web Chat: add the following CSSTo workaround, or to align with AC's expectation of its host always in .ac-container * {
box-sizing: border-box;
} Or .ac-textBlock * {
box-sizing: border-box;
} Or .ac-textBlock ol, .ac-textBlock ul {
box-sizing: border-box;
} Sidenote: AC is extensible and support custom controls. If we use Adaptive Cards: don't assume host is always in
|
@compulim - adding this to the backlog since it seems like you have a couple of options for resolutions. |
I just reached David from AC team and they suggest adding I will add the following CSS stylesheet: .webchat__adaptive-card-renderer {
box-sizing: border-box;
} One more thing, this bug only applies to Adaptive Cards when the first element of the Markdown is a list. It repro: {
"type": "TextBlock",
"text": "- The is a very long text, one two three four five six seven eight nine ten, eleven twelve thirteen fourteen .\n\n- The is a very long text, one two three four five six seven eight nine ten, eleven twelve thirteen fourteen .\n\n- The is a very long text, one two three four five six seven eight nine ten, eleven twelve thirteen fourteen .\n\n",
"wrap": true
} And it don't repro: {
"type": "TextBlock",
"text": "Hello, World!\n\n- The is a very long text, one two three four five six seven eight nine ten, eleven twelve thirteen fourteen .\n\n- The is a very long text, one two three four five six seven eight nine ten, eleven twelve thirteen fourteen .\n\n- The is a very long text, one two three four five six seven eight nine ten, eleven twelve thirteen fourteen .\n\n",
"wrap": true
} |
While fixing the issue, I found that AC is applying some styles only for the first child element. These styles are not added by Markdown-It but Adaptive Cards. Since Web Chat don't have a test that only a single list in Adaptive Card, thus, we never catch this bug. I am adding a test to prevent regression. @avrum a temporary workaround here would be adding a line of text before the list. Technical detailsIf the Markdown list is the first thing in the
If paragraph is the first thing in the MarkdownIf unordered list is the first thing in the Markdown |
Thank you guys for fixing this issue, |
Thanks again for fixing this 🪲 👏 |
I've been having issue with word-wrap property when using ActionSet with mark down list.
For some reason when I'm including a markdown list in the "ShowCard" the text get the wrap property but the boundaries seems to be shifted to the right.
screenshot that demonstrate this issue:
When viewing in in dev mode (marking the component edge):
This works as expected without the bullets(list), but I need this design to work with bullets
The original card JSON:
This seems to work as expected in "https://adaptivecards.io/designer/" :
but in BotFramework-WebChat recent version it doesn't work as expected, and we have lots of customers suffering from this bug
The text was updated successfully, but these errors were encountered: