Skip to content

Draft

Defined in: core/src/store/types.ts:204

What is shown over the committed data, in two layers. Renderers read a task’s values with selectTaskPatch.

  • The committed layer (controlled data only): change sets committed with applyChangeSet (and the rollback of a session) that the owner has not applied yet. They are part of the data until the owner’s next setTasks, which alone clears the layer (setLinks, setOptions, previews and further commits keep it), so edit sessions and the history count it (selectCommittedPatch).
  • The preview layer on top: the change set of setDraft, e.g. a drag preview; replaced or removed by the next setDraft, removed by applyChangeSet and setTasks.

changeSet and patches are the combined overlay that is drawn; with one layer they are that layer’s own. Deeply frozen.

readonly changeSet: ChangeSet

Defined in: core/src/store/types.ts:206

The preview’s change set when there is one, else the committed layer’s.

DraftLayer.changeSet


readonly committed: boolean

Defined in: core/src/store/types.ts:213

true exactly when there is a committed layer: a committed change the owner of controlled data has not applied yet, also under a preview. false for a preview alone.


readonly committedLayer: DraftLayer | undefined

Defined in: core/src/store/types.ts:215

The committed layer; undefined without one.


readonly patches: ReadonlyMap<TaskId, TaskPatch>

Defined in: core/src/store/types.ts:208

The committed layer’s patches with the preview’s over them (where both change a task).

DraftLayer.patches


readonly previewLayer: DraftLayer | undefined

Defined in: core/src/store/types.ts:217

The preview layer; undefined without one.