Catalogue 0.15.0: Photo preview and product card in the item picker
Catalogue 0.15.0 shows the chosen item’s photo next to the item picker field and can open a read-only product card for it, so the person picking can check that it is the right item.
Photo preview and product card
When the chosen item has a main image, the picker shows its thumbnail to the left of the field. Items without a photo look as before. A host can make the thumbnail clickable. A click then opens a product card in a popup: the main image large, a strip of the item’s other images to switch between, and its filled-in fields such as SKU, price, unit, description and other details. Empty fields are left out.
Fixes
- A PRO100 re-import could remove a photo or files folder attached to an item between the preview and the apply step. Apply now re-reads the item and only changes what the import itself changes.
- A supplier’s current price could show the wrong row when two price revisions were made in the same second.
- Form fields, selects and tabs in the admin use the current daisyUI class names.
Upgrading
No migration. Catalogue 0.15 needs PhoenixKit 2.3 or later. A host that turns on photo_clickable must handle the {:item_picker_photo_click, ...} message in its LiveView, or the click crashes the page.
Full release notes: Catalogue 0.15.0
0.15.0 · 14 August 2026
Added
- Item photo preview in the item picker. When a picked catalogue item has
a featured (main) image,
<.item_picker>now renders its thumbnail to the left of the input — the per-position preview for the sub-order positions list. Items without a photo render as before. The thumbnail is an opt-in navigation hook via the newphoto_clickableattr (defaultfalse). - Product card opened from the preview. Clicking the thumbnail opens a
read-only product card entirely inside the picker (opt in with
photo_clickable={true}; the host must also handle the upward{:item_picker_photo_click, …}message with ahandle_info/2clause or a catch-all, or the click crashes its LiveView): a core<.modal>with a “one expanded” image gallery (main image large, a thumbnail strip of the item’s other images, switching on click) and the item’s filled fields (SKU, price, unit, description, metadata); empty fields are hidden. Exposed as the function componentPhoenixKitCatalogue.Web.Components.ProductCard.product_card/1with publicresolve_images/1,resolve_name/2,build_fields/2helpers.
Fixed
-
PRO100 re-import could clobber a photo attached mid-flight. The Apply step wrote the item’s
datafrom the plan snapshot taken at preview time, so afeatured_image_uuid(orfiles_folder_uuid) attached between preview and Apply was lost. Apply now re-reads the item and merges only the plan’s owndatachanges onto its currentdata, matching the merge-under-"pro100"pattern already used by the PRO100 template loader. -
A
photo_clickwith nothing selected sent{:item_picker_photo_click, id, nil}upward. The handler guarded onphoto_clickablebut not on there being an item, and the message fired before the card-opening path (which was already nil-safe) could ignore it — so a host matching the documented%Item{}shape crashed. The event is now inert unless both hold, which makes the message’s third element the%Item{}the moduledoc promises. -
Removed two clauses dialyzer reported as unreachable (
open_card/2’s nil fallback, made dead by the fix above, andread_uuid/2’s non-map fallback, already dead since both call sites sit under anis_map/1guard).mix precommitnow exits 0.
Changed
- Minimum
phoenix_kitraised to~> 2.3— the product card usesCore.Modal/PkDialogandStorage.list_files_in_scope/2, which ship in 2.3.
Catalogue 0.15.0. Install or update: {:phoenix_kit_catalogue, "~> 0.15"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.