Bug 414424 - Wishlist: Item count for tag tree is not very intuitive. Maybe show number of total items and subtags separately?
Summary: Wishlist: Item count for tag tree is not very intuitive. Maybe show number of...
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-TreeView (show other bugs)
Version: 7.4.0
Platform: Appimage Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
: 477225 485147 486974 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-23 13:14 UTC by MarcP
Modified: 2024-05-13 16:04 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2019-11-23 13:14:55 UTC
Ok, this is a suggestion based on bug #399338 that I reported myself a while ago. 

When you enable the item count for the tree view, the total number of items next to each Tag is not very intuitive. Apparently, it not only counts the number of elements with that tag, but also the number of elements contained in each sub-tag, regardless of the duplicates. Therefore, the total number is usually higher than the total existing elements.

For example, I have a tag "Germany" with 6 subtags (and one of them, in turn, contains 8 subtags). When collapsed, Germany shows the number 412, but in reality, only 149 pictures exist in that tag structure. So 412 is the number of pictures that contain that tag, plus the number of pictures that contain each subtag. Apparently this is done on purpose, but I still find it a bit counterintuitive. In some cases I have some very detailed tag trees with show tens of thousands of pictures, when in reality they only contain 2000 pictures at most.

So my proposal: Why not show only the total number of elements contained in the tree structure (so, the same number at the bottom of the screen), and also indicate the number of subtags? For instance "Germany (149, 14 subtags)" instead of "Germany (412)". Or maybe even just the first number, if you don't to clutter the interface. 

What do you think? I don't know if that has been previously discussed and there is an consensus on this topic, but I wouldn't mind exploring other options.

Thanks for your time.
Comment 1 Maik Qualmann 2019-11-24 10:22:21 UTC
Hmm, the system has not posted the commit here so far, I'm doing it manually. I decided for this variant first. Further text behind the tag name I find confusing. Since tags with subtags occur in several images and thus the total number is not correct on a collapsed tag, we do not add them together anymore.

https://invent.kde.org/kde/digikam/commit/a607c4f35819e10b982844109a9b92f2d18cd8a6

Maik
Comment 2 MarcP 2019-12-05 23:23:31 UTC
Hey. I tried the latest appimage (digikam-7.0.0-git-20191204T041752-x86-64.appimage) and I noticed that now the tag count only shows the number of pictures tagged with that specific tag, but ignoring subtags. Would it be possible to have a middle day, so it works exactly as the item count for Albums? 

That is, when expanded, only show the number of items with that tag, but when collapsed, also add the number of pictures of its subtags, but not both (The way it worked before, if a picture has a tag and a subtag, it would be counted twice).

With an example it is clearer. Imagine I have a total of 57 pictures of Toronto, 10 of which also have been tagged with Ontario. 

This is how it used to be:

Expanded:                        Collapsed: 
Ontario (10)                     Ontario (67)
   - Toronto (57)        

This is the current behavior (after your commit two weeks ago):

Expanded:                        Collapsed: 
Ontario (10)                     Ontario (10)
   - Toronto (57)    

And this is how I believe would be more intuitive: 
  
Expanded:                        Collapsed: 
Ontario (10)                     Ontario (57)
   - Toronto (57)     


So basically the sum of both the parent and the child tags, but subtracting all elements that appear twice.
Comment 3 Maik Qualmann 2019-12-06 07:08:09 UTC
And that's the problem, we have a QMap stating that tag XX1 -> occurs 5 times and tag XX2 -> 8 times. But we have no breakdown of images, so whether tag XX1 also occurs in images tagged with XX2. This would mean additional database queries. We can not afford this at this point, because it has to be done quickly. Otherwise the repaint/create of the tag model will be slow. I do not have a simple solution yet.

Maik
Comment 4 MarcP 2019-12-06 13:37:41 UTC
Oh, I see. So there is no quick way of showing the number of containing pictures (the number that appears at the bottom left in Digikam) without having to query each tag, right?

In that case, maybe the initial behavior was more intuitive. Do you think it's better to indicate more pictures than expected, or less pictures than expected?
Comment 5 Maik Qualmann 2019-12-07 18:43:01 UTC
Git commit 8493c91be80b5941d850a86e0a5dd408ebdc5348 by Maik Qualmann.
Committed on 07/12/2019 at 18:42.
Pushed by mqualmann into branch 'master'.

Revert "do not counting subtags when collapsed"

M  +1    -1    core/libs/models/abstractalbummodel.cpp

https://invent.kde.org/kde/digikam/commit/8493c91be80b5941d850a86e0a5dd408ebdc5348
Comment 6 caulier.gilles 2021-07-19 06:53:49 UTC
With next digiKam 7.4.0 release, AppImage bundle is compiled using a more recent Linux Mageia 7.1 host. Last stable Qt 5.15.2 and KF5 5.84 are used. ImageMagick codec 7 and libav 58 (ffmpeg) are used to supports extra image and video formats.

https://i.imgur.com/XV1tZkL.png

Please check if problem still reproducible with this version available as pre-release here:

https://files.kde.org/digikam/

Gilles Caulier
Comment 7 MarcP 2021-07-22 17:51:25 UTC
Well, the behavior is the same. When a tag or folder is collapsed, the count number does not reflect the real number of items within it.
Comment 8 caulier.gilles 2023-05-14 07:23:26 UTC
Maik,

We  will left as that the implementation to prevent a slowdown rendering of tags, or there is a solution to this wish ?

Gilles
Comment 9 sophiebuk 2023-05-21 21:12:39 UTC
This behaviour is really confusing, any new about an update to get the right count ?
Comment 10 Maik Qualmann 2023-11-19 10:52:42 UTC
*** Bug 477225 has been marked as a duplicate of this bug. ***
Comment 11 Maik Qualmann 2024-04-06 19:26:30 UTC
*** Bug 485147 has been marked as a duplicate of this bug. ***
Comment 12 Maik Qualmann 2024-05-13 16:04:58 UTC
*** Bug 486974 has been marked as a duplicate of this bug. ***