-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add History cleanup options #4726
Conversation
1ee63ac
to
03ec672
Compare
Very useful changes that improve usability a lot. Is allowing to select more than a single entry, analogue to how multiple files are selected in file manager, in order to bulk delete history entries, out of scope for this PR? ronso0, you already commented on https://bugs.launchpad.net/mixxx/+bug/1968503 which should also be updated once this is merged. In your screenshot the UI looks misaligned when looking at the text rows and the setting to the right. |
yes, I'm not going to work on that now. |
That is already fixed, the note is now in the tooltips of the spinbox and the checkbox. I updated the screenshot. |
Is the fields width expected? This will likely not be more than two digits, thus it looks a bit too wide for its purpose. |
Sure, but if the translation string is rather short there will be a lot of whitespace in between the labels on the left and the spinboxes. Keeping them closer together improves readability, like avoiding long lines in continuous text to ease finding the beginning of the next line. That's also the reason why the row height and search timeout labels are right-aligned. |
FWIW I'd not do this from in the sidebar. We'd need to switch from single- to multi-selection and I think it's tricky to get the UX right. |
Is there a need for the checkbox to delete locked lists? I would prefer to dispose it and never delete locked playlists. |
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.
The code looks and works good. Only the naming can be improved. Thank you.
src/library/library_prefs.cpp
Outdated
const ConfigKey mixxx::library::prefs::kHistoryRecentlyPlayedThresholdConfigKey = | ||
ConfigKey{ | ||
mixxx::library::prefs::kConfigGroup, | ||
QStringLiteral("history_recently_played_threshold")}; |
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 one is hard to understand. It is the number of tracks that has to be tracked, before a track is re-entered.
It has been introduced to not list a track many times when scratching.
Maybe "history_reenter_distance" .. "history_rerecord_inhibit_gap" or something better.
The same applies to the GUI.
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.
history_track_readd_threshold
?
If you don't consider that suitable either I'd rather add a comment here than creating a foot-long configkey.
In the preferences the spinbox tooltip explains the meaning. Do you think that's not sufficient?
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.
what about
'Recently played' threshold to prevent duplicate entries
?
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.
"history_track_readd_threshold" works better for me, while "threshold" can be anything. That's why I had proposed "gap" or "distance"
'Recently played' threshold to prevent duplicate entries
This can be improved because it will not "prevent duplicates" it just sets the minimal distance of duplicates.
"Track re-add threshold" works also in the GUI
but how about:
"Minimum distance of repeated tracks"?
and for the config key
"history_track_repeat_distance"
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.
"history_duplicate_distance"
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.
Thanks, I wasn't really in the shape to come up with a proper term.
I'll go with history_track_duplicate_distance
and for the History preference "Track duplicate distance"
src/library/library_prefs.cpp
Outdated
const ConfigKey mixxx::library::prefs::kHistoryCleanupMinTracksConfigKey = | ||
ConfigKey{ | ||
mixxx::library::prefs::kConfigGroup, | ||
QStringLiteral("history_cleanup_min_tracks")}; |
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.
Isn't this the max length that is cleaned up?
how about something like: "max_tracks_auto_delete"
Or the other way around "min_entries_to_keep"
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.
nope, it's the "minimum tracks count to keep playlist":
"SELECT id FROM Playlists "
"WHERE (SELECT count(playlist_id) FROM PlaylistTracks WHERE "
"Playlists.ID = PlaylistTracks.playlist_id) < :length AND "
"Playlists.hidden = :hidden AND Playlists.locked = :locked"
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.
Right, for me this combination is sensible "min + keep" or "max + cleanup/delete" is correct.
"min + clenaup" feels wrong, while cleanup is not well defined.
From your explanation we may use "history_min_tracks_to_keep" or such.
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.
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.
would it be possible to substitute the N with the number widget inline?
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.
Do you fear the N / X / ? placeholder will not be understood?
Puuting the actual number in the label would work but I don't see the benefit of this redundancy tbh.
Inline spinbox is also possible but its position depends on the translation, and it screws up the layout. Sooo: tricky..
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.
Mhmm makes sense. I just thought it would result in better UX, but considering the challenges it causes, I agree that its not worth the effort.
Good point 👍 I'll remove 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.
LGTM, Thank you.
After the History rework #2996 I'm finally adding some options to Preferences > Library for configuring how the history playlists are cleaned up.
allow to keep locked playlists with fewer tracks