Catalogue 0.23.0: Item details inside the picker and a simpler quantity input
Catalogue 0.23.0 lets people look at an item’s full details without leaving the item picker popup, gives the picker a header that says what it shows, and replaces the quantity stepper with a plain number field.
Item details in the picker
Clicking an item’s photo in the picker opens its details over the list: photos and files, description, details and attributes, with a back button. The list stays as it was underneath, and the item can be added or removed from the details view. Prices and SKU stay hidden there when the picker hides them. A host can turn the details off.
The picker’s title area now shows the image, name and description of the category or catalogue it is limited to. The embeddable browse widget gets a table view next to its cards.
Picking quantities
Quantities use a normal number field with the browser’s arrows, in place of the minus and plus buttons. If the picker shows a quantity column, typing a number above zero selects the item; otherwise each row has a checkbox. The supplier unit cost arrows now move in cents, and the built-in supplier field labels are translated.
Fixes
- A crafted featured image value could make every viewer’s browser request another path on the same site. Image addresses now only accept a proper ID.
- A double-clicked Confirm selection sent the selection twice.
- An embed limited to a few columns showed price and SKU in the details view.
- Invalid preselected keys crashed the page that opened the picker.
- The browse widget’s card view had stopped showing the SKU.
Upgrading
No migration. Update the dependency. The picker shows item details and the context header by default; hosts that must not expose details pass show_item_details: false.
Full release notes: Catalogue 0.23.0
0.23.0 · 30 August 2026
Added
- An item details page inside the selector popup (#88) —
ItemSelectorModal’sshow_item_details(defaulttrue) turns the card photo and the table thumbnail into a “look closer” affordance that covers the browse region with the fullProductCardbody (photo/file carousel, description, metadata, attributes) and a Back button. The list stays mounted underneath, so search, chips, scroll and selection survive the trip. A mode-aware control in the detail footer adds or removes the item without going back first. Passfalsefor embeds that must not expose the detail body — it honoursshow_prices/show_skuand the grantedcolumnseither way. - A context header on the selector (#88) —
context_header(defaulttrue) shows the scoped category’s (or, failing that, catalogue’s) featured image, translated name and description in the title area, so the popup says what it is showing. Chrome only: an unresolvable or multi-entry scope falls back to the plain title, and nothing here widens what can be browsed. show_tray(#88) —falsedrops the cart-count button and the expandable review list for embeds where the selection is already visible in place, such as a quantity-first order sheet. Cancel and Confirm always stay.hidden_columns(#88) — which GRANTED selector columns start hidden (default[:sku, :breadcrumb]); the viewer re-shows them from the Columns dropdown. Unknown or ungranted entries are ignored, so hiding less than asked never widens anything.- The list view reached
CatalogueBrowse(#88) — the embeddable widget gained the modal’s admin-look table and a view toggle beside the search box, over the same fetch. The card grid stays its default. - Shared browse helpers (#88) —
Browse.expand_scope/1,chip_categories/2,normalize_uuid/1,resolve_view!/2andresolve_columns!/2.CatalogueBrowsehad been missing the subtree-expansion fix the modal got: a parent-category scope hid its descendant chips and rejected narrowing to one as out of scope.
Changed
- Quantities are a native
<input type="number">(#88) — browser spinner arrows, the same control the rest of the kit uses for numbers, replacing the custom −/+ join stepper. Arrow clicks and settled typing apply live through a debouncedqty_changethat never resets in-progress text; blur/Enter stays the authoritativeqty_committhat discards garbage. Decimal commas and server-side re-clamping are unchanged. - The selection flavour derives from the columns (#88) — a visible
:qtycolumn makes the popup quantity-first (every row shows its input at 0, a positive number is the selection); without one it is the checkbox flavour, with a leading checkbox column that shows the “you can pick these” affordance before the first pick. A checked box and a quantity input never share a row.selection_mode: "click" | "quantity"still forces either explicitly. - Supplier unit-cost arrows step in cents (#88) — the built-in
unit_costfield declares"step" => "0.01"while keeping scale 4 for typed entry. The arrows previously walked 0.0001 at a time. Requires an entities release that reads the definition’sstepkey; on an older~> 0.4the arrows fall back to deriving the step from the scale. - The built-in supplier field labels translate at call time (#88) — a compile-time map could only carry the msgid, so et/ru admins saw an English “Unit cost”.
- The Unit select’s label matches its
<.input>neighbours (#88) — hand-rolled locally because core’s<.select>labels throughFormFieldLabel‘s smallerfieldset-legendspan, which visibly broke the row in the item form’s grid.
Fixed
CatalogueBrowse’s default card view stopped rendering the SKU (#88 review) — the widget’s default column list subtracted the modal’s default-hidden:sku/:breadcrumbpair from the grant, and the cards read the grant. Card view is this component’s default, so every existing embed lost its SKU line, with no way back short of an explicitcolumnslist that also re-added the table column. Grant and visibility are now separate, as they already were in the modal: the cards readcolumns, the table reads the visibility-filtered list.- A double-clicked Confirm delivered
{:items_selected, …}twice (#88) — the second queued event ran before the host unmounted the modal. Aconfirmedlatch makes confirm, and immediate-mode notify, once-only. mode: :single+immediateconfirmed off the debounced live value (#88) — a slow typist’s “15” closed the modal at quantity 1. The live path no longer notifies; the authoritative commit does.- The detail page honoured the display flags but not the columns
grant (#88) — a client-safe
columns: [:thumb, :name, :qty]embed leaked price and SKU one thumbnail-click away. The table view likewise ignored a mid-openshow_prices/show_skurevocation the cards and detail page honoured, and a stale detail could survive a failed grant-change rebuild. featured_image_uuidreached a URL path shape-unchecked (#88) — it is free JSONB, so../../etc/passwdbecame a same-origin GET path for every viewer. Both signed-URL builders now require the canonical uuid form (Ecto.UUID.cast/1alone accepts any 16-byte binary, which is exactly what the traversal string is).- Garbage preselect keys crashed the host LiveView at mount (#88) —
a non-UUID key raised
Ecto.Query.CastErrorfrom the fetch, and raw 16-byte keys silently vanished from the tray. Keys now normalize throughEcto.UUID.cast/1; garbage drops like any unresolvable uuid. Relatedly,resolve_columns!/2now raises on duplicate entries as well as unknown ones, and a non-numeric quantity raises a describedArgumentErrorinstead of a bareFunctionClauseError. CatalogueBrowserendered the category twice per row (#88) — the:breadcrumbprefix beside the:categorycolumn, in the new table view.
Removed
- The
qty_inc/qty_decevents and the −/+ stepper buttons (#88), replaced by the native number input’s arrows. Their"Increase quantity"/"Decrease quantity"msgids are gone from the catalogues (#88 review).
Catalogue 0.23.0. Install or update: {:phoenix_kit_catalogue, "~> 0.23"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.