cleanup, docs

This commit is contained in:
Loren Norman 2025-02-07 11:53:41 -05:00
parent 4157ad3026
commit 0bd7428042
3 changed files with 40 additions and 3 deletions

View file

@ -4,14 +4,15 @@ A custom Blockly app needs to define:
- blocks
- inputs
- fields
- validators
- generators
- extensions
- mixins
- mutators
- extensions
- validators
- toolboxes
- categories
- buttons
- labels
- workspaces
- starting blocks
- settings

36
lifecycle.md Normal file
View file

@ -0,0 +1,36 @@
# Lifecycle of a Blockly App
## Using Blockly Tool
- generate new app
- configure
- run the dev server
- create a workspace, a toolbox, and some blocks
- run the exporter
- take your exported blockly files to where you want them
## Blockly (De)Serialization
When `Blockly.serialization.workspaces.load` is called, serializers are called in order with state to deserialize.
### Deserialization Order
1. **Variables**
2. **Procedures**
3. **Blocks** Top-level blocks are deserialized in an arbitrary order.
1. **Type**
- constructs the block, calls its init method, mixes in extensions
2. **Attributes**
- including global block properties, like: x, y, collapsed, disabled, and data
3. **Extra state**
- see the Extensions and Mutators
4. **Parent Connection**
5. **Icons**
- arbitrary order
6. **Fields**
- arbitrary order
7. **Input Blocks**
- both value and statement inputs, arbitrary order
- recursive
8. **Next Blocks**
- recursive

View file

@ -1,4 +1,4 @@
### Acton Specification
### Action Specification
```js
const actionSpecification = {