Catalogue 0.34.0: Free decimal quantities in the item selector
Catalogue 0.34.0 lets a host app’s item selector take quantities with as many decimals as needed, never rounded.
Free decimal quantities
A host page can now open the item selector with any precision for its quantities. Then typing “1,2345” keeps 1.2345. The quantity control becomes a plain text field with a decimal keyboard, so the browser’s own number rules cannot reject a dot or a comma. The server still checks the value: digits only with up to 12 decimals, the host’s minimum and maximum, and the safety limit.
The default stays as it was: whole numbers, or the fixed number of decimals the host asks for.
Fixes
- A row no longer lights up as selected for a quantity the server refuses, such as “2.5.1”, “2abc” or “1e9”. Before, the highlight stayed until the next redraw.
- A host that passes an invalid precision now gets a clear error when the selector starts, instead of a crash or odd behaviour later.
Upgrading
No migration and no change in requirements. Update the dependency. Nothing changes until a host page asks for free decimal quantities, with qty_precision: :any on the item selector.
Full release notes: Catalogue 0.34.0
0.34.0 · 16 September 2026
Review: dev_docs/pull_requests/2026/121-item-selector-free-qty/.
Added
- Free-decimal quantities in the item selector (#121).
ItemSelectorModalacceptsqty_precision: :any. Quantities are never rounded (typing “1,2345” keeps 1.2345), and the control is a plain text input with a decimal keyboard, so the browser’s number-input locale rules can’t reject a dot or a comma. The server still enforces the digits-only pattern (up to 12 decimals),qty_min/qty_max(taken unrounded) and the safety ceiling.Browse.qty_stepper/1acceptsprecision: :any.
Fixed
- The quantity control’s instant highlight no longer marks a row selected for input the server rejects (“2.5.1”, “2abc”, “1e9”). It used to stay highlighted until the next re-render.
ItemSelectorModalraises anArgumentErrorat init whenqty_precisionis not a non-negative integer or:any. Before, it crashed later or misbehaved without an error.
Changed
- Dependencies: phoenix_kit_templates 0.1.2 (lock only).
Catalogue 0.34.0. Install or update: {:phoenix_kit_catalogue, "~> 0.34"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.