Roam-Research / issues

Roam Research - A note-taking tool for networked thought.
https://roamresearch.com/
304 stars 7 forks source link

Block deletion results in deletion of the parent block #590

Closed kylestratis closed 3 years ago

kylestratis commented 3 years ago

Describe the bug

This was discovered by users losing data via Readwise's sync and Tristan at Readwise for debugging. Deleting a child block used to delete that block specifically, but as of the ~25th now deletes the parent block. This caused the Readwise sync (which deleted a single block previously) to delete daily pages as it needs to delete a block as part of its regular cleanup.

https://slack-files.com/TNEAEL9QW-F01DZMV6SG1-933183d846

To Reproduce

Steps to reproduce the behavior:

  1. Create a page, call it "parent"
  2. Create a block under it. You can even create a grandchild block
  3. Focus on either block
  4. Delete the block via the top menu, and the modal will prompt to delete the entire page.

System Information:

Additional context A number of users were affected by the data loss that this has caused.

Bardia95 commented 3 years ago

This is not a bug, and the expected behaviour. Before, the delete function was supposed to be for the page, but was incidentally working to delete the block as per Readwise's hack to remove the standard import statements :)