Catalogue 0.17.0: Attribute sets replace attribute groups
Catalogue 0.17.0 replaces attribute groups with attribute sets. A set is one dimension from one vendor, such as a range of colours, and an item can carry several sets at once.
Attribute sets
Before, an item had one attribute group with its attributes and values. Now an item can carry any number of sets: a door can have a colour set and a width set from the same vendor. Sets are kept in the Entities module, and each set can have extra fields per value, such as a price per litre or a drying time, added without code or a migration.
The attributes tab lists Attribute sets with New Set and an editor for each set’s values. On the item form, Attach a set… adds a set, and sets can be detached and put in order. A set attached to items can’t be deleted. The product card shows every set on the item.
Existing attribute groups are moved into sets automatically at start-up, and again from the attributes page if needed. The old group tables and pages stay as a read-only fallback.
Changes to sets and their values now show up in other open admin tabs without a reload.
Other changes
The card, compact and table view switch on the catalogue list moved into the toolbar next to the columns button, so it is always there instead of only next to the Active and Deleted tabs.
Upgrading
Attribute sets need phoenix_kit_entities 0.4 or later with Entities turned on (the entities_enabled setting). The item-to-set table comes with PhoenixKit core’s V177 migration, so run mix phoenix_kit.update. Without Entities, sets are not available.
Full release notes: Catalogue 0.17.0
0.17.0 · 19 August 2026
Added
- Attribute sets (#74) — replaces the old group→attribute→value
hierarchy with sets: one dimension from one vendor (“Ikea colors”),
stored as managed
phoenix_kit_entitiesblueprints. Items attach any number of sets (a door can carry “Ikea colors” + “Ikea widths”) through a new catalogue-owned join table (phoenix_kit_cat_item_attribute_sets, shipped in corephoenix_kit; this repo adds no migration). A per-value extras mechanism (fields_definitionon the blueprint — “price per liter”, “drying time”, …) lets admins add fields to a set without code or a migration. NewCatalogue.AttributeSetscontext,AttributeSetFormLiveeditor, multi-set attach/detach/reorder UI in the item form, and a product card that renders N sets instead of one group. Legacy groups auto-migrate to sets on boot; the old group tables and UI stay in place, read-only, as a fallback. Requiresphoenix_kit_entities ~> 0.4(entities_enabledsetting must be turned on). - Catalogues toolbar: the card/comfy/table view-mode toggle moved from the Active/Deleted trash-tabs row into the toolbar’s view-tools cluster, next to “Columns” (#73) — it’s a “how am I viewing this list” control, not a trash-visibility one, and previously only showed up paired with the trash tabs.
Fixed
- Attribute-set mutations didn’t broadcast PubSub — every other context
module in this library fans out a
Catalogue.PubSubevent on every write;AttributeSetsshipped with none, so a second open admin session (or a second tab) never saw live updates to sets, values, or item attachments without a full page reload. Set/value/field CRUD now broadcasts:attribute_set; item attach/detach/reorder/selection changes now broadcast:itemscoped to the item’s catalogue, matching the legacy group-assignment broadcast this replaces. update_attribute_set/3could persist a default value pointing at nothing — a stale form resubmit (or any future non-UI caller) could setdefault_value_slugto a slug with no matching value record, and the resolved read path would hand every consumer (product card, order-line resolution) a ghost default with no error. The write now validates the slug against the set’s current values and returns{:error, :contract_broken}instead.- The set editor silently swallowed a failed value-reorder write —
reorder_valuesnow flashes an error like every other mutation in the same LiveView, instead of just snapping the drag back to the stored order. - 12 new attribute-set error atoms (
:contract_broken,:set_in_use,:not_attached, etc.) now have centralErrors.message/1translations and test pins, per this library’s error-atom convention — previously only covered by ad hoc local flash text in the two call sites that happened to handle them.
Changed
phoenix_kit_entitiesbumped0.4.2→0.4.3inmix.lock—0.4.2doesn’t shipComponents.FieldInput, which the new set editor imports, so a cleanmix deps.getfrom Hex failed to compile.mix.exs’s~> 0.4constraint already allowed it; this is a lock-file update only.
Catalogue 0.17.0. Install or update: {:phoenix_kit_catalogue, "~> 0.17"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.