Catalogue 0.29.0: Manual order is the default everywhere
Catalogue 0.29.0 makes the hand-arranged Manual order the default for every list of items, so pickers, the browse embed and the item selector show items the way the admin arranged them.
Manual order by default
Item searches now sort by Manual order unless asked otherwise. The order starts with the catalogue: its position and name, then the category’s position, with items without a category last, then the item’s own position and name. This works the same whatever the scope.
The browse views, the item selector and the item picker now ask for Manual order for every scope. Before, a picker limited to one category listed it A to Z while the admin showed the hand-arranged order. A live search follows the same order as the admin’s own search inside a catalogue. Catalogue lists with tied positions are sorted by name, as the admin index already did.
Fixes
- Items whose catalogue was deleted for good were left out of the list the Translations page and the translation sweep go through, so they looked already translated. They are now included and sort last.
- A sort preference set on one admin page can no longer break the browse embed and the item selector for everyone when they open.
- The catalogue-wide item list and the paged one no longer disagree on items that tie on category, position and name.
Upgrading
No migration and no change in requirements. Update the dependency. For developers: a host app that calls Catalogue.search_items/2 without an :order now gets Manual order instead of A to Z; pass order: :name to keep the old order. An unknown :order now raises an error instead of falling back to name order.
Full release notes: Catalogue 0.29.0
0.29.0 · 12 September 2026
Changed
- Manual (document) order is now the default order for every item
fetch.
Catalogue.search_items/2‘s:orderdefaults to:positioninstead of:name, and the:positionchain now leads with the catalogue — catalogue position, lowercased catalogue name, catalogue uuid, category position (uncategorized last), then the item’s own position, name and uuid. Leading with the catalogue makes the chain coherent for any scope, so a caller no longer has to reason about whetherposition“applies” to what it asked for. A host callingsearch_items/2without an explicit:orderwill see items in the admin’s hand-arranged order rather than A→Z; passorder: :namefor the previous behaviour (#110). search_items/2now raisesArgumentErroron an:orderoutside its vocabulary (:position,:name, or{field, :asc | :desc}withfieldin[:name, :sku, :base_price, :status]). It previously fell through to name order, turning a misspelt sort into a silently wrong listing (#110).Catalogue.list_items/1andlist_catalogues/1read in the same Manual order;list_catalogues/1tie-breaks tied positions onlower(name), which is what the admin index’s own sort already used, so the listing and the printed document order can no longer disagree on rows that tie (#110).search_items_in_catalogue/3no longer carries its own copy of the order chain — it delegates tosearch_items/2with:orderpinned, so the two cannot drift (#110).- The browse stack (
Catalogue.BrowseState, the browse embed, the item-selector popup and the item picker) asks for Manual order for every scope. The old “only when exactly one catalogue is in scope” gate silently dropped Manual for a category-scoped picker (category_uuids: [cat],catalogue_uuids: nil), which is what listed a category A→Z while the admin showed the hand-arranged order (#110). A live search now takes the fetch layer’s default too, matching the admin’s own in-catalogue search results.
Added
Catalogue.BrowseState.order_fields/0— the browse-sort vocabulary as a single list, so the sortable-column set, whatBrowseState.init/1admits and what the fetch layer can build anORDER BYfor stay one list (#110).
Fixed
Catalogue.list_items/1no longer drops items whose catalogue was hard-deleted.catalogue_uuidis nullable with anON DELETE SET NULLforeign key, sodelete_catalogue/2orphans an item rather than removing it; the catalogue join added for Manual ordering was an inner join and silently excluded every such row from the function’s only caller, the Translations page’s and sweep worker’s item enumeration, where a missing row reads as “already translated”. The join is now a left join and orphans sort last.- The module’s shared item sort is clamped to the browse vocabulary in
one place (
Web.Components.Browse.global_items_order/0) rather than at one of its three call sites. Making any further:detail_itemscolumn sortable would otherwise have raised insideBrowseState.init/1and taken down the browse embed and the item-selector popup on open, for every user of the host, because of a sort preference set on an unrelated admin page. A new conformance test pins the vocabularies against each other so the clamp stays a backstop. Catalogue.list_items_for_catalogue/2gains theuuidtie-breaksearch_items/2’s Manual chain already had, so the unpaged catalogue-wide read and the paged one cannot disagree on two items that tie on category, position and name.
Catalogue 0.29.0. Install or update: {:phoenix_kit_catalogue, "~> 0.29"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.