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

API to enumerate all images contained in card #1094

Closed
6 tasks done
andrewleader opened this issue Feb 1, 2018 · 2 comments
Closed
6 tasks done

API to enumerate all images contained in card #1094

andrewleader opened this issue Feb 1, 2018 · 2 comments

Comments

@andrewleader
Copy link
Contributor

andrewleader commented Feb 1, 2018

Implementation status

Scenario

Toast notifications need to pre-load HTTP images in non-UI threads, so before any calls to Render (and any XAML tree creation) occurs.

Proposed solution

Provide an API to enumerate all images contained in a card. It's not realistic for card authors like toasts to enumerate through body/action elements themselves, since images could be contained inside columns or even inside ShowCards. This enumeration would have to be maintained and owned by Adaptive Cards.

Uri[] images = card.GetAllImageUris();

API returns all image URIs, like https://msn.com/img.png, ms-appx:///Assets/taco.png, etc... Action Center can then filter themselves whether it's a remote web image or not.

Pulls from...

  • Body image elements
  • Image elements contained within Container
  • Image elements contained within Column
  • Image elements contained within ShowCard
  • Image urls contained within Action (once Action is updated to support images)
  • Background image
  • Anything else I'm missing

I'm not picky on the API name or the return type.

@RebeccaAnne RebeccaAnne self-assigned this Mar 21, 2018
@khouzam khouzam added this to the 1804 milestone Mar 31, 2018
@andrewleader
Copy link
Contributor Author

Changing priority to Tag-Toasts-V1 since it turns out this is required for Action Center to support ms-appx/ms-appdata images too, not just http, so it's something critical for RS5

@khouzam khouzam modified the milestones: 1804, 1805 Apr 18, 2018
@khouzam khouzam modified the milestones: 1805, 1806 May 23, 2018
@khouzam khouzam changed the title API to enumerate all images contained in card API to enumerate all images contained in card for UWP May 24, 2018
@khouzam khouzam removed this from the 1806 milestone May 25, 2018
@khouzam khouzam changed the title API to enumerate all images contained in card for UWP API to enumerate all images contained in card Jun 6, 2018
@khouzam khouzam removed the Platform-XAML Bugs or features related to Xaml Renderer label Jun 6, 2018
@RebeccaAnne RebeccaAnne removed their assignment Sep 19, 2018
@paulcam206
Copy link
Member

Documentation is done and in the mahiding/site1.1 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants