[Digikam-devel] [digikam] [Bug 196927] No easy way to expand or collapse deep tag hierarchies [patch]

Otto Hirr ottohirr at gmail.com
Wed Nov 6 21:35:18 GMT 2013


--- Comment #13 from Otto Hirr <ottohirr at gmail.com> ---
I would like to make some refining definitions... and to define what I
personally would like to see happen. At the end, I will give a usage scenario
to provide justification why each concept (and implementation) is useful.

First lets take as an example a tree with the fully expanded structure of
A                  A
|..a              A.a
|..b              A.b
B                  B
C                  C
|..a              C.a
    |..1          C.a.1
        |..x      C.a.1.x
        |..y      C.a.1.y
    |..2          C.a.2

One other key concept is that there is a "current cursor" pointing to one and
only one item in the tree. There may be several "selected" tree nodes, but
there is only one "current cursor" node in the tree. This "current cursor" may
not be one of the "selected" tree nodes.

As an abbriv for Expand|Collapse, I will simply use E|C...

There are three fundamental concepts:
1)  [Expand|Collapse] All Children
For me, this means that regardless of where the "current cursor" points, the
entire tree is E|C.

2)  [Expand|Collapse] Recursively
For me, this means that ALL nodes beneath the "current cursor" location are
E|C. This would be the children, grand-children, grand-grand-children, and so
on, from the "current cursor" are E|C.

3)  [Expand|Collapse] 
For me, this means that only the immediate children of the "current cursor"
location would be expanded.

Usage scenario...
I have a large complex tree (does not really matter whether it is TAGS or any
other tree-ish thing)...

So I am evaluating photos from one set, start tagging. I know that some parts
of the tree are deeper than others. Some parts are more broad, some more deep,
some more broad and deep.

For some nodes, knowing it is not very deep, and wanting access to all the
nodes, I would set the "current cursor" appropriately and Expand-Recursively
(2) from that point.

For other uses, I know that the tree is deep in some places, so I want to
simply place the "current cursor" and only expand one-level at a time (3). Then
maybe make the "current cursor" one of the children and again expand one-level
at a time (3) or maybe knowing that I want quick access to all the nodes below
that one, I would Expand-Recursively (2).

Finally, I'm done with that tagging group or from expanding so much, my tree
display is now just too big. I simply want to collapse everything, regardless
of where the "current cursor" may be.

Bottomline, each of the conceptual functions are important. The minimal of (3)
(or 1) is simply a requirement of having a tree structure.

That of (1) is quite frustrating if one has a large (breadth or depth or both)
tree and it were the only method to expand. That of (1) for collapsing is a joy
when the tree has been widely expanded and one wants to quick close everything
up and start over in opening up only portions of the tree.

That of (2) is really useful for applying to sections of a tree, when one knows
that the node they want is buried a couple levels below a particular node.

Yes this was long, but hopefully clarifies some important concepts.

Personally I would like to have all three items of functionality. It would be
nice if this were something that could be generated via template applied to a
tree so that it could be coded once and used everywhere a tree structure is

Best regards,


You are receiving this mail because:
You are the assignee for the bug.

More information about the Digikam-devel mailing list