Toolbar

On a branch in the app

Port of Ui::ToolbarComponent from roastertools-app's origin/jon-dev-3250-shared-list-controls branch (app/components/ui/toolbar_component.{rb,html.erb}). List-page toolbar: search, filter and sort controls as three slots (search, filter_control, sort_control). It is the frame's top strip, inside the table's card — px-4 py-3 (2026-10-02; it sat above the card, unframed, from 2026-09-25). White and ruleless since 2026-10-05: it had the branch's surface-muted fill and its own 2px stone-dark rule, which made it a band of chrome in its own right, and with the pill row under it the card stacked three strips before a single row. Now ListChrome wraps the toolbar and the pills and draws the one 2px rule under the pair, so the only grey band left in the card is the table head. It also puts the search field back on the canon's footing — a field's container stays white, so the field's own surface-muted fill reads as a slot rather than grey on grey. The count sits beside the filter control rather than at the far right (2026-10-05): it is that control's answer. This is where the app's own component draws it too. Classes are the branch's verbatim, respelled: tw- stripped, border-0 border-solid (preflight-off artefacts) dropped, gray-200 → stone-200 (conflict 7). Stimulus hooks kept as data attributes so the markup matches the app: data-mapping-toolbar and, with unselect_target, data-selectable-target="unselectAction" (the selectable controller hides this element while rows are selected and shows the BulkActionsBar). The row is flex-wrap, so at 390 the search, filter and sort controls wrap onto their own lines.

App: Ui::ToolbarComponent (origin/jon-dev-3250-shared-list-controls)

Search, filter and sort

#full

All three slots filled: a search Input with a light search Icon overlaid on the left (pl-9), the FilterPopover with the row count beside it, and the SortControl, which carries its own ml-auto to sit at the right end. The count moved next to the filter on 2026-10-05: it is that control's answer, and at the far right of a 1920px row it was a fact you had to go and find. The row is flex-wrap with a 64px minimum height, so at 390 the controls wrap onto their own lines instead of overflowing.

Search only

#search-only

A list with nothing to filter or sort. The empty slots render nothing; the bar keeps its minimum height.

Hidden while rows are selected

#hidden

hidden adds the hidden class: what the app's selectable controller does to its unselectAction target while rows are selected, so the BulkActionsBar can take the slot. Nothing renders below this line; see the composed list page for the live swap.

(Toolbar rendered above with hidden; it takes no space.)

Composed list page

#list-page

The DEV-3250 composition: Card padded={false} holding the Toolbar (search, FilterPopover, SortControl), which is swapped for the BulkActionsBar while any row is selected (Toolbar hidden ⇄ BulkActionsBar visible, as the selectable controller does with its unselectAction and selectAction targets), then the ActiveFilters row — both white and ruleless inside one ListChrome, which draws the single 2px rule under the pair — and an unframed Table. The Pagination sits on the page under the card rather than inside it, so the card ends on its last row. Check at all five widths: at 390 the toolbar wraps, the filter rail stacks above its panel and the pagination collapses to current / total. Selection, pill removal, the chosen sort and the page are mock behaviour in React state.

Status:SettledMethod:Card, ACH
CustomerDateMethodAmountStatusActions
Hillside Food Co-opFeb 4, 2026Card$1,245.00Settled
Nolan's BakeryFeb 3, 2026ACH$3,890.50Processing
Broad Street BistroFeb 3, 2026Check$2,150.00Settled
4th Street BagelsFeb 1, 2026Card$875.25Failed
Harbor Market & DeliJan 30, 2026ACH$4,320.00Settled
Parkview ProvisionsJan 29, 2026Cash$610.00Refunded
1-25 of 142 results

Props

NameTypeDefaultNotes
searchReactNode—The search control (the app's search slot)
filter_controlReactNode—The FilterPopover (the app's filter_control slot)
bulk_controlReactNode—The BulkActionsMenu (2026-10-28), first in the right-hand group, 8px left of the actions. Hidden below stack_below, where the floating bar takes the selection. A slot the app's ToolbarComponent does not have yet
actionsReactNode—List actions, 8px right of bulk_control and 12px left of the columns and sort pair: the DownloadCsvButton (2026-10-28). A slot the app's ToolbarComponent does not have yet
columns_controlReactNode—The ColumnsControl (2026-10-27), 8px left of the sort control. Hidden below stack_below, where the list is stacked rows. A slot the app's ToolbarComponent does not have yet
group_controlReactNode—The GroupControl (2026-10-30), between Columns and Sort. Kept where the list stacks, since a stacked list draws its groups too. A slot the app's ToolbarComponent does not have
sort_controlReactNode—The SortControl (the app's sort_control slot; it carries its own ml-auto)
unselect_targetbooleanfalseSets data-selectable-target="unselectAction" so the selectable controller can swap the toolbar for the bulk bar. Documentation only here
hiddenbooleanfalseMock behaviour: what the selectable controller does while rows are selected (adds hidden)
stack_belowmd | lg—The list is a StackedList below this width (2026-10-15): the bulk bar floats there, so the toolbar stays while rows are selected and hides only from this width up (the selectable controller's class becomes tw-lg:hidden). Below sm the gaps tighten to 8px and the sort control is icon-only, so filter, count and sort fit one line under the search
classNamestring—On the toolbar <div>