microsoft / microsoft/AdaptiveCards
Widgets: Setting selectAction on Adaptive Card root forces all content to be vertically aligned
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Describe the bug
When specifying a selectAction on an Adaptive Card for the Widget Board, it always centers its content vertically, no matter what "height": "stretch" or "verticalContentAlignment": "Bottom" values I specify in the JSON.
Steps to reproduce the bug
Use this Adaptive Card template:
{
"type": "AdaptiveCard",
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5",
"header": null,
"body": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"text": "some text"
}
],
"height": "stretch",
"verticalContentAlignment": "Bottom"
},
{
"type": "TextBlock",
"text": "some text #2"
}
],
"selectAction": {
"type": "Action.Execute"
},
"verticalContentAlignment": "Bottom"
}
Expected behavior
The moment I remove the selectAction from the example above, I get the expected result
Screenshots
No response
NuGet package version
Windows App SDK 1.7.3: 1.7.250606001
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 24H2 (22621, October 2024 Update)
IDE
Visual Studio 2022
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Adaptive Card template in the issue and reproduce it in the Windows App SDK Widget Board, comparing layout with and without the root selectAction. Trace the card rendering path for verticalContentAlignment and height; done when the specified bottom or stretch alignment is preserved while selectAction is present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100