-
-
Notifications
You must be signed in to change notification settings - Fork 419
PICARD-3119: refactor: standard columns to use new API #2739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PICARD-3119: refactor: standard columns to use new API #2739
Conversation
That's actually from this #2714 (comment) and this change 4d05b75 And this is the fix: e95b182 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Are we actually going to manage these settings through the option profile system, or should I quit asking about it? |
What do you mean? I mean I'm not against "manage these settings through the option profile system" but I fail to see how it is related to this PR. |
I've been asking for the custom columns to be managed through the option profile system right from the initial PR that introduced the functionality, but it keeps getting ignored. It's clear to me that @knguyen1 has no intention of ever doing this, so I guess I'll give up and quit asking. |
@rdswift Can you clarify your expectations? Did you create ticket for that? Everything is still work in progress. |
@rdswift I don't think we have decided on making the custom columns part of the option profiles yet. If we decide to do this, we can do this in a separate PR. But I have stated my opinion elsewhere. To me the column configuration is about UI state, and as such does not really fit into the option profiles. It's hence also not fully clear which parts of the column configuration you would see in the profiles. Only the configuration which custom columns are configured? But then this doesn't make sense if I switch profiles and have changing columns that are also part of the stored column header state (which includes the columns shown and the Qt state of their position, size and sort order). If we make the whole column state part of option profiles, will we also need to make window and pane size states part of the option profiles? If there is a strong case for having the column state part of the option profiles and people really want this, then I'd be ok with having it implemented. It should just be clear that this is more involved then just making the |
Just to elaborate on the problem I see in more detail: The state of the header is currently stored in two options per pane, that are both considered state and are inside the "persist" config section:
Previously the list of available columns was hard coded. Now we have another configuration, where the user can extend this list with custom columns. Those are stored in the "setting" config section as
For me, option profiles are clearly about settings and should not also handle window state. |
As I mentioned elsewhere, which columns are displayed could be part of a user's workflow that is faciltated through a selected options profile. In any event, it seems that I'm alone in my request, so I'll drop it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch is now conflicting with master after the caching fixes have been merged. Otherwise looks good to me.
- Refactor standard columns to use new provider architecture - Remove delegate adapter wrapper for cleaner implementation - Fix size, bitrate, length columns to be field columns - General cleanup and code improvements - Update tests to reflect new column architecture
… values on group rows\n\nHide custom column values for and special rows except for the Title and status icon columns. This prevents showing on group rows while keeping the label visible after the refactor.
e95b182
to
2a1e93b
Compare
Rebased and resolved conflicts. MacOS tests passing locally. |
- Introduced `is_default` parameter in column creation functions to specify default visibility. - Updated `create_common_columns` to utilize the new parameter for standard columns. - Improved documentation for column creation functions to clarify parameter usage.
- Moved column creation functions from common_columns.py to columns.py for better organization. - Introduced `create_match_quality_column` and `create_fingerprint_status_column` functions. - Updated `create_common_columns` to utilize new column creation methods. - Removed the now redundant common_columns.py file. - Adjusted tests to reflect changes in column imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good and work well for me. LGTM
Summary
Problem
Standard columns were using outdated delegate adapter patterns that added unnecessary complexity and didn't align with the new provider architecture.
Solution
Action
Additional actions required: