Skip to content
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

Update how svg image file is being read #8893

Merged
merged 3 commits into from
Apr 26, 2024
Merged

Update how svg image file is being read #8893

merged 3 commits into from
Apr 26, 2024

Conversation

sosharm
Copy link
Collaborator

@sosharm sosharm commented Apr 24, 2024

Related Issue

#8892

Description

LoadFromUriAsync() gives a file not found error even if the file exists in WinUI3. Updated to read as string and parse into xml.
There is room for refactoring the SVG xml handling code.

Sample Card

  1. Existing test: https://github.com/microsoft/AdaptiveCards/blob/main/samples/v1.5/Tests/Image.Svg.json

  2. { "type": "AdaptiveCard", "version": "1.6", "backgroundImage": { "url": "https://adaptivecards.io/content/Mostly%20Cloudy-Background.jpg" }, "body": [ { "type": "Image", "url": "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/car.svg", "size": "large" } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json" }

How Verified

Verified using the WinUI3 visualizer

  1. https://github.com/microsoft/AdaptiveCards/blob/main/samples/v1.5/Tests/Image.Svg.json
    image

image

@sosharm sosharm marked this pull request as ready for review April 24, 2024 23:45
@sosharm sosharm requested review from paulcam206 and beervoley April 25, 2024 00:03
Copy link
Contributor

@beervoley beervoley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. @jwoo-msft will follow up to refactor this.

@beervoley beervoley enabled auto-merge (squash) April 26, 2024 20:13
@jwoo-msft jwoo-msft disabled auto-merge April 26, 2024 20:15
@jwoo-msft jwoo-msft merged commit 61d2472 into main Apr 26, 2024
6 of 7 checks passed
@jwoo-msft jwoo-msft deleted the sosharm_svg_file branch April 26, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants