AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

Inconsistent image size rendering in ImageSet web Visualiser

Open mrbrennonwilliams opened this issue 9 years ago • 4 comments

With the following JSON either the ImageSet imagesSize property should override the individual image size property or each image size should be honoured. The inconsistency is evident in the WPF visualiser as opposed to the web visualiser:

{ "type": "AdaptiveCard", "body": [ { "type": "ImageSet", "images": [ { "type": "Image", "size": "medium", "url": "http://adaptivecards.io/content/cats/1.png", "altText": "" }, { "type": "Image", "url": "http://adaptivecards.io/content/cats/1.png", "altText": "" } ], "imageSize": "large" } ], "version": { "Major": 1, "Minor": 0 } }

mrbrennonwilliams avatar Oct 15 '17 11:10 mrbrennonwilliams

@matthidinger I just tried the payload above's body with our WPF and NodeJS renderer. Here's the full payload (I need to modify to have "version": "1.0"):

{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "ImageSet",
      "images": [
        {
          "type": "Image",
          "size": "medium",
          "url": "http://adaptivecards.io/content/cats/1.png",
          "altText": ""
        },
        {
          "type": "Image",
          "url": "http://adaptivecards.io/content/cats/1.png",
          "altText": ""
        }
      ],
      "imageSize": "large"
    }
  ],
  "version": "1.0"
}

The WPF renderer lets the inner image size override the outer image set size, while the NodeJS renderer does not allow such override. What do you think should be the expected behavior @matthidinger ?

tuanh118 avatar Aug 16 '18 18:08 tuanh118

That's a really interesting find, I don't think we ever considered that scenario. @dclaux do you recall if we ever discussed this, or should we figure it out now?

matthidinger avatar Aug 16 '18 18:08 matthidinger

I know there is no trace of it, but our decision was that ImageSet.imageSize applies to all images and the size property of the image objects is ignored.

dclaux avatar Aug 16 '18 18:08 dclaux

Yeah I've confirmed that in the UWP and Android renderers. I'll fix the .NET renderer then.

tuanh118 avatar Aug 16 '18 20:08 tuanh118