Catalogue 0.38.0: Product card built on PhoenixKit's preview card
Catalogue 0.38.0 moves the product card’s layout into PhoenixKit core, so the catalogue item card and a host app’s own preview cards share one component.
One card for catalogue and host
The product card is now drawn by PhoenixKit core’s preview card. Core’s version is the same design, made general for any record with photos and files: the photos-then-files swipe carousel, the jump strip, the fields grid and the compact file list. A host app can use it for its own records and get the same card as the catalogue.
For the catalogue, nothing changes in how the card looks or behaves. Pages that embed the card keep working with the same options. The card body no longer requires an event target, since it sends no events of its own; one that is passed is still accepted and ignored.
Item titles
When an item has no name in the current language, the card fell back to core’s generic “Preview”. It says “Item” again, from the module’s own translations, in the card title, the carousel’s label and the image alt text. A blank name now falls back the same way; before, it showed an empty title.
Upgrading
Catalogue 0.38 needs PhoenixKit 2.30.0 or later, where the preview card first ships. The declared requirement still allows older cores, but on a core older than 2.30.0 the module does not compile, so update core first. No migration.
Full release notes: Catalogue 0.38.0
0.38.0 · 18 September 2026
Review: dev_docs/pull_requests/2026/126-product-card-on-core-preview-card/.
Changed
- The product card’s markup now lives in core (#126).
ProductCard.product_card/1andproduct_card_body/1delegate toPhoenixKitWeb.Components.Core.PreviewCard(phoenix_kit#827) — the same photos-then-files swipe carousel, jump strip, fields grid and compact file list, generalised for any resource with photos and files, so the catalogue item card and a host’s own preview cards share one implementation. Both functions keep their names, their attrs and their behaviour; the DB-backed helpers (resolve_images/1,resolve_files/1,resolve_name/2,build_fields/3) are untouched. product_card_body/1‘s:targetattr is no longerrequired:— core’spreview_card_body/1renders no event of its own, so the body has nothing to point at. It is still accepted, and ignored, for compatibility with hosts that pass it.- Dependency bump:
phoenix_kit2.30.0.
Fixed
- The nameless-item card title no longer changes wording when it falls back.
Delegating passed the raw name through, so an item with no name in the active
locale fell back to core’s generic “Preview” from core’s gettext backend;
it says “Item” again, from this module’s own
et/rucatalogues, in the modal title, the carousel’saria-labeland the imagealt. A blank ("") name now falls back too, where it previously rendered an empty title.
Upgrade notes
- Requires
phoenix_kit >= 2.30.0.PreviewCardfirst ships there, and this module now references it unguarded. The declared requirement is deliberately left at>= 2.13.11 and < 3.0.0so hosts keep a loose constraint, but a host resolving a core older than 2.30.0 will fail to compile this module.
Catalogue 0.38.0. Install or update: {:phoenix_kit_catalogue, "~> 0.38"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.