41 Commits

Author SHA1 Message Date
Travis Abendshien
38da7bb3a9 fix: drop type_key column from text_fields and datetime_fields tables (#1370)
* fix: drop type_key column from text_fields and datetime_fields tables

* fix: commit empty DB_VERSION 200 library

* fix: use recommended renaming order for field tables
2026-05-14 13:38:52 -07:00
Travis Abendshien
3846b65758 fix(ci): address remaining pyright errors (#1368)
* fix(ci): address remaining pyright errors

* fix: implement review feedback
2026-05-13 21:28:41 +02:00
Travis Abendshien
e134cb1ecb refactor(docs): uniform formatting pass (#1363)
* refactor(docs): uniform formatting pass

* refactor: ignore formatting of specific files

* fix: add REUSE info to .prettierignore
2026-05-12 06:24:04 -07:00
Jann Stute
5663e6232e doc: add REUSE license information (#1361)
* doc: add REUSE comment headers

* doc: add REUSE comment headers for mkDocs overrides

The original license text was moved to the LICENSES directory
and the MIT license identifier was used since only encoding differences
to the MIT license were present.

Further, the existing copyright notice was moved to SPDX-FileCopyrightText
and one for the TagStudio Contributors was added since the files are not
entirely the same as the originals in the mkdocs-material project.

* doc: add license information files for the translations

* doc: add licence file for oxanium font

As stated on [Google Fonts](https://fonts.google.com/specimen/Oxanium/license), this font is licensed under OFL-1.1.

* doc: re-license flow_layout.py to GPL-3.0-only

This is possible because the Qt example this is based on can be licensed
under BSD-3-Clause which is GPL-3.0 compatible.

* doc: add REUSE comment header for singleton.py

Comparing our implementation with the one it is based on, they really
don't have much more in common than the general idea of the
implementation, which afaik can't be copyrighted.

* doc: Add REUSE comment header for blender_renderer.py

We can plainly license this under GPL-3.0 according to https://www.blender.org/about/license/

* doc: add REUSE comment headers to vendored files

* doc: add REUSE comment header for rounded_pixmap_style.py

Source of name for copyright notice:
Answer by eyllanesc: https://stackoverflow.com/users/6622587/eyllanesc
Profile links to Github: https://github.com/eyllanesc

Stackoverflow licensing: https://stackoverflow.com/help/licensing

* doc: add REUSE comment headers

* doc: add license information file for icon_mono.svg

* doc: add REUSE comment header for files in .github

* doc: add REUSE.toml to give license information for various files without spamming .license files

* fix: use type parameter instead of subclass

* doc: add entries for remaining files in REUSE.toml

According to info from github comment by CyanVoxel: https://github.com/TagStudioDev/TagStudio/pull/1361#issuecomment-4423632570

* ci: add REUSE check workflow

Src: 'https://reuse.software/dev/#github-actions'

* doc: add missing license

* doc: fix license for material-design-icons

* license: change license to MIT for two files only changes by Computerdores and CyanVoxel

* doc: remove unnecessary .license files

* doc: fix incorrect license entries

* doc: add missing license doc
2026-05-12 01:56:46 +02:00
TheBobBobs
47c3d5338f perf: Optimize searching tags with DB indexes (#1129)
* perf: create sqlite indexes for common columns

* perf: optimize Library.search_tags

* fix(tag_search): do ordering before applying limit

* tag_search: order shorter tag names first

* update tests

* cleanup

* tag_search: use same sorting order when returning all tags

* use dict for deduplicating tags

* fix(tag_search): return descendants instead of ancestors

* perf(tag_search): remove slow calls to method `Library.tags`
2026-05-10 22:48:30 -07:00
Travis Abendshien
c15e2b56ee refactor!: uncouple fields from hard-coded values (#1354)
* refactor!: uncouple fields from hardcoded values

* fix(tests): add missing db version fixtures

* fix: correctly add datetime field as datetime in json migration

* tests: update search library file

* fix: implement review feedback and misc fixes

* fix: implement additional feedback
2026-05-10 10:28:03 -07:00
Sola-ris
7af7420167 fix: catch update notification exceptions (#1278)
* feat: add test for failing GitHub API call.

* fix: don't raise exceptions in get_most_recent_release_version.

* style: apply ruff.

* That not should not have been there.
2026-05-08 23:57:07 -07:00
Jann Stute
ad2cbbca48 fix: remove preferences table (#1298)
* refactor: cleanup parameters of open_library and open_sqlite_library

* doc: notes on what tables are affected by which migration steps

* refactor(migration order): move DBv6 repairs

* refactor(migration order): move DBv8 repairs

* refactor(migration order): move DBv9 repairs

* refactor(migration order): move DBv100 repairs

* refactor(migration order): move DBv102 repairs

* refactor: merge migration methods

* doc: final comment changes

* fix: query tag ids independent of future DB changes

* feat: remove preferences table

* refactor: various references to LibraryPrefs

* fix: update josn migration UI

* refactor: remove last vestiges of preferences table

* fix: remove newly unnecessary translations

* doc: document library format changes

* refactor: merge the two methods used for migration 104

* fix: typo in sql statement

* fix: add back support for preferences table in get_version

* fix: properly remove directory in test

* fix: incorrect schema check in get_version

* fix: update search lib via migration

* fix: update assert in test

* fix: ignore element order in assert in test

* fix: use correct path

* fix: better test output

---------

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>
2026-05-08 20:16:22 -07:00
Jann Stute
910d2b735d refactor: cleanup parameters of open_library and open_sqlite_library (#1294) 2026-05-08 19:36:01 -07:00
Juozas Skarbalius
695b3923c9 fix(ui): system theme fix (#1328)
* fix: introduce system theme fix in Mac os

* fix: formatting
2026-04-28 16:45:02 -07:00
Travis Abendshien
c4c749650f fix(tests) remove manditory check for ripgrep 2026-01-24 17:16:32 -08:00
Sola-ris
4c484bc4c6 fix: call ripgrep with explicit utf-8 encoding. (#1199) 2026-01-22 22:04:09 -08:00
Trigam
88d0b47a86 feat: add hidden tags (#1139)
* Add `is_hidden` field to the `tags` table

* Add hidden checkbox to the edit tag panel

* Fix formatting

* Exclude hidden tags from search results

* Fix formatting (I should probably actually check before committing? lmao?)

* Bit of cleanup

* Add toggle for excluding hidden entries below search bar

* That might be important maybe

* Update Save Format Changes page in docs (and include updated test database)

* Simplify query and invert name+logic

* chore: remove unused code, tweak strings

---------

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>
2025-11-25 22:48:36 -08:00
CallMeHein
0529925cd1 fix: "Search for Tag" in Tag Manager executes multiple queries (#1173)
* test: add test to ensure actions are replaced when widgets are replaced

* fix: disconnect previous action before adding new action
2025-11-07 16:18:07 -08:00
TheBobBobs
6e6a91aaf4 feat: add infinite scrolling, improve page performance (#1119)
* perf: remove unnecessary path conversions

* perf: search_library if no limit set don't do extra count

* perf: improve responsiveness of ui when rendering thumbnails

* feat: infinite scrolling thumbnail grid

* fix: update tests

* perf: don't run update for thumb grid if rows haven't changed

* fix: update blank thumbnails on initial page load

* fix: do partial updates when selecting items

* fix: remove badges on loading thumbnails

* fix: move all extra item_thumbs off screen

* load a few hidden rows when scrolling

* cleanup

* update imports

* remove todo

* support pagination

* allow setting page_size to 0 for no limit

* add ui setting for infinite scrolling

* undo render thread affinity changes

* always load a few off-screen rows
2025-09-11 22:15:58 -07:00
Travis Abendshien
377f3afb1d chore: update search test file 2025-09-08 15:14:04 -07:00
Travis Abendshien
cee64a8c31 refactor: fix most pyright issues in library/alchemy/ (#1103)
* refactor: fix most pyright issues in library/alchemy/

* chore: implement review feedback
2025-09-06 14:20:05 -07:00
Travis Abendshien
f49cb4fade refactor!: restructure qt layout, untangle from backend (#1095)
* refactor: untangle backend and frontend files

* refactor: more structure organizing

* refactor: rename silent_subprocess.py

* refactor: update qt ui structure to pure mvc + temporarily mixed

* refactor: pluralize MVC folders
2025-09-06 14:10:36 -07:00
Travis Abendshien
2f4b72fd4d feat: add library cleanup screen and 'fix ignored files' window (#1070)
* feat(ui): add LibraryInfoWindow with statistics

* feat: add library cleanup screen

* fix: missing resource

* tests: add basic test for resource_manager.py

* feat: remove ignored files in bulk

* feat: open backups folder from library info window

* refactor: rename unlinked+ignored modal files

* refactor: sort en.json
2025-08-31 16:53:56 -07:00
Travis Abendshien
8e1ae81ec9 feat: replace extension exclusion system with .ts_ignore (#1046)
* feat: replace extension exclusion with ts_ignore
2025-08-29 14:25:54 -07:00
Jann Stute
e551359845 refactor: unwrap instead of assert not None (#1068)
* refactor: unwrap instead of assert not None

* fix: address review feedback
2025-08-28 13:27:49 -07:00
Travis Abendshien
12e074b71d refactor: store DB version inside versions table (#1058)
* refactor: store DB version inside `versions` table

* tests: update search_library db file

* chore: add copyright info to library constants.py

* fix: only backup db if loaded version is lower

* chore: mark Preferences as @deprecated
2025-08-28 12:58:51 -07:00
Travis Abendshien
4704b92804 ci(tests): fix broken tests and add type hints (#1062)
* ci: expand pyright ignore rules to vendored and tests

* tests: comment out unused Mocks for further evaluation

* tests: fix broken tests, add type hints

* chore: address type feedback

* chore: remove unused qtbot parameter
2025-08-27 04:33:38 -07:00
Travis Abendshien
74383e3c3c feat: swap IDs in tag_parents table; bump DB to v100
commit c1346e7df36b137cf88be284a96329fee9605a6a
Author: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>
Date:   Sat Aug 23 18:04:58 2025 -0700

    docs: update DB v100 with tag_parents flip

commit 7e5d9381759b000533c809df9d9bc4f9d984e363
Author: HeikoWasTaken <heikowastaken@protonmail.com>
Date:   Sun Aug 24 00:31:21 2025 +0100

    fix: swap IDs in parent_tags DB table (#998)

    * fix: reorder child and parent IDs in TagParent constructor call

    * feat: add db10 migration

    * fix: SQL query returning parent IDs instead of children IDs

    * fix: stop assigning child tags as parents

    * fix: select and remove parent tags, instead of child tags

    * test/fix: correctly reorder child/parent args in broken test

    * fix: migrate json subtags as parent tags, instead of child tags (I see where it went wrong now lol)

    * fix: query parent tags instead of children

    * refactor: scooching this down below db9 migrations

    * test: add DB10 migration test

    ---------

    Co-authored-by: heiko <heiko_was_taken@protonmail.com>

commit 1ce02699ad9798800f9d98832b2a6377e3d79ed4
Author: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>
Date:   Sat Aug 23 14:47:39 2025 -0700

    feat: add db minor versioning, bump to 100
2025-08-23 18:17:19 -07:00
Travis Abendshien
0e7a2dfd3d feat: add .ts_ignore pattern ignoring system (#897)
* feat: add `.ts_ignore` pattern ignoring system

* fix: add wcmatch dependency

* search: add ".TemporaryItems" to GLOBAL_IGNORE

* add `desktop.ini` and `.localized` to global ignore

* add ".fhdx" and ".ts" filetypes

* chore: remove logging statement

* chore: format with ruff

* feat: use ripgrep for scanning if available

* docs: add ignore.md

* search: remove ts_ignore filtering on queries

* feat: detect if files are added but ignored

* fix: render edges on all unlinked thumbs

* perf: don't search for cached unlinked thumbs

* fix(ui): ensure newlines in file stats

* fix: use ignore_to_glob for wcmatch

* fix(tests): remove inconsistent test

The test hinged on the timing of refresh_dir()'s yield's rather than actual values

* ui: change ignored icon and color
2025-08-21 15:50:59 -07:00
TheBobBobs
e115443811 perf: optimize page loading by referencing entries by ID (#954)
* refactor: search_library now returns ids instead of entries

* perf: optimize update_thumbs
2025-08-04 16:04:07 -07:00
Jann Stute
192af25f6f refactor(preview_panel): mvc split (#952)
* refactor: basic split

* fix: renaming and usage test didn't work for the tests

* fix: tests

* refactor: restructuring

* refactor: further separation and lots of related changes

* refactor: remove last reference to a widget from controller

* refactor: address todo

* fix: failing tests and mypy compaint

* refactor: move control logic to controller

* refactor: more readable button style

* fix: set_selection was called with invalid argument
2025-07-31 22:53:32 -07:00
Jann Stute
14d1c2b618 refactor: split QtDriver into View and Controller to follow MVC model (#935)
* fix: incorrect qt enum accesses

* refactor: clean up main_window.py and reenable ruff checks for it

* refactor: completely reorganise main_window.py

* refactor: factor out regions into separate methods

* refactor: move preview_panel to MainWindow

* refactor: move file menu construction to MainMenuBar

* refactor: move edit menu construction to MainMenuBar

* refactor: move view menu construction to MainMenuBar

* refactor: move tools menu construction to MainMenuBar

* refactor: move macros menu construction to MainMenuBar

* refactor: move help menu construction to MainMenuBar

* refactor: move ui construction code out of QtDriver and into MainWindow

* fix: remove unnecessary imports

* fix: tests were failing
2025-06-05 16:02:03 -07:00
Travis Abendshien
9b0eb90d06 Merge branch 'Alpha-v9.5.3' 2025-06-04 01:35:25 -07:00
rsazra
e4bb07e852 fix: add parent tags to folders_to_tags macro and start tagging at root folder (#940)
* start tagging from root and add parent tags

* update snapshot to pass test
2025-06-04 01:22:17 -07:00
Jann Stute
cf6c56c9d2 fix: restore page navigation state (#933)
* refactor: store browsing history for navigation purposes

* refactor: remove page_size from FilterState

* refactor: move on from the term "filter" in favor of "BrowsingState"

* fix: refactors didn't propagate to the tests

* fix: ruff complaints

* fix: remaing refactoring errors

* fix: navigation works again

* fix: also store and restore query
2025-06-04 00:29:07 -07:00
Travis Abendshien
6517ef560f Merge branch 'main' into Alpha-v9.5.3 2025-05-05 14:25:38 -07:00
Xarvex
702ecd4118 chore(pyproject): version bumping/relaxing (#886)
* chore(pyproject): version bumping/relaxing

* fix(pyproject): remove imaging extra for mkdocs-material

* fix: ruff formatting

* fix: mypy

* fix(pyproject): PySide violates SemVer

* chore(pyproject): set Python version, bump pydantic

* fix(ci): up Ruff to consistent version

* fix(pyproject): fixup requires-python

* fix: ruff checks

* chore(pyproject): bump dependencies

* fix(ci): up Ruff to consistent version

* fix(tests): strip out non-reproducible tests
2025-05-05 12:47:57 -07:00
Tony
36f3b45e66 fix(tests): fix tests failing on Windows (#903)
* create and delete tmp directory for tests

* Update tests/conftest.py

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>

* Update tests/conftest.py

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>

* remove unused import

* cleanup and added type hints

* fix mypy assignment error

* swap gettempdir() with TemporaryDirectory()

* reuse temp library for more tests + cleanup

---------

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>
2025-05-04 17:23:36 -07:00
JCC1998
f770614c4e feat: add date_format and hour_format settings (#904)
* feat: add date_format and hour_format settings

* fix: fix ruff validation errors

* fix: use ruff format command

* fix: Refactor code and improve some logic

* fix: remove unused import

* Added zero padding setting and implement some comments

* Add test assert property

* fix: Unclutter selector and clarify zero-padding literal

* fix: Use static strings

Co-authored-by: Tony <1414927+zfbx@users.noreply.github.com>

---------

Co-authored-by: Tony <1414927+zfbx@users.noreply.github.com>
2025-05-04 10:46:26 -07:00
Jann Stute
adb996e1d2 feat: new settings menu + settings backend (#859)
* feat: add tab widget

* refactor: move languages dict to translations.py

* refactor: move build of Settings Modal to SettingsPanel class

* feat: hide title label

* feat: global settings class

* fix: initialise settings

* fix: properly store grid files changes

* fix: placeholder text for library settings

* feat: add ui elements for remaining global settings

* feat: add page size setting

* fix: version mismatch between pydantic and typing_extensions

* fix: update test_driver.py

* fix(test_file_path_options): replace patch with change of settings

* feat: setting for dark mode

* fix: only show restart_label when necessary

* fix: change modal from "done" type to "Save/Cancel" type

* feat: add test for GlobalSettings

* docs: mark roadmap item as completed

* fix(test_filepath_setting): Mock the app field of QtDriver

* Update src/tagstudio/main.py

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>

* fix: address review suggestions

* fix: page size setting

* feat: change dark mode option to theme dropdown

* fix: test was expecting wrong behaviour

* fix: test was testing for correct behaviour, fix behaviour instead

* fix: test fr fr

* fix: tests fr fr fr

* fix: tests fr fr fr fr

* fix: update test

* fix: tests fr fr fr fr fr

* fix: select all was selecting hidden entries

* fix: create more thumbitems as necessary
2025-03-25 15:02:53 -07:00
Jann Stute
31833245a4 feat: add filename and path sorting (#842)
* feat: add filename sorting to dropdown

* feat: add file path sorting to dropdown

* feat: implement path sorting

* feat: add filename column and bump db version

* feat: implement filename sorting

* doc: tick off roadmap item for filename sorting

* fix: use existing filename translation instead

* fix: populate Entry.filename in constructor

* fix: add missing assertion in search_library fixture

* fix: update search test library

* feat: add db migration test

* fix: add missing library for test
2025-03-12 17:28:42 -07:00
HermanKassler
f680ecb648 feat: add setting to not display full filepath (#841)
* feat: add show file path option to settings menu (#4)

* feat: implement file path option for file attributes (#10)

* feat: implement file path option for file attributes

---------

Co-authored-by: Zarko Sesto <sesto@kth.se>

* feat: update ui after changing file path setting (#9)

* feat: implement file path options for main window (#11)

Co-authored-by: Zarko Sesto <sesto@kth.se>

* feat: add realtime feedback for setting changes (#13)

Co-authored-by: Zarko Sesto <sesto@kth.se>

style: formatted code changes with ruff  (#16)

* tests: Added tests to test file path display and settings menu

enhancement: formated using RUFF

test: addeded test to check title bar update

* fix: move check for file option to correct spot in open_library (#17)

* fix: change translate_with_setter to new method (#18)

* fix: update call to translator to be inline with upstream (#19)

* refactor: update some imports to reflect refactor on upstream (#20)

* refactor: update import paths to reflect recent reformat

* format: run ruff format

* translation: add translations for filepath setting

* refactor: store filepath options in integer enum

---------

Co-authored-by: RubenSocha <40490633+RubenSocha@users.noreply.github.com>
Co-authored-by: ErzaDuNord <102242407+ErzaDuNord@users.noreply.github.com>
Co-authored-by: Zarko Sesto <sesto@kth.se>
Co-authored-by: BitGatito <usmanbinmujeeb@gmail.com>
2025-03-12 15:51:55 -07:00
Jann Stute
e308e8e80d fix: log all problems in translations test (#839) 2025-03-10 18:41:40 -07:00
Xarvex
55bc7aac88 refactor!: change layout; import and build change
Fixes: #200
Fixes: #365
Fixes: #512
Fixes: #800

fix(pyproject): resolve mix-up of mypy and pytest

chore(ci): remove legacy scripts

chore: format with new mypy rules; fix translation test

wip(ci/mypy): remove config flag

fix(pyinstaller): use correct dict access

fix(resources): usage in ts_qt.py

feat(nix/package): validate tests with pytest hook

fix(nix/package): remove old dependency patch

feat(nix): support Darwin

fix(nix/package): move check deps to checkInputs

fix(nix/shell): typo

fix(nix/shell): correctly wrap Python with Qt args

fix(pyproject): specify mypy-extensions

feat(nix/package): provide pillow-jxl-plugin

nix(nix/package): split into multiple files, allow overriding of JXL and vtf2img

fix(nix/shell): provide FFmpeg on runtime

feat(flake): output pillow-jxl-plugin and vtf2img

fix(nix/package): load pipewire

feat(nix/package): run tests on pillow-jxl-plugin

fix: remove extra noqa comment

docs: update installation docs

docs: shrink table size on docs site

nit(nix/package): pipewire not needed in buildInputs

docs: update commands, environment, setup

fix: use consistent possessives

chore: format with prettier, add ignore flags

fix(pyinstaller): consume from pyproject

Revert "fix(pyinstaller): consume from pyproject"

This reverts commit 398cd4e5630a3e83d22d15286d7ac59b4c07c5d6.

refactor: use icon from resource manager

Also fixes incorrect path currently used in ts_qt.py.

nix(pyinstaller): replace use of sys.platform with platform.system

docs: add build section

Co-authored-by: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com>
2025-03-09 18:55:32 -05:00
Xarvex
226d18e743 refactor!: change layout; renaming, import and build change incoming 2025-03-09 18:54:25 -05:00