Skip to content

Catalogue 0.18.0: An item picker popup and suppliers managed in CRM

Catalogue 0.18.0 adds a popup for picking items with quantities and a browse widget that other pages can embed, and leaves suppliers and manufacturers to the CRM module.

Item picker popup and browse widget

Two new components let other modules and the host app put the catalogue on their own pages. The item picker popup lets a signed-in user search, filter by category chips and pick items with quantities, then hands the choice back to the page. The browse widget shows a searchable grid of a catalogue, or part of one, on any page for signed-in users. The page that embeds them sets the scope, such as which catalogues and which statuses, and nothing outside it can be browsed or picked. Cards show the selling price, the same as the single-item picker.

Suppliers and manufacturers move to CRM

The Manufacturers and Suppliers pages are gone from the catalogue admin. Suppliers and manufacturers are now companies in the CRM module, and the item form picks them from there in its Suppliers and Manufacturer section. Existing catalogue rows are still shown, and sites without CRM keep the ones they have. On the item form, a supplier link is now just a link: the cost, lead time and minimum order fields are hidden for now. The stored values are kept. With the Comments module installed, a supplier row shows the comments of that CRM company.

Fixes

  • Searching by status was ignored, so a picker limited to active items still offered inactive and discontinued ones.
  • Preselected items without a category, or in a nested category, crashed the picker or were dropped.

Upgrading

No migration. New suppliers and manufacturers are added in CRM from now on; the CRM module’s mix phoenix_kit_crm.import_suppliers_from_catalogue links existing catalogue suppliers to CRM companies. Bookmarks to the old manufacturer and supplier pages no longer work.

Full release notes: Catalogue 0.18.0

0.18.0 · 22 August 2026

Added

  • Item selector modal and embeddable browse components (#76) — a client-facing “pick items with quantities” modal (the catalogue’s MediaSelectorModal analogue) plus the stack it is assembled from: Catalogue.BrowseState (pure reducer, no process), Web.Components.Browse (card / grid / chips / qty stepper), ItemSelectorModal, and CatalogueBrowse for a scoped catalogue surface on any logged-in page. Scope is a security boundary (search_items/2 vocabulary, including :statuses and :include_descendants); quantities are Decimal end to end; confirm hands the host a display snapshot (re-price server-side).

Fixed

  • :statuses on search_items/2 was documented and then ignored — BrowseState forwarded it, Search never read it, so statuses: ["active"] still listed inactive/discontinued items and the picker would select them. Search now filters; atoms stringify; soft-deleted rows stay excluded.
  • Picker hydration crashed on an uncategorized preselect against a category_uuids / :categorized_only scope (to_string(nil)), and :categorized_only itself was missing from the availability check — the hole :uncategorized_only already had a pin for.
  • Descendant-category preselects were marked unavailable even though Search expands parent scopes by default, so an order line in a nested category silently dropped on confirm.
  • Cards showed base_price, not the selling price — present_items/2 now uses Catalogue.item_pricing/1’s final_price, matching ItemPicker. Starting qty is 1; Item.default_value is the smart-catalogue fee fallback, not a pick quantity.
  • Invalid quantity commits did not recreate the input — the documented per-row revision that forces morphdom to drop typed garbage was never incremented.
  • Category chips preloaded every item in the catalogue; preselect hydration was N+1 get_item/1 and could confirm a deleted row. Chips now use the metadata listing; hydration uses list_items_by_uuids/2.
  • CatalogueBrowse lacked the picker’s event catch-all and scope-key validation — a crafted payload or a string-keyed scope could crash the host LV or silently widen browsing. Both live in BrowseState.init/1 now.
  • Declare rustler as an optional Hex dep (#77) so mdex_native can force-build its NIF from source (MDEX_NATIVE_BUILD=1) on OTP 28, which ships no precompiled artefact. Same declaration core phoenix_kit already carries.

See PR #76 and PR #77 reviews for the full findings.


Catalogue 0.18.0. Install or update: {:phoenix_kit_catalogue, "~> 0.18"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.