Skip to content

v3.14.0

Choose a tag to compare

@58bits 58bits released this 27 Jun 12:06

Highlights

  • @byline/core + @byline/db-postgres + @byline/client + @byline/adminhasMany relations. A relation field can now reference an ordered list of targets instead of a single one by setting hasMany: true (with optional minItems / maxItems). The value is modelled as an array of relation values: each item persists as its own store_relation row at an indexed path (gallery.0, gallery.1, …) and reconstructs in order — no new database column and no migration (the existing unique(version, field_path, locale) constraint already permits it, since each index is a distinct path). populate resolves each element into its own envelope, yielding an ordered array of populated values; a deleted target surfaces as a _resolved: false slot in place rather than collapsing the array. The new WithPopulatedMany<F, K, Target> helper (@byline/client) types the populated array shape. In the editor the field renders as a drag-reorderable list of summary tiles — reusing the same RelationSummary the single field uses, so each row shows the target's real title/thumbnail rather than a bare id — each with a remove control and an "Add" button that appends through the standard picker. Items are identified by targetDocumentId (a target may appear at most once). A reference field, pagesgallery (hasMany → media), ships in the example app. Filtering queries by a multi-target relation ($some / $every / $none where quantifiers) and picker multi-select are planned Phase 2 follow-ups; creating, reading, populating, and editing ordered lists all work today.

Chores

  • monorepo — the admin editor smoke suite (Playwright) grew from three scenarios to eleven, now covering every field surface end-to-end — text, select, checkbox, datetime, relation, hasMany relation, and richtext-in-blocks — plus list / dashboard / create / status. All create/mutate flows were moved onto the pages collection so the suite no longer writes throwaway documents into docs.
  • @byline/client — added integration coverage for the read-time richtext relation populate primitive (embedded internal-link envelopes refresh when populateRelationsOnRead is true and stay snapshot-stale when false).

All other @byline/* packages bumped to 3.14.0 in lockstep with no behavioural changes this cycle.