Skip to content

Commit

Permalink
Update Gutenberg lifecycle clarity and grammar (#13574)
Browse files Browse the repository at this point in the history
* Update Gutenberg lifecycle clarity and grammar

Simplified sentence structure, semantics of the closing paragraph. Also made redundant content relevant to the overall aims of the passage.

* Update key-concepts.md
  • Loading branch information
Raymond Johnson authored and youknowriad committed Mar 6, 2019
1 parent e979458 commit d043910
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/designers-developers/key-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,6 @@ A purely dynamic block that is to be server rendered before display could look l

## The Gutenberg Lifecycle

In summary, the workflow for editing a Gutenberg post starts with taking the persisted version of the document and generating the in-memory tree, aided by the presence of token delimiters. It ends with the reverse: serialization of blocks into `post_content`. During editing, all manipulations happen within the block tree. In summary, a Gutenberg post is built upon an in-memory data structure which gets persisted somehow in an fully-isomorphic way. Right now that persistence is via a serialization/parser pair but could just as easily be replaced through a plugin to store the data structure as a JSON blob somewhere else.
In summary, the Gutenberg workflow parses the saved document to an in-memory tree of blocks, using token delimiters to help. During editing, all manipulations happen within the block tree. The process ends by serializing the blocks back to the `post_content`.

The workflow process relies on a serialization/parser pair to persist posts. Hypothetically, the post data structure could be stored using a plugin or retrieved from a remote JSON file to be converted to the block tree.

0 comments on commit d043910

Please sign in to comment.