microsoft / microsoft/AdaptiveCards
[Rendering] Hide container if no visible items
Open
Nobody has claimed this yet.
Area-Renderers
Bug
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Target Platforms
Android
SDK Version
3.8.3
Application Name
M365 Copilot
Problem Description
For the below AC json, a gray area shows below text due to the emphasis container padding. No item shows because the only item is invisible. Can we hide the container if no visible items in it?
Screenshots
Card JSON
{
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "I'll connect to Coursera Learning Agent to help with this and future requests. You can manage access anytime in Settings.",
"wrap": true
},
{
"type": "Container",
"items": [
{
"type": "Container",
"id": "previewContainer",
"items": [
{
"type": "FactSet",
"facts": [
{
"title": "primarySubject",
"value": "sales negotiation tactics"
}
]
}
],
"isVisible": false
}
],
"style": "emphasis"
}
],
"msTeams": {
"width": "full"
}
}
Sample Code Language
No response
Sample Code
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 Android rendering path for Container and its isVisible handling, then reproduce the supplied Adaptive Card JSON. The fix is done when a container containing only invisible items does not render its emphasis padding or leave a gray area below the visible TextBlock.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100