Skip to content

fix: nested tag deletion - #54

Open
nekomaido wants to merge 1 commit into
denho:mainfrom
nekomaido:main
Open

fix: nested tag deletion#54
nekomaido wants to merge 1 commit into
denho:mainfrom
nekomaido:main

Conversation

@nekomaido

Copy link
Copy Markdown

Summary

Fix nested tag deletion leaving orphaned tags hidden from the sidebar.

Deleting a parent tag now deletes all of its descendants. Existing tags whose
parent was deleted are restored to the root during migration, so they become
visible in the sidebar again.

Also prevents moving a tag under one of its own descendants, which would create
a circular hierarchy.

How to reproduce on the old version

  1. Start with a fresh database.
  2. Delete the Faved tag.
  3. Refresh the page.

Old behavior

  • Faved and its direct child Docs are deleted.
  • Getting started and Guides remain, but their parent (Docs) no longer
    exists.
  • Those tags no longer appear in the sidebar, so they cannot be edited or
    deleted there.
  • They may still appear in tag-selection dropdowns.
image

New behavior

  • Deleting Faved also deletes all of its descendant tags.
  • Previously orphaned tags are moved to the root and shown in the sidebar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant