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

[JS][Bug Bash] [ImageSet Auto Size doesn't work properly] #3748

Closed
jwoo-msft opened this issue Jan 29, 2020 · 6 comments
Closed

[JS][Bug Bash] [ImageSet Auto Size doesn't work properly] #3748

jwoo-msft opened this issue Jan 29, 2020 · 6 comments
Labels

Comments

@jwoo-msft
Copy link
Member

jwoo-msft commented Jan 29, 2020

Platform

What platform is your issue or question related to? (Delete other platforms).

  • JavaScript

Version of SDK

1.2.6

Details

repro steps:

  1. add the below json, and paste it to designer.
  2. no images will show up.
  3. ctrl-a then paste it again
{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.0",
	"body": [
		{
			"type": "TextBlock",
			"text": "Here are some cool photos",
			"size": "large"
		},
		{
			"type": "TextBlock",
			"text": "Sorry some of them are repeats",
			"size": "medium",
			"weight": "lighter"
		},
		{
			"type": "ImageSet",
			"imageSize": "auto",
			"images": [
				{
					"type": "Image",
					"url": "https://picsum.photos/200/200?image=100"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/300/200?image=200"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/300/200?image=301"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/200/200?image=400"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/300/200?image=500"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/200/200?image=600"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/300/200?image=700"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/300/200?image=800"
				},
				{
					"type": "Image",
					"url": "https://picsum.photos/300/200?image=900"
				}
			]
		}
	]
}

some pictures are overlapped each other, and some pictures have wrong aspect ratio
JS
image

UWP
image

@jwoo-msft jwoo-msft added the Bug label Jan 29, 2020
@ghost ghost added the Triage-Needed label Jan 29, 2020
@dclaux
Copy link
Member

dclaux commented Jan 29, 2020

I am not able to repro this.

@jwoo-msft
Copy link
Member Author

I am not able to repro this.

you're really active! i edited the description with repro step

@shalinijoshi19
Copy link
Member

@dclaux could you take a first pass with teh repro steps that @nesalang provides? Thanks!

@ghost ghost removed the Triage-Needed label Jan 31, 2020
@ghost
Copy link

ghost commented Jan 31, 2020

We have acknowledged this issue report. Please continue to follow the issue for updates/progress/questions. @matthidinger / @dclaux / @RebeccaAnne / @paulcam206 FYI.

@dclaux
Copy link
Member

dclaux commented Jan 31, 2020

auto and stretch are not supported sizes in ImageSet. But the JS renderer fails to fall back to medium in those cases, so what you're seeing is HTML doing its best to auto-size while being constrained to a maximum height for each image.

The fix will be to fall back to medium when either auto or stretch are specified as imageSIze, and to remove the option to select auto or stretch from the designer.

Note the documentation doesn't say that "auto" and "stretch" are not supported, and I can foresee my assertion they are not supported will be debated. If we're going to debate, please do include a description of how "auto" and "stretch" should work in an ImageSet.

@RebeccaAnne
Copy link
Contributor

Duping to #4043

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

No branches or pull requests

4 participants