microsoft / microsoft/AdaptiveCards

[UWP Renderer] Images using resource resolvers and auto size are not rendering

Open
#8,126 0 comments 0 reactions 1 assignee View on GitHub

@anna-dingler is already working on this.

Since Dec 12, 2022.

Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Platform

  • UWP

Issue

When using resourceResolver and size: auto, the image does not render properly.

SetAutoSize is called twice, and the second time sets the dimensions as 0x0.

https://github.com/microsoft/AdaptiveCards/blob/ce285646548a847d56033ba4a2d84ca676fdf091/source/uwp/Renderer/lib/AdaptiveImageRenderer.cpp#L331-L342

https://github.com/microsoft/AdaptiveCards/blob/ce285646548a847d56033ba4a2d84ca676fdf091/source/uwp/Renderer/lib/AdaptiveImageRenderer.cpp#L406-L419

Example payload

{
  "type": "AdaptiveCard",
  "version": "0.5",
  "body": [
    {
      "type": "Image",
      "url": "symbol:up"
    }
  ]
}

Proposed solution

We need to return after resolver logic has been completed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.