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
MediaSelectorModalanalogue) plus the stack it is assembled from:Catalogue.BrowseState(pure reducer, no process),Web.Components.Browse(card / grid / chips / qty stepper),ItemSelectorModal, andCatalogueBrowsefor a scoped catalogue surface on any logged-in page. Scope is a security boundary (search_items/2vocabulary, including:statusesand:include_descendants); quantities are Decimal end to end; confirm hands the host a display snapshot (re-price server-side).
Fixed
:statusesonsearch_items/2was documented and then ignored —BrowseStateforwarded it, Search never read it, sostatuses: ["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_onlyscope (to_string(nil)), and:categorized_onlyitself was missing from the availability check — the hole:uncategorized_onlyalready 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/2now usesCatalogue.item_pricing/1’sfinal_price, matchingItemPicker. Starting qty is 1;Item.default_valueis 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/1and could confirm a deleted row. Chips now use the metadata listing; hydration useslist_items_by_uuids/2. CatalogueBrowselacked 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 inBrowseState.init/1now.- Declare
rustleras an optional Hex dep (#77) somdex_nativecan force-build its NIF from source (MDEX_NATIVE_BUILD=1) on OTP 28, which ships no precompiled artefact. Same declaration corephoenix_kitalready carries.
Catalogue 0.18.0. Install or update: {:phoenix_kit_catalogue, "~> 0.18"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.