Skip to content
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

History improvements #2996

Merged
merged 40 commits into from
Dec 2, 2020
Merged

History improvements #2996

merged 40 commits into from
Dec 2, 2020

Conversation

poelzi
Copy link
Contributor

@poelzi poelzi commented Aug 5, 2020

The history feature has quite some usability issues. The list gets very long very quickly and the most useful entries are at the bottom of the list.

Edit(ronso0) https://bugs.launchpad.net/mixxx/+bug/1127120

  • Stop wasting the root window with information that are easily discoverable, but instead display the current playlist at the root entry. This way, the menu does not need to be open to jump to the current list.
  • Instead of putting the newest entry at the bottom, use descending order and show the last entries first.
  • Only show the last 5 playlists and group later entries by year.

mixxx-history

Todo: highlight group if any child is highlighted

@Swiftb0y
Copy link
Member

Swiftb0y commented Aug 5, 2020

It would also be cool if there was a functionality to remove history playlists containing less than N tracks.

@ronso0 ronso0 added this to the 2.4.0 milestone Aug 5, 2020
@ronso0
Copy link
Member

ronso0 commented Aug 5, 2020

It would also be cool if there was a functionality to remove history playlists containing less than N tracks.

... as action in history list context menu > QDialog
max. tracks spinbox
Delete Cancel

Or simply being able to select multiple history items in the sidebar, then use Remove from the existing context menu.

But that's probably asked too much for this PR.
Though we should keep it in mind > https://bugs.launchpad.net/mixxx/+bug/1127120

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, this is really a nice improvement.
I have left some comments.

src/library/trackset/baseplaylistfeature.h Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
@ronso0
Copy link
Member

ronso0 commented Aug 5, 2020

also somehow related:
https://bugs.launchpad.net/mixxx/+bug/1766163 (update history tracks more frequently)

@poelzi
Copy link
Contributor Author

poelzi commented Aug 5, 2020

It would also be cool if there was a functionality to remove history playlists containing less than N tracks.

I had a patch for this as well. Currently the cleanup for empty playlists is in the destructor of a class. Crashes or ctrl+c on a new session always creates empty playlists.

src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/setlogfeature.cpp Outdated Show resolved Hide resolved
@daschuer
Copy link
Member

Do you consider this in a mergeable state now? If yes, please remove the draft state.

And just a hint for the future:

Implement requested changes.

It is not interesting in some years that the commit was a review request. So it is better just to describe the change and split it into separate commits if you do not find a headline that covers all.

ronso0 added a commit to ronso0/mixxx that referenced this pull request Sep 17, 2020
@ronso0
Copy link
Member

ronso0 commented Sep 17, 2020

I wanted to have this in my 2.3 builds I use live, so I tried to port it to 2.3 (rather hasty copy/paste): https://github.com/ronso0/mixxx/tree/history-improv-2.3

@ronso0
Copy link
Member

ronso0 commented Sep 17, 2020

side note / small UX issue I noticed while testing this:

both regular playlists and history playlists can have numbers in parenthesis appended

  • for regular playlists this number indicates the number of tracks each list contains
  • for history playlists it's append only for the (n>1)-th playlist of a certain date

This is a bit confusing. Maybe we can use [ ] for the number of tracks?

@foss-
Copy link
Contributor

foss- commented Sep 17, 2020

YYYY-MM-DD_n (n2) where n is number of playlist on same date and n2 is the number of tracks on certain playlist. Using a suffix number for number of playlists on same date and parenthesis for number of tracks on tracklist would provide good readability and restore consistency with other playlists used in mixxx.

Edit to add: Allowing selection of more than a single entry when deleting unwanted entires would be highly welcome. But maybe that should be a separate PR then?

src/library/treeitemmodel.cpp Outdated Show resolved Hide resolved
@poelzi
Copy link
Contributor Author

poelzi commented Sep 20, 2020

I tried [] and other unicode characters and found YYYY-MM-DD / n looked the nicest.
Now the tree is properly set bold for the history entry and it's parent.

There is only one thing left that I would like to have:
If you delete a history entry, it would be nice if next item in the tree is selected after deletion. Currently the model is just redrawn and the tree is collapsed. I tried to use the scrollTo function on the Index, but since the index is based on the library feature model and not the sidebar model, the function crashes mixxx.

@foss-
Copy link
Contributor

foss- commented Sep 21, 2020

@poelzi can you attach a screenshot? Wouldn't that introduce an inconsistency with the way other library areas use n? how is n and n2 handled now?

@poelzi
Copy link
Contributor Author

poelzi commented Sep 21, 2020

Screenshot_2020-09-22_01-22-13

I can change it to something different, but this looks nice for me.
Export of a playlist now suggests a name in which the dir separator is replaced with a "-".

@poelzi
Copy link
Contributor Author

poelzi commented Sep 21, 2020

There is only one bug left, but I think it's upstream. scrollTo(QModelIndex) does not work on the sidebar widget.

@Holzhaus
Copy link
Member

There are also multiple unresolved review comments.

@ronso0
Copy link
Member

ronso0 commented Sep 22, 2020

There is only one bug left, but I think it's upstream. scrollTo(QModelIndex) does not work on the sidebar widget.

scrollTo seems to be broken in general. There are multiple outdated Qt bugs for QTreeView but I didn't yet take the time to create a new one for our context with QTableView as selectRow() is a helpful workaround/aternative for selecting and scrolling to an index.

@ronso0
Copy link
Member

ronso0 commented Sep 22, 2020

I can change it to something different, but this looks nice for me.

I vote for @foss- proposal:
2020-07-26_n (#)

@ronso0
Copy link
Member

ronso0 commented Sep 22, 2020

we could also have
2020-07-29 2/3 (#)

@poelzi
Copy link
Contributor Author

poelzi commented Sep 22, 2020

we could also have
2020-07-29 2/3 (#)

That is not practical, because it would require to rename all old entries of the same date.

@Holzhaus
Copy link
Member

Holzhaus commented Sep 22, 2020

What about YYYY-MM-DD - N (M)? Personally, I don't like the underscore (but I'd be okay with it if you prefer it) and the slash in incompatible with file names (when exporting).

@foss-
Copy link
Contributor

foss- commented Sep 22, 2020

@Holzhaus No strong feelings for either proposal.
YYYY-MM-DD_N (M) Idea with was to save space.
YYYY-MM-DD - N (M) Your proposal might be more human readable.

N: number of playlist for same day
M: number of tracks no playlist

@poelzi
Copy link
Contributor Author

poelzi commented Sep 22, 2020

I also really dislike the underscore. I'm ok with the - , just wanted to not use the same as the date. I fixed the issue with exports in general, every directory seperator is replaced by "-" for all playlist exports.

@ronso0
Copy link
Member

ronso0 commented Sep 23, 2020

I just don't fnd the - to be a good indicator for continous numbering.
what about YYYY-MM-DD #N (M) , would that work for export on all platforms?

@Holzhaus
Copy link
Member

I guess: https://stackoverflow.com/a/31976060

@daschuer
Copy link
Member

The "Join with previous" feature is now broken. Out of habit I expected that it deletes the current playlist and joins it with the one above. Unfortunately it now joins with the unrelated day below.
Can we rename that feature "Join with previous (below)" or explicit name the playlist joined?

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Some comments.

src/library/trackset/baseplaylistfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/baseplaylistfeature.cpp Outdated Show resolved Hide resolved
src/library/trackset/baseplaylistfeature.cpp Outdated Show resolved Hide resolved
VERIFY_OR_DEBUG_ASSERT(playlistId >= 0) {
return;
}
int nextId = selectSiblingPlaylistId(m_lastRightClickedIndex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int nextId = selectSiblingPlaylistId(m_lastRightClickedIndex);
int siblingId = selectSiblingPlaylistId(m_lastRightClickedIndex);

src/library/trackset/baseplaylistfeature.cpp Outdated Show resolved Hide resolved
@poelzi
Copy link
Contributor Author

poelzi commented Nov 30, 2020

The "Join with previous" feature is now broken. Out of habit I expected that it deletes the current playlist and joins it with the one above. Unfortunately it now joins with the unrelated day below.
Can we rename that feature "Join with previous (below)" or explicit name the playlist joined?

This is just habit and will change once used to it. It behaves correctly here and joins the entry with the previous entry which is below the current one, because it is further in time.

@daschuer
Copy link
Member

This is just habit and will change once used to it. It behaves correctly here and joins the entry with the previous entry which is below the current one, because it is further in time.

The issue is that it can't be undone. As I hit the trap, many others will do.
So let's at least at least change the name to "Join with previous (below)"

@ronso0
Copy link
Member

ronso0 commented Nov 30, 2020

The timeline is inverted now, top-to-bottom gors into the past, this feels very intuitive to me. I assume most users have one history per day so the date numbers make that clear instantly IMO.
So the "Join with previous" learning curve is quite steep ;) I would not add 'below' here.

Only activate playlists when already in focus.
Add option to scroll but not select sidebar items.
@poelzi
Copy link
Contributor Author

poelzi commented Dec 1, 2020

@daschuer Fixed your points

@poelzi poelzi requested a review from daschuer December 1, 2020 17:20
Copy link
Contributor

@uklotzde uklotzde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine so far and is a huge usability improvement.

A nice extension for the future would be relative date folders:

  • today
  • yesterday
  • last week
  • last month
  • last year
  • ...remaining playlists grouped by calendar year...

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thank you.

@daschuer
Copy link
Member

daschuer commented Dec 2, 2020

@Holzhaus: merge?

@Holzhaus
Copy link
Member

Holzhaus commented Dec 2, 2020

@Holzhaus: merge?

Feel free to merge, I didn't follow this PR.

@uklotzde
Copy link
Contributor

uklotzde commented Dec 2, 2020

All review comments have been addressed. Thank you! LGTM

@uklotzde uklotzde merged commit 049311a into mixxxdj:main Dec 2, 2020
@ronso0
Copy link
Member

ronso0 commented Dec 3, 2020

🎉

@Be-ing
Copy link
Contributor

Be-ing commented Dec 10, 2020

The meaning of the number after the playlist date is unclear to me. Why does sometimes it have a # whereas other times it is in parentheses?

@ronso0
Copy link
Member

ronso0 commented Dec 10, 2020

# is the prefix for the Nth playlist on that day.
number in parenthesis is the track count.

@Be-ing
Copy link
Contributor

Be-ing commented Dec 10, 2020

I think I got confused because there is no number in parentheses if the playlist only has 1 track.

@Holzhaus
Copy link
Member

I think I got confused because there is no number in parentheses if the playlist only has 1 track.

I agree, we should always show the track count.

@poelzi
Copy link
Contributor Author

poelzi commented Dec 11, 2020

I will open a followup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

10 participants