AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

BUG: "..." not added when using list markdown

Open qpongo opened this issue 9 years ago • 6 comments

Text clipping is not consistent for text lines. I would expect that a clean cut with "..." to be added regardless of the markup being used.

Repro: add a "TextBlock" with too much text to display on the line and use some line markdown -- e.g. [1. or *] Expected: see "..." after clipped text Actual: cut in the middle of a character

image


{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "0.5",
    "body": [
        {
            "type": "TextBlock",
            "size": "medium",
            "text": "dot blah dot blah dot blah dot blah dot blah dot blah dot blah "
        },
        {
            "type": "TextBlock",
            "size": "medium",
            "text": "* no dot blah no dot blah no dot blah no dot blah no dot blah no dot blah no dot blah ",
            "maxLines": 1
        },
        {
            "type": "TextBlock",
            "size": "medium",
            "text": "1. no dot blah no dot blah no dot blah no dot blah no dot blah no dot blah no dot blah "
        }
    ]
}

qpongo avatar Jul 05 '17 06:07 qpongo

Thanks for reporting. text-overflow: ellipsis needs to be applied to <li> tags after markdown processing. However, that needs to be accompanied with overflow: hidden which will also hide the bullet unless list-style-position: inside is specified on the <li> tag, but that has the effect of increasing the indent. Is that acceptable?

dclaux avatar Jul 05 '17 06:07 dclaux

dclaux - opinions are like armpits -- everybody has them and most of them smell.... ;)

That being said, my opinion is.... I think that the indent size in general should be reduced so adding more is not good. We're usually fitting to such a small size so forcing more space isn't so useful.

qpongo avatar Jul 06 '17 20:07 qpongo

@dclaux by "increasing the indent", do you mean the end of line space? This is what I got with the given card payload. Notice the second line is a bit shorter than the first one. markdown-ellipsis

tuanh118 avatar Aug 14 '18 18:08 tuanh118

@dclaux assigning to you for fixing + closure for now

shalinijoshi19 avatar Apr 09 '19 16:04 shalinijoshi19

@dclaux confirming this still repro's in latest master builds (confirmed in the Designer off of http://adaptivecards-ci.azurewebsites.net/designer/. Does this need to come in for 1.2 or can it come in later?

shalinijoshi19 avatar Apr 11 '19 21:04 shalinijoshi19

I don't believe this is high priority. Doing buletted lists without wrap seems like an unlikely scenario. I am also not a huge fan of post-processing Mardown output.

dclaux avatar Apr 12 '19 23:04 dclaux