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.Query ChoiceSet with associatedInputs (extra control, extra tap, no browsing across categories).
- Separate ChoiceSets per category behind
Action.ToggleVisibility (does not scale).
Problem Statement
Input.Choice carries only
titleandvalue. 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(orcategory) 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 tocompact,expandedandfilteredstyles; infilteredstyle a header appears only when at least one of its choices matches. Dynamic typeahead results (Data.Query/application/searchresponses) 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
Data.QueryChoiceSet withassociatedInputs(extra control, extra tap, no browsing across categories).Action.ToggleVisibility(does not scale).