dvanoni / notero

A Zotero plugin for syncing items and notes into Notion
MIT License
2.13k stars 94 forks source link

feat(sync): Allow for synced parent blocks #485

Closed auscyber closed 3 weeks ago

auscyber commented 4 months ago

This sets the parent block to delete and redelete to be the parent block of the replaced block, this allows for the ability to put them inside synced blocks and have them sync. If the parent block doesn't exist, use the other one, simple as that

auscyber commented 4 months ago

there is a lil bit of hacky code here as well, the retrieving children part is to make it verify that the parent block is real, because if you delete a block including its children, retrieval still returns a block, despite the fact its deleted. however, if you grab its children, it throws a validation error, these two things allow you to detect a deleted block to allow for creation of a new container block and note block

auscyber commented 2 months ago

@dvanoni I'm currently using this branch on my own, can u review this?

auscyber commented 3 weeks ago

it makes a lot of sense that way haha

dvanoni commented 3 weeks ago

@AusCyberman, this is now released in v0.5.17! Thanks again for the contribution! 🎉