SkepticMystic / breadcrumbs

Add typed-links to your Obsidian notes
https://publish.obsidian.md/breadcrumbs-docs
MIT License
533 stars 36 forks source link

Bug: Tree view: collapse only affects highest level #555

Open andresgongora opened 6 months ago

andresgongora commented 6 months ago

Describe the bug

In Tree View, clicking on the Collapse button only collapses the highest (first) level. Initially it looks fine, but clicking on any on the (now collapsed) top level elements will expand the whole sub tree instead of only showing the second level.

To Reproduce

  1. Have a wiki with multiple breadcrumbs forming a complex tree structure.
  2. Navigate to one of the top-most pages, open the Tree View for it.
  3. In the Tree View pane, click on Collapse; all elements should collapse.
  4. Expand any element that has multiple recursively nested elements.

Expected behavior All elements should me nested and would need to be expanded one by one.

Screenshots

  1. After collapsing all.
    image
  2. After expanding one of the top level elements, curret behavior.
    image
  3. Expected behavior. image

Desktop (please complete the following information):

Additional context I've assumed this is a bug since the normal collapse behavior on most other tools I use on a daily basis is to "fully" collapse everything recursively. If this is not a bug but a feature (maybe to make it faster?), would it be possible to add an option to toggle the behavior instead?

andresgongora commented 6 months ago

Might this be a duplicate of #546 ? The other one is about codeblocks, but it might have the same root cause under the hood

ybalkind commented 4 months ago

Might this be a duplicate of #546 ? The other one is about codeblocks, but it might have the same root cause under the hood

Yup its describing the same behaviour but referring to a different view. #546 is still quite an issue for me, hope it gets looked at.