TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

fix: disable menu items and menubar class refactor

Open mashed5894 opened this issue 1 year ago • 5 comments

Fix for #692. Disables a list of menu options until a library is loaded and disables them again when the library is closed. Also moved the menu_bar into a separate class. Still need to rewrite some of the tests.

mashed5894 avatar Jan 19 '25 08:01 mashed5894

waiting on 9.5 because of the significant refactoring

mashed5894 avatar Jan 30 '25 23:01 mashed5894

Hi! What's the current status here post-9.5?

xarvex avatar Mar 12 '25 09:03 xarvex

i havent touched this since i opened it, but i heard in the discord that there is some refactoring happening! would definitely be interested in getting in on the action, ive noticed several similar refactorings that could be done throughout the project.

mashed5894 avatar Mar 13 '25 15:03 mashed5894

i havent touched this since i opened it, but i heard in the discord that there is some refactoring happening! would definitely be interested in getting in on the action, ive noticed several similar refactorings that could be done throughout the project.

The refactor mentioned in the discord was in reference to #844 which was spun up and merged last week. That was a restructuring of the project layout to better align with a standard python src-layout structure, which corrected several issues we were having in the process.

Still, a refactor of ts_qt.py - most notably the separation of the now menu bar code, is still needed. The current driving force behind this is the need to refactor the Qt driver in a way that is easier to integrate with the tests. The general size of the file is a reason too, but the tests are the pressing issue. Because of this and my familiarity with the file I feel it would be best if I took on the task of splitting up the Qt driver myself.

CyanVoxel avatar Mar 15 '25 03:03 CyanVoxel

i havent touched this since i opened it, but i heard in the discord that there is some refactoring happening! would definitely be interested in getting in on the action, ive noticed several similar refactorings that could be done throughout the project.

The refactor mentioned in the discord was in reference to #844 which was spun up and merged last week. That was a restructuring of the project layout to better align with a standard python src-layout structure, which corrected several issues we were having in the process.

Still, a refactor of ts_qt.py - most notably the separation of the now menu bar code, is still needed. The current driving force behind this is the need to refactor the Qt driver in a way that is easier to integrate with the tests. The general size of the file is a reason too, but the tests are the pressing issue. Because of this and my familiarity with the file I feel it would be best if I took on the task of splitting up the Qt driver myself.

There is also a lot of code duplication in the way the menu bar is built, so there is potential for improvements at that specific point as well.

Computerdores avatar Mar 15 '25 09:03 Computerdores

Closing in favor of #935, as that PR refactored the menubar out of ts_qt.py

CyanVoxel avatar Jun 06 '25 01:06 CyanVoxel