Skip to content

handle private tag categories recursively#20160

Merged
TurboGit merged 1 commit intodarktable-org:masterfrom
zisoft:private-tag-categories
Feb 7, 2026
Merged

handle private tag categories recursively#20160
TurboGit merged 1 commit intodarktable-org:masterfrom
zisoft:private-tag-categories

Conversation

@zisoft
Copy link
Copy Markdown
Collaborator

@zisoft zisoft commented Jan 15, 2026

When a tag category is marked private, all tags within this category are treated as private recursively.

closes #20142

@TurboGit TurboGit added this to the 5.6 milestone Jan 15, 2026
@TurboGit TurboGit added the bugfix pull request fixing a bug label Jan 15, 2026
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit
Copy link
Copy Markdown
Member

TurboGit commented Feb 7, 2026

Needs a release note entry, TIA.

@TurboGit TurboGit merged commit 8a0c909 into darktable-org:master Feb 7, 2026
5 checks passed
@zisoft zisoft deleted the private-tag-categories branch February 7, 2026 11:27
@zisoft
Copy link
Copy Markdown
Collaborator Author

zisoft commented Feb 7, 2026

Release notess.

If a tag category is marked as private, all tags and subcategories under it are also treated as private.

@neutralgray-eu
Copy link
Copy Markdown

Thanks for the hint in the other thread!

After some 40 export tests of the same image, there's something I still don't understand:
Setting all parent categories to non-private still won't allow me to export non-private tags.
It seems that the criterion to exclude tags is not just everything following a private category, but anything following a category in general.

If I create a completely new first-order tag (non-private, not a category), it gets exported.
If I use this tag as a parent directory (non-private, still not a category) and attach a sub-tag (non-private), both get exported.
But if I want to exclude the parent directory via "Export preferences > omit hierarchy", both echelons are still exported.
And most importantly, if I set the parent directory as a category (but not even as private), none of both tags get exported. So it seems like both "private" and "category" have the same effect. Are you sure this is how it should be?

As a general "philosophical" comment, I don't think that this whole change of recursive tagging is a good thing.
I know, it can be cumbersome to flag individual sub-tags as "private", but consider my scheme:
People|Lifephase|Group|Name ==> only echelon 1 & 2 (sometimes 3) as private
Places|Country|Region|City ==> only echelon 1 as private

I flag categories as "private" if either the overall meta-category (people, place) is useless clutter in any exported file or if I want to keep it a secret how I categorize people (my personal life phase, sometimes the group that I associate them with). I only flag final-echelon sub-tags as "private" if I don't know a person's name correctly yet, or if I only know them by some stupid nickname.

Consequently, in the "People" directory, I may only want to export the final echelon (Name). Under the "new" philosophy, I guess this should be possible by keeping all echelons "non-private" and selecting "omit hierarchy" in the export preferences. But I often also want to keep the second-last echelon of "People" (group), and omitting the hierarchy would blank this out.
Also, in the "Places" directory, I only want to omit the first echelon (Places), while keeping the others (country and region, not just the city). But if I set the first-echelon category to "private" under the new philosophy, all sub-directories are omitted as private, too.

I think the "old" tagging philosophy was more flexible in this regard, and maybe the original proposal of adding a box to check off whether all adhering sub-tags should recursively be treated as private would have been a good compromise.

@zisoft
Copy link
Copy Markdown
Collaborator Author

zisoft commented Feb 18, 2026

It seems that the criterion to exclude tags is not just everything following a private category, but anything following a category in general.

I can reproduce and this is indeed a bug. I already found the cause. Can you please open a new issue for that?

But if I want to exclude the parent directory via "Export preferences > omit hierarchy", both echelons are still exported.

I can reproduce as well, omit hierarchy seems to have no effect at all. But I did not touch the code for that in this PR so it is a different issue. Did this work in 5.4.0?

The examples for your use cases can lead to controversial discussions. For me it seems logical to have all tags below a private category to be treated as private as well. Imagine the file explorer in your OS: Marking a folder as hidden is enough to hide all of its files and subfolders, regardless of their individual settings.

Places|Country|Region|City seems strange to me, I would set it to Country|Region|City|Places. Now mark only Places as private and you get the result you want. But everyone has its own workflow.

@neutralgray-eu
Copy link
Copy Markdown

neutralgray-eu commented Feb 18, 2026

Can you please open a new issue for that?

Will do tomorrow.

Did this work in 5.4.0

In the case of "omit hierarchy", I don't know since I didn't need it under the "old" approach.

can lead to controversial discussions

Sorry, I was just both happy about your useful hint to the change as well as surprised by this change in philosophy. Maybe Pixls would have been the better place.

I would set it to Country|Region|City|Places

In my case, "Places" is the overall category, I didn't mean this as a variable placeholder for individual "places" but rather as the unchanging "root" of one of several trees (e.g. places, people, privacy settings, film and camera type for my RAW analog scans etc.).

Thanks for checking so quickly!

@zisoft
Copy link
Copy Markdown
Collaborator Author

zisoft commented Feb 18, 2026

In my case, "Places" is the overall category

Ok, then just set it as a category, not private. Category tags aren't exported (will work again when this bug is fixed).

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

Labels

bugfix pull request fixing a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tag: mark private recursively

3 participants