Skip to main content

Module search

Module search 

Source
Expand description

EXP-1259 (the UI batch): the low-level pieces the app settled on, built from the natives every painter already draws.

  • SearchList (packages/domain-contract/fixtures/search-list.json): a head row (the host-owned search field + the muted count while a query is typed) over the body: a list of item rows (icon, mono identifier, label, the picked row’s check) at most maxRows tall, scrolling, under a bottom fade while rows sit below. The HIGHLIGHTED row (selected state) is core state: the field’s arrows move it (no wrap), Enter or Tab picks it, a hover moves it, typing puts it back on the top row.
  • A searchable Menu submenu: the same head + list + fade around the submenu’s entries (menuItem.searchable).
  • Skeleton rows (feedback-states.json placeholder): rows × a row (the row height) of a dot and two bars, hairline-divided; the dot and bars are Skeleton leaves, so every painter’s pulse applies.

Constants§

SEARCH_LIST_ROWS
The rows a search list shows by default before it scrolls.
SKELETON_BARS
The bars’ widths per placeholder row (lead, title): the web’s SkeletonRows, so a stack never reads as one ruled block.

Functions§

reveal_offset
The scroll offset that keeps row active (fixed row px rows) inside a viewport px window currently at offset.
search_matches
Does a search row match the query (case-insensitive, label or identifier)?