microsoft / microsoft/AdaptiveCards

[UWP Renderer] Image style & height not behaving correctly

Open
#8,125 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Platform

  • UWP

Issue

If we have height and style: person set on an image, the image is rendered at full size with the style and then cropped to the height.

Example Payload

{
  "type": "AdaptiveCard",
  "version": "0.5",
  "body": [
    {
      "type": "Image",
      "url": "https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg",
      "height": "50px",
      "style": "person"
    }
  ]
}
image

Without the style set, we get:

image

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.

Research direction

Start in the UWP renderer by tracing how Image elements handle the height and style properties, comparing the style: person path with the same image without a style. Use the example payload to reproduce the behavior and confirm that the person-styled image respects the requested 50px height without being cropped incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.