Active filters
On a branch in the appPort of Ui::ActiveFiltersComponent from roastertools-app's origin/jon-dev-3250-shared-list-controls branch (app/components/ui/active_filters_component.{rb,html.erb}). Active-filter pill row for a list page: one removable pill per filter dimension plus Clear all. Renders nothing without pills, as the app's render? does. The pill is on the outlined-control spec since 2026-10-05 — 32px, 1px stone-400 with a stone-300 divider before the × (2px stone-300 at first, stone-400 since DES2-11, 2026-10-23), flat, ui-sm — rather than the canon's old hairline exemption, so it carries the same weight as the trigger that made it; what tells the two apart is the content, with the label in stone-light and only the value in ink. It sits inside the table's card under the Toolbar, white and ruleless (2026-10-05; it had a stone-200 hairline under it, which cut a single field of chrome into two strips): ListChrome wraps the pair and draws the one 2px stone-dark rule under the whole of it, so the pills read as a second line of the toolbar rather than a band of their own. Classes are the branch's verbatim, respelled: tw- stripped; border-0 border-solid dropped; sizes by pixel at the app's 14px root (conflict 13): text-xs → text-ui-xs, text-sm → text-ui-xs; gray-200 → stone-200; border-opacity-40 → border-mustard/40, hover:bg-opacity-20 → hover:bg-mustard/20. Rails paths (remove_path, clear_path) → remove_href / clear_href, with onRemove / onClear as the mock-behaviour alternative (a <button> instead of a link). The data hooks (data-active-filters, data-active-filter, data-active-filter-label, data-active-filter-value, data-clear-filters) stay on the elements.
App: Ui::ActiveFiltersComponent (origin/jon-dev-3250-shared-list-controls)
Three pills and Clear all
#pillsOne pill per filter dimension: the label in stone-light, the value in stone-dark, and a × that removes the one filter (a link to remove_href; the app's remove_path). Clear all is a rust link to clear_href (the app's clear_path). The row sits under the toolbar inside ListChrome, white and ruleless: the strip's one 2px rule belongs to the wrapper (see List chrome).
Long value truncated
#truncatedThe value is capped at 120px and truncated with an ellipsis; the full text stays in the title attribute, so hovering the pill reveals it.
No filters
#emptypills={[]} renders nothing at all, as the app's render? does, so the table sits directly under the toolbar. There is no empty-state row.
(ActiveFilters rendered above with no pills; it takes no space.)
Props
| Name | Type | Default | Notes |
|---|---|---|---|
| pills | ActiveFilterPill[] | — | Required. One pill per filter dimension; an empty array renders nothing |
| pills[].key | string | — | The React key and the data-active-filter value |
| pills[].icon | string | — | Vendored icon for the filter's category, leading the pill |
| pills[].label | string | — | Displayed as supplied, punctuation included ("Status:") |
| pills[].value | string | — | The full human-readable value; the pill truncates it at 120px and keeps it in the title |
| pills[].remove_label | string | — | The accessible name of the remove control ("Remove status filter") |
| pills[].remove_href | string | — | The path that drops this one filter (the app's remove_path) |
| pills[].onRemove | () => void | — | Mock behaviour: renders a <button> instead of the link |
| clear_href | string | — | The path that drops every filter (the app's clear_path) |
| onClear | () => void | — | Mock behaviour: renders a <button> instead of the link |
| className | string | — | On the row <div> |