Extends · closed
| type Operation tag, always `DeleteBlocks`. | DeleteBlocks | |
| blocks Ids of the blocks to delete. | of |
DeleteBlocks takes blocks out of the document. It is a move: each listed block is placed under a special trash parent. So deletion follows the same "latest move wins" rule as any other move, and a later Change can bring the block back.
This page defines the change/op/delete-blocks operation inside a Change body. Its formal schema is attached as the schemaDefinition in this document's metadata, so the app can show it.
blocks lists the ids to delete. Children of a deleted block go with it, because they hang off a parent that is no longer visible. The block's content register is untouched. That is why the history still shows what the block said, and why restoring is a single move. When the daemon prepares a Change for the Seed app it emits one DeleteBlocks, after the moves and before the attribute and content ops, and drops blocks that were created and deleted within the same Change. See Documents.
See also
MoveBlocks: the move rules deletion follows.
ReplaceBlock: the content register a delete leaves alone.
change/op: all operations.
Documents: replay and history.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime