Skip to content

v3.0.2

Choose a tag to compare

@58bits 58bits released this 02 Jun 10:45
· 60 commits to main since this release

Highlights

  • @byline/admin / @byline/core / @byline/db-postgres / @byline/host-tanstack-startNew "Delete Locale" document action. Editors can now remove a single non-default content locale from a multilingual document via a new Delete Locale item in the document-actions dropdown (alongside Copy to Locale, Duplicate, and Delete). It opens a modal listing the document's non-default locales — the default locale is the document's anchor (path + source_locale) and can never be removed. Confirming writes a new immutable version that carries forward every other locale and all non-localized fields while dropping the chosen locale's content. The change lands as a draft, so the removal goes through the normal publish gate, and the prior version still holds the locale — making the deletion recoverable via version history. Implemented across the stack: a deleteLocale lifecycle service in @byline/core, a deleteDocumentLocale storage command in @byline/db-postgres, a deleteDocumentLocale server fn in @byline/host-tanstack-start, and the dropdown/modal in @byline/admin. Note for custom-adapter authors: the IDocumentCommands interface gained a required deleteDocumentLocale method, so anyone implementing a bespoke IDbAdapter outside the bundled Postgres adapter must add it.

  • @byline/adminUnsaved-changes prompt before guarded document actions. When a document form has unsaved edits, triggering a workflow status change, Duplicate, or Copy to Locale now surfaces a "save your changes first" modal instead of acting on the stale saved version. These actions operate on persisted data, so the guard prevents silently excluding in-progress edits. Delete is intentionally left ungated.

Bug Fixes

  • @byline/adminLocale badge now shows on localized fields nested in blocks, groups, and arrays. The active content locale is now threaded through the BlocksField, GroupField, and ArrayField renderers, so a localized: true field nested inside a block (e.g. a richtext field) correctly displays the locale badge — matching top-level localized fields. Previously the badge appeared only on fields placed directly in the form layout.

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