Skip to content

feat: add transitions support to remaining interactive components #296

Closed

Description

@cixzhang

Context

After #146 lands, we have onChangeAction / onClickAction (React 19 transitions) on a subset of interactive components:

Already supported

  • Button — onClickAction
  • TextInput — onChangeAction + isLoading
  • TextArea — onChangeAction + isLoading
  • CheckboxInput — onChangeAction
  • Switch — onChangeAction
  • Selector — onChangeAction
  • DateInput — onChangeAction
  • TimeInput — onChangeAction

Candidates to add transitions support

  • NumberInput — has value input, likely needs onChangeAction
  • Slider — has value input, likely needs onChangeAction
  • RadioList — has selection, likely needs onChangeAction
  • DropdownMenu — has actions/selection, may need onClickAction on items
  • Dialog — close/confirm actions, may need onClickAction on action buttons
  • Link — navigation actions, may need onClickAction
  • TabList — tab switching, may need onChangeAction
  • Table — sorting/pagination actions, may need onClickAction

What to do

  1. Audit each component above for interactive callbacks
  2. Determine which ones benefit from transition support (async action → loading state)
  3. Follow the same pattern from feat: React 19 transitions with onChangeAction/onClickAction #146: useOptimistic + useTransition + XDSSpinner + aria-busy
  4. Add tests for each

Pattern reference

See #146 for the established pattern: onChange fires first (sync), onChangeAction fires after unless event.preventDefault() was called. onClickAction wraps in startTransition and shows spinner while pending.

Activity

  1. added
    enhancement
    on Feb 23, 2026
  2. cixzhang commented on Mar 8, 2026

    @cixzhang
    ContributorAuthor

    The React transition pattern (onClickAction / onChangeAction + useOptimistic) is established and applied to all interactive components that need it: Button, TextInput, TextArea, CheckboxInput, DateInput, TimeInput, Selector, Switch, Pagination. Pattern documented in API Conventions wiki.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions