Skip to content

Catalogue 0.1.9: Per-item markup, paged search and a fuller import

Catalogue 0.1.9 lets a single item override its catalogue’s markup, loads search results as you scroll, and lets an import create or match manufacturers and suppliers along with the items.

What’s new

  • The item form has a Markup Override field: “Leave blank to inherit the catalogue’s markup. Set (including 0) to override just this item.”
  • Search results load in pages as you scroll, with a count of how many are shown. An older, slower search can no longer overwrite a newer one, and a bug that kept tall screens loading forever is fixed.
  • The import can map a Markup % column, recognising names such as “margin” or “juurdehindlus”.
  • Manufacturers and suppliers can be skipped, taken from a column, created, or picked from existing ones during an import. Categories from a column can be matched across all languages.
  • If the import fails while creating categories, manufacturers or suppliers, none are kept.
  • The upload button stays disabled while a file uploads, and empty columns are left out of the mapping.

Upgrading

The per-item markup needs PhoenixKit 1.7.96 or later: update it and run mix phoenix_kit.update. Existing items keep their catalogue’s markup.

Full release notes: Catalogue 0.1.9

0.1.9 · 15 April 2026

Added

  • Paged search with infinite scroll across global, per-catalogue, and per-category views (:limit/:offset on all three search functions; count_search_items* companions for “X of Y” totals)
  • Per-item markup override — nullable markup_percentage on items (nil inherits the catalogue’s markup, any value including 0 overrides it); requires phoenix_kit 1.7.96+ for the V97 migration
  • Item.effective_markup/2 and Catalogue.item_pricing/1 expose which markup applies (catalogue vs item) for pricing UI
  • Import wizard: markup override column with multilingual synonym detection (markup/margin/naceenka/juurdehindlus/aufschlag/…)
  • Import wizard: manufacturer and supplier pickers (four-mode vocabulary :none/:column/:create/:existing), shared <.party_picker> and <.new_party_form> components
  • Import wizard: language-aware category get-or-create with “match across all languages” toggle; inline category creation in :create mode
  • Import wizard: empty-pool warning when a picker column is exhausted by a sibling picker’s mapping

Changed

  • Search uses start_async with a query-equality guard in handle_async, so out-of-order or superseded responses are dropped; scroll paging also runs off the LV process via start_async(:search_page, …) guarded on {query, offset}
  • Import executor phase 1 (get-or-create categories / manufacturers / suppliers) wrapped in a single Repo.transaction so a mid-phase crash rolls back any entities earlier loops persisted
  • Three :create-mode resolutions in the wizard wrap in Repo.transaction at the LV layer so a failure on the second/third doesn’t leave the first as an orphan
  • Catalogue.item_pricing/1 now returns catalogue_markup, item_markup, and effective markup_percentage so callers stay internally consistent
  • IntersectionObserver hook re-fires on updated() — fixes the “loads forever” bug on tall viewports / Page Down

Fixed

  • Upload button stays disabled while the upload XHR is in flight (server-side guard in parse_file) — fixes the “click during upload erases the file” race
  • Parser strips fully-empty columns (blank header AND every data cell blank) — fixes phantom mapping cards on FENIX-style spreadsheets with leading/trailing empty columns
  • Catalogue picker loads on first HTTP mount (no empty-dropdown flash); options show counts (Kitchen · 5 categories · 47 items)
  • Sample data table: # row-number column, truncation tooltips, stable collapse id so morphdom preserves open state

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