doug-101 / TreeLine

an information storage program
http://treeline.bellz.org
229 stars 31 forks source link

Show output descendants for multiple selection #18

Open asamarco opened 1 year ago

asamarco commented 1 year ago

Hello,

this is a wish more than a bug. I think the user experience would be more consistent if "Show output descendants" would work also on multiple selections. I attach an image (from one of the sample files) to show what I mean. With "Show output descendants" enabled I would hope to see the deeper levels of hierarchy as well, but only the top level entries in the selection are shown.

Output Descendants

Thanks,

doug-101 commented 1 year ago

The example above is straight-forward, but what if nodes at different levels are selected? Nodes at the same level would appear to be on different levels (and vice versa). And what if an ancestor node and a descendant node were both selected - would it show the lower descendants twice? A case with many ancestors and many descendants selected would get very strange.

I can't consistently implement your suggestion without knowing what to do with corner cases like these.

Thanks, Doug

asamarco commented 1 year ago

Hello Doug,

I realized this problem when I made this crude implementation for this feature https://github.com/doug-101/TreeLine/commit/d80240cfc7c2bc1ebee92ddf62454bc3040d17e4. I did not sent a pull request for this because I saw that it might get a bit confusing in the cases you mention and I have not a better solution for those. Still, I am using this function a lot since I find extremely handy being able to compare very quickly just the entries i am interested in.

To get to the two questions:

what if nodes at different levels are selected?

It would be the same as in the current release, no? Now if you select two entries at different levels they are already displayed on the same level in the output, here the only difference is that they bring the children as well if the relative option is checked.

what if an ancestor node and a descendant node were both selected -would it show the lower descendants twice?

In what i am using yes, this might be weird in many cases but could be wanted in others. This falls on the user and I would keep this possibility but I understand this could not be the best choice for everybody.

Thanks in any case for the interest in this matter, Marco