Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

when restore subpage in trash, subpage can not restore to page tree #162

Closed
z4cki opened this issue Jun 29, 2022 · 5 comments · Fixed by #421
Closed

when restore subpage in trash, subpage can not restore to page tree #162

z4cki opened this issue Jun 29, 2022 · 5 comments · Fixed by #421
Assignees
Labels
bug Something isn't working

Comments

@z4cki
Copy link
Contributor

z4cki commented Jun 29, 2022

Describe the bug

https://www.loom.com/share/56e278033adc467baafaeee3e67bd539

It's a logic issue: When we remove page and subpage respectively, and then we restore the subpage, and keep the page removed, we can not see subpage in page tree


behavior in mac os: when the page and subpage are in trash, restore subpage is not working

To Reproduce

  1. create a page tree
  2. remove subpage
  3. remove page
  4. go to trash
  5. restore subpage
  6. it can not appear in page tree
  7. only when we restore the page, the subpage appear

Expected behavior

No response

Additional context

No response

Logs/tracebacks

No response

@z4cki z4cki added the bug Something isn't working label Jun 29, 2022
@stackia stackia assigned aligo and unassigned stackia Jun 29, 2022
@stackia
Copy link
Contributor

stackia commented Jul 5, 2022

@0xDing any ideas on this?

  • Option 1: When restoring a deleted page, if its direct parent has been deleted, we should then restore it to the parent page of its parent. For example, for A -> B -> C (deleted) -> D (deleted), D will be restored under B.
  • Option 2: Do not allow restoring a page if any of its parents in the tree are deleted.

@0xDing
Copy link
Contributor

0xDing commented Jul 6, 2022

Option 2. This is the same logic as the macOS trash

@ziyan-chen
Copy link

@zaotang @ziyanchen327 @crete555

@0xDing 0xDing changed the title [Bug] when restore subpage in trash, subpage can not restore to page tree when restore subpage in trash, subpage can not restore to page tree Jul 8, 2022
@aligo
Copy link
Contributor

aligo commented Jul 20, 2022

For now the restore button is hidden for page which its parent deleted, but should we also to add some messages on interface to show that the page cannot be restored it's because parent page has been deleted?

@BrickDoctor @zaotang @ziyan-chen

@aligo
Copy link
Contributor

aligo commented Jul 20, 2022

For now we just simply hide/disable restore button/checkbox for page which its parent deleted as a quick solution.
In future there will be more Trash UI tweaks to improve this.

aligo added a commit that referenced this issue Jul 20, 2022
* feat(trash): quick solution for restoring subpage
@stackia stackia closed this as completed Jul 20, 2022
@aligo aligo linked a pull request Jul 21, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants