feat: Add hierarchical tag grouping with collapsible headers #1247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a feature to group thumbnails in the main window by a tag or by a parent tag.
Grouped thumbnails in each section respect the user's other sorting choices (filename/date created, sort direction, etc.)
Features:
Core Library Changes:
group_entries_by_tag()method to generate a tag hierarchyget_grouping_tag_ids()to fetch grouping tagsBrowsingStatewithgroup_by_tag_idfieldGroupedSearchResultdataclass withTagGrouphierarchyUI Components:
GroupHeaderWidgetto create collapsible group headersThumbGridLayoutto render hierarchical grouped entriesupdate_browsing_state()to handle grouped resultsFiles Added:
Notes:
black -l100, mypy, and ruff. I did my best to stick to the existing coding style.delete_tag()only containedpass. I implemented a fulldelete_tag()method to fix this so the sort-by-tag dropdown would be able to automatically update correctly.Summary
Adds a feature to group thumbnails in the main window by a single tag or by a parent tag.
Grouped thumbnails in each section respect the user's other sorting choices (filename/date created, sort direction, etc.)
Tasks Completed
Screenshots
New Toolbar Dropdown
Selecting a Parent Tag to Group By
Sorting complete
Example Item with Multiple Sibling Tags