Skip to content

Instantly share code, notes, and snippets.

@sid597
Last active August 1, 2021 07:35
Show Gist options
  • Save sid597/af8c6de13b2fa97416e856032942305a to your computer and use it in GitHub Desktop.
Save sid597/af8c6de13b2fa97416e856032942305a to your computer and use it in GitHub Desktop.
NOTE: Another way of looking at the _page_ structure which will come in handy is: it is a seq of seqs, where each seq
contains blocks, and adding or removing to the seq does not update the seq's indexes we have to do it.
From 10k feet we can say the following things are happening **whenever we select and move some blocks**:
- Some blocks are added, removed, added + removed etc. all these scenarios are:
- Blocks are being **removed** from some parent/list **and added to** another parent/list
- Block(s) are **removed and added** to the same parent/list, i.e some children of a block are rearranged
- Second example from the above section
- Block is **only added** to some parent, this happens if we create a block ref by selecting a block and moving it
under some other parent
- Due to the adding and removing we now need to reindex blocks inside some parents/lists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment