diff --git a/samples/Tests/ColumnSet.Empty.json b/samples/Tests/ColumnSet.Empty.json new file mode 100644 index 0000000000..596b0db766 --- /dev/null +++ b/samples/Tests/ColumnSet.Empty.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.0", + "body": [ + { + "type": "TextBlock", + "text": "This empty columnset should not prevent the card from rendering" + }, + { + "type": "ColumnSet", + "columns": [] + } + ] +} diff --git a/source/shared/cpp/ObjectModel/ColumnSet.cpp b/source/shared/cpp/ObjectModel/ColumnSet.cpp index deabcec2c2..28e6390e85 100644 --- a/source/shared/cpp/ObjectModel/ColumnSet.cpp +++ b/source/shared/cpp/ObjectModel/ColumnSet.cpp @@ -69,7 +69,7 @@ std::shared_ptr ColumnSetParser::Deserialize( auto container = BaseCardElement::Deserialize(value); // Parse Columns - auto cardElements = ParseUtil::GetElementCollectionOfSingleType(elementParserRegistration, actionParserRegistration, warnings, value, AdaptiveCardSchemaKey::Columns, Column::Deserialize, true); + auto cardElements = ParseUtil::GetElementCollectionOfSingleType(elementParserRegistration, actionParserRegistration, warnings, value, AdaptiveCardSchemaKey::Columns, Column::Deserialize, false); container->m_columns = std::move(cardElements); // Parse optional selectAction diff --git a/source/uwp/AdaptiveCardTestApp/Expected/SourceCards/Tests.ColumnSet.Empty.461f2d5.json b/source/uwp/AdaptiveCardTestApp/Expected/SourceCards/Tests.ColumnSet.Empty.461f2d5.json new file mode 100644 index 0000000000..596b0db766 --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/SourceCards/Tests.ColumnSet.Empty.461f2d5.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.0", + "body": [ + { + "type": "TextBlock", + "text": "This empty columnset should not prevent the card from rendering" + }, + { + "type": "ColumnSet", + "columns": [] + } + ] +} diff --git a/source/uwp/AdaptiveCardTestApp/Expected/Tests.ColumnSet.EmptyToJson.json b/source/uwp/AdaptiveCardTestApp/Expected/Tests.ColumnSet.EmptyToJson.json new file mode 100644 index 0000000000..a4233fbdab --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/Tests.ColumnSet.EmptyToJson.json @@ -0,0 +1 @@ +{"actions":[],"body":[{"text":"This empty columnset should not prevent the card from rendering","type":"TextBlock"},{"columns":[],"type":"ColumnSet"}],"type":"AdaptiveCard","version":"1.0"} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.microsoft-teams.Tests.ColumnSet.Empty.json b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.microsoft-teams.Tests.ColumnSet.Empty.json new file mode 100644 index 0000000000..2330379e3e --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.microsoft-teams.Tests.ColumnSet.Empty.json @@ -0,0 +1 @@ +{"HostConfigHash":"febd141","CardHash":"461f2d5","Error":null} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.microsoft-teams.Tests.ColumnSet.Empty.png b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.microsoft-teams.Tests.ColumnSet.Empty.png new file mode 100644 index 0000000000..48d9370681 Binary files /dev/null and b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.microsoft-teams.Tests.ColumnSet.Empty.png differ diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.outlook-desktop.Tests.ColumnSet.Empty.json b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.outlook-desktop.Tests.ColumnSet.Empty.json new file mode 100644 index 0000000000..23688762e7 --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.outlook-desktop.Tests.ColumnSet.Empty.json @@ -0,0 +1 @@ +{"HostConfigHash":"04138f4","CardHash":"461f2d5","Error":null} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.outlook-desktop.Tests.ColumnSet.Empty.png b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.outlook-desktop.Tests.ColumnSet.Empty.png new file mode 100644 index 0000000000..48d9370681 Binary files /dev/null and b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.outlook-desktop.Tests.ColumnSet.Empty.png differ diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sample.Tests.ColumnSet.Empty.json b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sample.Tests.ColumnSet.Empty.json new file mode 100644 index 0000000000..63471be422 --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sample.Tests.ColumnSet.Empty.json @@ -0,0 +1 @@ +{"HostConfigHash":"45c4c50","CardHash":"461f2d5","Error":null} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sample.Tests.ColumnSet.Empty.png b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sample.Tests.ColumnSet.Empty.png new file mode 100644 index 0000000000..c7175f33b5 Binary files /dev/null and b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sample.Tests.ColumnSet.Empty.png differ diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sampleDifferentFont.Tests.ColumnSet.Empty.json b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sampleDifferentFont.Tests.ColumnSet.Empty.json new file mode 100644 index 0000000000..d3b5dcfab3 --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sampleDifferentFont.Tests.ColumnSet.Empty.json @@ -0,0 +1 @@ +{"HostConfigHash":"3e47fb4","CardHash":"461f2d5","Error":null} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sampleDifferentFont.Tests.ColumnSet.Empty.png b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sampleDifferentFont.Tests.ColumnSet.Empty.png new file mode 100644 index 0000000000..16dbe320b6 Binary files /dev/null and b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.sampleDifferentFont.Tests.ColumnSet.Empty.png differ diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.skype.Tests.ColumnSet.Empty.json b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.skype.Tests.ColumnSet.Empty.json new file mode 100644 index 0000000000..b966c92848 --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.skype.Tests.ColumnSet.Empty.json @@ -0,0 +1 @@ +{"HostConfigHash":"2ac7c52","CardHash":"461f2d5","Error":null} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.skype.Tests.ColumnSet.Empty.png b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.skype.Tests.ColumnSet.Empty.png new file mode 100644 index 0000000000..efcbf586c5 Binary files /dev/null and b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.skype.Tests.ColumnSet.Empty.png differ diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-notification.Tests.ColumnSet.Empty.json b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-notification.Tests.ColumnSet.Empty.json new file mode 100644 index 0000000000..cad60f2ead --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-notification.Tests.ColumnSet.Empty.json @@ -0,0 +1 @@ +{"HostConfigHash":"e188ab9","CardHash":"461f2d5","Error":null} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-notification.Tests.ColumnSet.Empty.png b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-notification.Tests.ColumnSet.Empty.png new file mode 100644 index 0000000000..2bd27453d1 Binary files /dev/null and b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-notification.Tests.ColumnSet.Empty.png differ diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-timeline.Tests.ColumnSet.Empty.json b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-timeline.Tests.ColumnSet.Empty.json new file mode 100644 index 0000000000..eced66f950 --- /dev/null +++ b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-timeline.Tests.ColumnSet.Empty.json @@ -0,0 +1 @@ +{"HostConfigHash":"e3927b5","CardHash":"461f2d5","Error":null} \ No newline at end of file diff --git a/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-timeline.Tests.ColumnSet.Empty.png b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-timeline.Tests.ColumnSet.Empty.png new file mode 100644 index 0000000000..67c95e4f3e Binary files /dev/null and b/source/uwp/AdaptiveCardTestApp/Expected/v1.0.windows-timeline.Tests.ColumnSet.Empty.png differ