Catalogue 0.1.15: Drag and drop to reorder catalogues, categories and items
Catalogue 0.1.15 lets admins put catalogues, categories, items and smart catalogue rules in order by dragging them, instead of clicking move up and down one step at a time.
Each row gets a handle, Drag to reorder (for categories, Drag to reorder (among siblings)). The catalogues list, the categories of a catalogue and the items in a category can all be dragged, and so can the rules on a smart item. An item can be dragged into another category of the same catalogue; dropping it into another catalogue is refused with “Items can only be moved within the same catalogue.” If saving the new order fails, the page says Failed to save the new order. The old Move up and Move down buttons for categories are gone.
The global search orders results by name again, since positions only mean something inside one catalogue.
Full release notes: Catalogue 0.1.15
0.1.15 · 2 May 2026
Added
- Drag-and-drop reorder — catalogues, categories, items, and smart-rule rows can be reordered via DnD. Position writes use a two-pass (negative-then-positive) strategy to avoid unique-index collisions. Cap enforced via
Application.compile_env(:phoenix_kit_catalogue, :reorder_max_uuids, 1000). reorder_categories_groups/3— atomic reorder across multiple parent groups in a single outer transaction (cross-parent partial-commit protection).Helpers.dedupe_keep_last/1— shared last-wins deduplication for DnD payloads, replacing ad-hocEnum.uniqcalls.
Changed
- Audit-trail integrity on cross-category item moves — rejection and DB-error log rows from
reorder_items/4insidemove_item_and_reorder_destination/4now survive outer-transaction rollbacks (split into unlogged inner + logged outer). refresh_card_items/3— gains explicitdeltaparam (default0). In-scope reorder no longer inflates the limit by+1on every drag.@reorder_max_uuidsconsolidated toApplication.compile_env/3— single config source shared byCatalogueandRules.- Global
search_items/2order_by— reverted toname + uuidonly.positionis per-scope and meaningless across catalogues; catalogue-scoped search keeps it.
Fixed
- Duplicate
list_catalogue_rulesquery on smart-item mount eliminated — single fetch derives bothworking_rulesandrule_candidate_order. - Smart-rule DnD now uses
dedupe_keep_last(last-wins) matching catalogue/category/item reorder semantics.
Catalogue 0.1.15. Install or update: {:phoenix_kit_catalogue, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.