microsoft / microsoft/AdaptiveCards
Action.Submit "data" property as string
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Re #652
The docs for Action.Submit today say that data can be a string or object. WebChat currently uses a string to trigger an "imBack" to the bot, and they use data as an object to post back more complicated data.
http://adaptivecards.io/explorer/Action.Submit.html
The following currently causes nothing to happen when I press submit. This seems like a recent bug?
I believe the expected response would be:
{
"data": "hello",
"firstName": "",
"lastName": ""
}
Payload:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Input.Text",
"id":"lastName",
"placeholder": "What is your last name?"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Action.Submit",
"data": "hello"
}
]
}
This payload works:
"data": {
"x" : 13
}
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 by reproducing the supplied Adaptive Card payload and compare it with the working object-valued Action.Submit.data example. Read the Action.Submit behavior described in the linked explorer documentation; done means a string-valued data submission produces the expected response containing data, firstName, and lastName.
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
- 35/100