TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

BUG: Add tag menu doesn't display all created tags

Open Ekirou opened this issue 1 year ago • 7 comments

at any file make a tag box then the + button menu doesn't display all the tags created at the end

Ekirou avatar May 30 '24 16:05 Ekirou

I think this is intended behaviour (judging from the code) https://github.com/TagStudioDev/TagStudio/blob/868b553670ddfd4bfd5c3822c6721a4c9b84f140/tagstudio/src/qt/modals/tag_search.py#L41 And you can still search for the tag

Thesacraft avatar May 31 '24 02:05 Thesacraft

why the limit tho?

Performance slowdowns when loading potentially thousands of tags that will likely never be seen in this menu. 30 seems to few though imo - I can probably raise the cap higher before running into any notable impact.

CyanVoxel avatar Jun 02 '24 03:06 CyanVoxel

I've increased the number of displayed tags from 29 to 100 as of 6a680ad3d18b0c7f2250870e98842b3e13c967b0. Anything significantly more caused things to slow down enough to approach my expected limit for how long a modal should take to pop up, and that's given my own hardware. So for now I'll keep this as a stopgap, but I see two improvements that can still be made:

  1. Allow the user to specify this limit (Would be after a settings menu is added)
  2. Change this screen to use an MVC model for more performant rendering (Ideal, but much more work)

CyanVoxel avatar Jun 08 '24 19:06 CyanVoxel

im not 100% what an MVC model is (even after looking at the wikipedia article) so ill just risk asking something very stupid: I assume a dynamic rendering of this menu is not possible in python? I know that you can do a lot of dynamic stuff in JS and with HTML (with dynamic rendering i mean: the box pops up immediately and renders the tag entries as they are found and NOT like it is now, where it waits for all tag entries or up to 100 and then shows all at the same time; although i think this dynamic stuff doesnt work too great for the current database scheme?)

TheTimebreaker avatar Aug 26 '24 16:08 TheTimebreaker

im not 100% what an MVC model is (even after looking at the wikipedia article) so ill just risk asking something very stupid: I assume a dynamic rendering of this menu is not possible in python? I know that you can do a lot of dynamic stuff in JS and with HTML (with dynamic rendering i mean: the box pops up immediately and renders the tag entries as they are found and NOT like it is now, where it waits for all tag entries or up to 100 and then shows all at the same time; although i think this dynamic stuff doesnt work too great for the current database scheme?)

It's possible, but just isn't what's currently being used. You have the right idea though, that's what I meant when referring to using MVC here - Qt specifically has dynamic recycling options available for screens like this, but it requires rebuilding our widgets to use this "MVC" style implementation (which is kind of a pain in the neck but 100% on our list to do)

CyanVoxel avatar Aug 26 '24 16:08 CyanVoxel