microsoft / microsoft/AdaptiveCards
[Rendering] AdaptiveTableCell is incorrectly serialize to AdaptiveContainer
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Target Platforms
Other
SDK Version
3.1.0
Application Name
MIcrosoft Teams
Problem Description
When serializing a TableCell to JSON the type of TableCell is sereialized to Container. The correct type needs to be TableCell.
Workaround: set Type of TableCell as "TableCell" and it works fine.
Example:
"type": "TableRow", "cells": [ { "type": "Container", "items": [ { "type": "TextBlock", "weight": "bolder", "text": "Nome do Arquivo", "wrap": true } ] } ]
Screenshots
No response
Card JSON
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"size": "extraLarge",
"weight": "bolder",
"text": "Core Test"
},
{
"type": "Table",
"rows": [
{
"type": "TableRow",
"cells": [
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"weight": "bolder",
"text": "Filename",
"wrap": true
}
]
},
{
"type": "Container",
"items": [
{
"type": "TextBlock",
"weight": "bolder",
"text": "Filetype",
"wrap": true
}
]
}
]
}
],
"columns": [
{
"width": 1
},
{
"width": 1
}
],
"firstRowAsHeaders": true,
"verticalCellContentAlignment": "center"
}
],
"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
No source file, test, or entry point is named. Start by reproducing TableCell serialization in the C# SDK at version 3.1.0 and trace why it emits Container; compare the result with the explicit Type workaround. Done means serialization emits TableCell without manual Type assignment and a regression test covers the JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100