microsoft / microsoft/AdaptiveCards
[Feature Request] Grouped choices (option groups) in Input.ChoiceSet
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Problem Statement
Input.Choice carries only title and value. When choices belong to natural categories (tasks under projects, cities under countries, SKUs under product lines) authors must flatten the hierarchy into the title, e.g. Task name - Project name, which makes every row long and hard to scan, especially on mobile. Dependent inputs help but force a second control and a second tap; users who already know the item still cannot browse by category in one dropdown. HTML <optgroup> and every native picker on Windows, macOS, iOS and Android support this, so hosts have a primitive to render to.
Proposed solution
Add an optional group (or category) string to Input.Choice. Renderers show a non-selectable header per distinct group, in first-appearance order, with the group's choices beneath it. Applies to compact, expanded and filtered styles; in filtered style a header appears only when at least one of its choices matches. Dynamic typeahead results (Data.Query / application/search responses) should accept the same field. Hosts that do not support the property ignore it, so existing cards are unaffected.
{
"type": "Input.ChoiceSet",
"id": "task",
"style": "filtered",
"choices": [
{ "title": "BHA Features", "value": "a0X1", "group": "CEI App Dev" },
{ "title": "Code Review", "value": "a0X2", "group": "CEI App Dev" },
{ "title": "Onboarding", "value": "a0X3", "group": "Internal" }
]
}
Alternatives or Workarounds
- Prefix or suffix the category in the title (current workaround, cluttered).
- Dependent inputs: category ChoiceSet +
Data.QueryChoiceSet withassociatedInputs(extra control, extra tap, no browsing across categories). - Separate ChoiceSets per category behind
Action.ToggleVisibility(does not scale).
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 reviewing the Input.ChoiceSet schema and renderer entry points for compact, expanded, and filtered styles. Trace how Data.Query and application/search responses define choices. Done means grouped choices render in first-appearance order where supported, filtering preserves relevant headers, and unsupported hosts remain unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100