sanity-plugin-workflow 1.0.0-beta.3 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,6 +12,8 @@ With Sanity Studio you can [customize your content tools to support arbitrary wo
12
12
 
13
13
  This plugin is distributed as a **reference implementation** of these customization APIs and is not considered to be a feature-complete implementation of what workflow management requires in production. It is a starting point intended to be forked and customized to the needs of your organization and content creators.
14
14
 
15
+ ![Screenshot 2023-03-21 at 12 11 24](https://user-images.githubusercontent.com/9684022/226602179-5bd3d91a-9c27-431e-be18-3c70f06c6ccb.png)
16
+
15
17
  ## Features
16
18
 
17
19
  This work demonstrates how a single plugin can define:
@@ -69,10 +71,13 @@ Documents can be promoted and demoted in the Workflow with the provided Document
69
71
  // Optional settings:
70
72
  // Used for the color of the Document Badge
71
73
  color: 'success',
72
- // Will enable document actions and drag-and-drop for only users with these Role
74
+ // Will limit document actions and drag-and-drop for only users with these Role
73
75
  roles: ['publisher', 'administrator'],
74
76
  // Requires the user to be "assigned" in order to update to this State
75
77
  requireAssignment: true,
78
+ // Requires the document to be valid before being promoted out of this State
79
+ // Warning: With many documents in the Kanban view this can negatively impact performance
80
+ requireValidation: true,
76
81
  // Defines which States a document can be moved to from this one
77
82
  transitions: ['changesRequested', 'approved']
78
83
  }
package/lib/index.d.ts CHANGED
@@ -6,6 +6,7 @@ declare type State = {
6
6
  title: string
7
7
  roles?: string[]
8
8
  requireAssignment?: boolean
9
+ requireValidation?: boolean
9
10
  color?: 'primary' | 'success' | 'warning' | 'danger'
10
11
  }
11
12