Skip to content

DS-076: Build a shared SearchField component #487

Description

@IbrahimIjai

Context

Market selectors, pool tables, command surfaces, and future transaction history
all need search input. Rebuilding clear buttons, keyboard behavior, loading
feedback, and result counts in each feature leads to inconsistent interactions.

Scope

  • Add a SearchField composed from the shared Input, IconButton, and Spinner.
  • Support controlled value, clear action, loading state, and optional result count.
  • Provide compact and default sizes.
  • Define accessible behavior for search submission and live result updates.

Acceptance criteria

  • The control uses the native search input type and has an accessible label.
  • Escape clears a non-empty query without unexpectedly closing a parent overlay.
  • Clear and loading controls do not change the input width.
  • Result-count announcements are debounced and do not fire on every keystroke.
  • Tests cover typing, clearing, Escape, loading, disabled, and announcement behavior.

Out of scope

  • Implementing filtering, debouncing network requests, or fetching results.
  • Replacing the Combobox input for selection workflows.

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