Releases: sanity-labs/sanity-plugin-workflows
v0.6.1
Patch Changes
-
f078905: Stop leaving an empty grid row when workflow fields are hidden
withWorkflownow injects a document-levelinputcomponent that filters the injectedstatusandassignmentsmembers out of the form when noworkflow.definitiontargets the document type. Previously the fields were only hidden visually, so Sanity's per-field comments wrapper (FieldStack) still occupied a grid row and pushed the remaining fields down. Anycomponents.inputthe document already declares is preserved and rendered with the filtered members.
v0.6.0
Minor Changes
-
bdd3dbc: Fix workflow field wrappers hiding unrelated UI by mutating parent DOM
The
status,assignments, andstatusesfield wrappers previously setdisplay: noneon their parent DOM element via auseEffect. When these fields rendered outside the document form (for example in the Studio's compare versions tool), the parent was a shared layout container, so entire panes were blanked out — and the inline style persisted even after the component unmounted.The wrappers now use React's
<Activity>component to hide their own subtree instead, which never touches DOM outside the component and pauses effects of hidden content. Fields are also hidden while the workflow lookup is in flight, removing the flash where inputs briefly appeared and then disappeared when opening a document without a workflow.Note: the
reactpeer dependency is now^19.2, since<Activity>shipped in React 19.2.
v0.5.0
Minor Changes
-
dd274ac: Namespace the workflow stage color type to avoid collisions with host studios.
v0.4.0 registered
@sanity/color-inputviacolorInput(), which defines a globalcolorobject type. Studios that already define their owncolortype (for example acolorproduct-attribute document) failed to compile with "A type with name 'color' is already defined".The stage color field now uses a namespaced
workflow.colorobject that reuses color-input's field structure, preview, andColorInputcomponent, so the plugin no longer registers the barecolortype. No consumer configuration is required.Breaking: stage
colorvalues stored under_type: 'color'(v0.4.0) or as legacy hex strings (<= v0.3.0) must be converted. Run the bundled migration:npx sanity migration run color-to-color-input
v0.4.0
Minor Changes
-
251646e: Restore the Lucide icon picker and add a color picker to workflow stages.
- The
workflow.lucideIconfield uses thesanity-plugin-lucide-icon-pickerinput again, fixing a v0.3.0 regression where it rendered as a plain text field. The stored kebab-case string is unchanged. - The
workflow.stagecolorfield is now a@sanity/color-inputcolor object instead of a hex string, giving editors a real color picker. The plugin registerscolorInput()automatically, so no consumer configuration is required.
Requires
@sanity-labs/workflow-kit>= 0.4.0, which projects stage/off-ramp colors viacoalesce(color.hex, color).Breaking: existing
workflow.definitiondocuments storecoloras a hex string. Run the bundled migration to convert them to the new object shape:npx sanity migration run color-to-color-input - The
v0.3.0
Minor Changes
-
dedfc4d: Breaking change: namespace all bundled workflow schema types under
workflow.*to avoid claiming generic global schema names in consuming Studios.Schema type names changed as follows:
workflowDefinition->workflow.definitionworkflowRole->workflow.roleworkflowStage->workflow.stageworkflowOffRamp->workflow.offRamptaskTemplate->workflow.taskTemplateassignment->workflow.assignmentsetStatus->workflow.setStatususer->workflow.userlucide-icon->workflow.lucideIcon
This release also removes the deprecated document lifecycle dashboard schema types
workflowsConfig,tableView, andtableViewColumnfrom the plugin's default schema types and public schema entrypoint. These types were orphans from early stage development and were unused.Existing datasets with workflow definitions, injected
assignments, or auditstatusesmust migrate persisted_typevalues before the Studio will fully validate historical data. A copyable Sanity migration is included atmigrations/namespace-workflow-schema-types, and the README includes full upgrade notes in the "Migrating to 0.3.0" section.
v0.2.4
Patch Changes
-
7547690: Hide the injected
assignmentsfield on document types that have noworkflowDefinition, matching the visibility behavior of the injectedstatusandstatusesfields.Resolve the injected
statusfield's initial value from the attached workflow's first stage instead of hardcodingdraft, and leave it unset when no workflow applies.Require
@sanity-labs/workflow-kit@^0.2.1, which makesStatusPathInputrespect Sanity document update permissions so users without edit access can no longer change a document's workflow stage.
v0.2.3
v0.2.2
Patch Changes
-
707785e: Improve the default assignment object experience in Studio.
Assignment previews now resolve project member display names and avatars from project access data
instead of only showing the raw assigned user id. The assignment type input now falls back to the
default string input when workflow role options are unavailable, avoiding a blank or broken role
selector in custom workflow setups.
v0.2.1
Patch Changes
-
c6e14ed: Remove Sanetti-specific default excluded document types from
withWorkflow()so only
workflowDefinitionandworkflowsConfigare excluded by default.Update the README and API reference to clarify the new default exclusion behavior and explain
how plugin behavior varies across Sanity plans.
v0.2.0
Minor Changes
-
8fd819b: # Changes
BREAKING:
generateAssignmentObjecthas been removed. Use the exportedassignmentObjectdirectly. If you need additional fields on assignments (e.g. channel, market, region), define your own schema type withname: 'assignment'and register it viaworkflowsPlugin({schemaTypes: [yourAssignment]})— the plugin merges schema types by name, so yours replaces the default.The
assignmentGroup/assignmentGroupLabel/assignmentGroupOptionsoptions are gone with the generator. Existing documents that stored these values will retain them as orphan data; run a one-offunsetmigration if you want to tidy them up.New feature:
withWorkflownow auto-injects anassignmentsarray field on every workflow-aware document by default. Opt out withworkflowsPlugin({injectAssignments: false}), or by declaring your ownassignmentsfield on the document type.Nicety:
workflowsPlugincan now be called with no arguments (workflowsPlugin()) for the default setup. PassingworkflowsPlugin({})still works.