Skip to content

[Feature Request] Grouped choices (option groups) in Input.ChoiceSet #9401

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.Query ChoiceSet with associatedInputs (extra control, extra tap, no browsing across categories).
  • Separate ChoiceSets per category behind Action.ToggleVisibility (does not scale).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions