Skip to content

feat: add per-tag category display options#1336

Draft
Sola-ris wants to merge 12 commits intoTagStudioDev:mainfrom
Sola-ris:feat/category-exclusions
Draft

feat: add per-tag category display options#1336
Sola-ris wants to merge 12 commits intoTagStudioDev:mainfrom
Sola-ris:feat/category-exclusions

Conversation

@Sola-ris
Copy link
Copy Markdown
Contributor

@Sola-ris Sola-ris commented Apr 2, 2026

Summary

Add per-tag category display options

Resolves #1335

By default, tags are displayed in all inherited categories, leaving the current behavior unchanged.
This extends the BuildTagPanel with the options to exclude a tag from being displayed in one, multiple or all possible categories.

The exclusions are stored in the new category_exclusions join table.
Also bumps the database version to 104.

Demo

2026-04-02.21-12-53.mp4

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

Comment on lines +389 to +398
def __find_category_tag_widget(panel: BuildTagPanel, index: int = 0) -> TagWidget | None:
item = panel.category_scroll_layout.itemAt(0).widget().layout().itemAt(index)
while item is not None:
if isinstance(item.widget(), TagWidget):
break
item = item.widget().layout().itemAt(0)

if item is not None:
return item.widget()
return None
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not really sure if this is the best way to test the individual TagPanels, especially in regards to doing the MVC split, but it's the best I could think of


![Tag Category Example](assets/tag_categories_example.png)

If you don't want a tag to appear in one, more, or even all the applicable categories, simply uncheck the category in the "Edit Tag" panel.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I Haven't added an example image, since it would look inconsistent, with all the other ones being taken on macOS which I don't have access to

self.root_layout.addWidget(self.category_widget)
self.root_layout.addWidget(self.color_widget)
self.root_layout.addWidget(QLabel("<h3>Properties</h3>"))
self.root_layout.addWidget(QLabel(f"<h3>{Translations['tag.properties']}</h3>"))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Drive-by fix for a missing translation

@Sola-ris Sola-ris marked this pull request as draft April 4, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Per-tag category display options

1 participant