View Issue Details

IDProjectCategoryView StatusLast Update
0001273MediaMonkey 4Now Playingpublic2007-08-01 03:11
Reporterrusty Assigned To 
PriorityimmediateSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Fixed in Version3.0 
Summary0001273: Sorting isn't enabled for Now Playing (crash)
DescriptionThe Now Playing node cannot be sorted (even though the playlist node can). In #1266, the reasoning given that a a new string was needed to implement sorting in Now Playing, however, I do not believ that this is the case.

Here are possible scenarios:
1) User sorts heading --> sort order is adjusted but play order isn't (just like in the playlist nodes

2) User double clicks a track when sort order doesn't match play order
-->
. a) Tracks play in order displayed (consistent with the behavior in the playlists node)
OR
. b) Tracks to play according to the playlist order (even if we take this approach then we wouldn't have to change the behaviour in the playlists node--it's inconsistent, but the cases are also a bit different).

I would suggest that b) makes more sense for now (more conservative).

3) After the user sorts by a heading and there's a difference between the Play Order and the Display Order, then <alt><f5> functionality should refresh the play order in the Now Playing node.

In any of these scenarios, I don't see a need for new strings.
Additional InformationSee complete discussion of related issues in #1266
TagsNo tags attached.
Fixed in build1056

Relationships

related to 0000133 confirmedjiri Undo function 
related to 0000023 feedbackrusty Configurable Shuffle functionality (current behavior vs randomize list) 
parent of 0006189 closedLudek Sorting in Now Playing is slow for > 10k tracks 
related to 0002657 closedrusty Sorting Now Playing caused MediaMonkey to freeze 
related to 0002658 closedLudek Sorting of Now Playing isn't disabled in Party Mode 
related to 0004874 closedpetr Play Order ('#' column) Sorting doesn't work correctly 
related to 0005165 new Sorting in Now Playing resets the Play Order 
related to 0005225 closedLudek Changing column width in Now Playing can lose sort arrow 
related to 0007486 newpetr # Column can't be sorted in decreasing order 

Activities

jiri

2004-04-30 17:16

administrator   ~0003936

I think that this is a bit a different case, I wouldn't like to implement it in a similar case as playlists are but rather ask user after clicking a header if he/she really wants to update the playing order. Even if we decide to go the way you suggested, I wouldn't like to do it in MM 2.2 because of quite significant changes needed.

Leaving to Rusty to decrease priority...

rusty

2006-07-13 18:48

administrator   ~0007497

Last edited: 2006-07-18 20:29

Raising to urgent. I don't think any new UI is required if we take the approach of 2b).

jiri

2006-07-20 15:16

administrator   ~0007559

Instead of making this complicated for users, I'd suggest to simply sort Now Playing after column header is clicked (both visually and internally). However, since it could easily happen that user will click unintentionally, we should implement a simple one-step Undo function (in right-click menu?) that would return user to the previous state. This Undo function could also support restoring Now Playing content after user accidentally clears it.

This is how I think it should support ascending/descending: I think that we shouldn't show asc/desc indicator there (because the sorting won't be 'live') and so if user clicks a column once, NP should be sorted. If user clicks it again:
- within 3 (or more?) seconds, NP is sorted in descending sort order
- after 3 seconds, NP is again re-sorted in ascending sort order

rusty

2006-07-26 18:51

administrator   ~0007616

I really like this idea, though I'd suggest that if we're enabling an undo function for this release, that the implementation should just rely on the standard Edit | Undo command (or toolbar buttons if we decide to add them), rather than making a specific command for Playlists.

As far as not showing the asc/desc indicator and some sort of time delay, I'm not sure I understand the rationale for any of this since clicking a header to sort by a column would change the sort order, but wouldn't change the play order (just like when the user sorts tracks in a playlist, prior to pressing <alt><f5>).

jiri

2006-07-26 19:31

administrator   ~0007617

Re. Undo - I don't think we can make it a general command, because it would require implementation of Undo for pretty much any command which I don't believe is possible with a reasonable effort and without significant requirements for resources (disk space, etc.).

I possibly wasn't clear, but I don't think there should be any difference between sort order and play order, simply what user sees should be play order. The rationale for timeout there is that as I described, we shouldn't include Asc/Desc indicator and then it wouldn't be clear how to switch Asc/Desc modes.

rusty

2006-07-27 21:02

administrator   ~0007630

Following some discussion we agreed to mostly follow the approach suggested by Jiri which is far simpler than the originally suggested approach. Key points are:

1) Display order always equals play order (whether the tracks are currently playing or not). So if the user sorts by X while the NP list is playing, the play order will actually change _live_.

2) If the user clicks a heading to sort, then a sort indicator will briefly appear to indicate the direction of the sort. The indicator will not stay, since the sort is not 'live' (i.e. tracks that are newly added to the Now Playing list will not be resorted).

3) Undo functionality will be implemented as described in 0000133 (i.e. Edit | Undo Sort ). Minimally a single undo is required, though it would be nice to support multiple undos.

jiri

2006-07-31 07:20

administrator   ~0007637

Just some additions:

2) The indicator should stay there for a fixed time, probably ~3 seconds. If user clicks the column in this time, the sort order will be changed (i.e. from asc to desc), if user clicks the column after expiration of the time period, the sort order will always be the default one (i.e. asc).

(as a nice bonus, we could enhance this system also by support for Ctrl key as we have it in main window track sorting - i.e. the user can sort by multiple columns)

3) Since 0000133 is relatively complex and problematic in some parts, I'm not sure we'll make it into 3.0. Therefore I'd suggest to at least temporarily add Undo item to List or Edit menu of Now Playing window. I think it would fit there pretty well.

rusty

2006-07-31 14:23

administrator   ~0007638

2) Sounds good.

3) This seems consistent with 0000133. i.e. bug 0000133 simply states the means by which we'll implement undo functionality, along with initial functions with which it will work. In this case, 'Undo sort' might be one of the first functions that works within that framework.

rusty

2006-08-03 15:56

administrator   ~0007660

Per IM discussion,
-Since we're deferring 0000133, the undo functionality will be limited to the NP functionality (undoing deletion/reordering/change to the NP playlist).
-It should be accessible via Now Playing dialog: Edit | Undo (first entry, greyed out if nothing to undo)
-It should also be accessible via the context menus of:
 -Tracklist when in NP node
 -NP node

jiri

2006-08-03 16:13

administrator   ~0007661

Here is up to date summary of the issue:

1) If the user clicks a heading to sort, then a sort indicator will appear for a fixed time (probably 3 seconds) to indicate the direction of the sort. If user clicks the column in this time, the sort order will be changed (i.e. from asc to desc), if user clicks the column after expiration of the time period, the sort order will always be the default one (i.e. asc).

2) Changing order means that tracks will be physically re-ordered in NP window and will play in that order.

3) NP will need Undo functionality, Undo commands will appear in several places (as written above by Rusty). There will be these types of Undoable commands:
 3a) Sort - 'Undo change order' will appear in menu. Note that I'd consider several sort operations taken in a row as a single sort operation, i.e. one Undo will revert them all.
 3b) Add tracks - 'Undo add x track(s)'.
 3c) Remove tracks - 'Undo remove x track(s)'.
 3d) Clear playlist - 'Undo clear Now Playing' (note that this command should appear also if user Adds a new track to be played and this command clears NP).

There should be ~10 Undo steps available.

Technically, it will keep that ~10 TSongList structures in FullPlayer.pas unit, so that it's possible to return to the previous state of Now Playing.

Ludek

2006-08-09 13:26

developer   ~0007701

Implemented in revisions:
1413 - Implemented sorting for 'Now Playing'
1415 - Added hiding of asc/des indicators in a few seconds.
1419 - Implemented 'Undo' function for 'Now Playing' list as described.

rusty

2006-09-22 04:38

administrator   ~0007929

Aside from a couple of bugs, this is functioning nicely. Bugs are documented separately.

jiri

2007-05-25 10:10

administrator   ~0009202

Last edited: 2007-06-06 14:17

This functionality works well, but I think that a minor enhancement would make it more usable. The problem there is that if you press Undo, you don't know what exactly would happen, you only see it afterwards - and then there isn't any 'Redo' feature to revert the changes. So, I'd suggest to (as partially suggested above):

1) Follow Undo by a brief description of what would be Undoed:
 1a) Sort - 'Undo - Change order' will appear in menu. Note1: I'd consider several sort operations taken in a row as a single sort operation, i.e. one Undo will revert them all, but may it isn't necessary. Note2: This should also include d&d of NP elements - this operation currently isn't undoable at all!
 1b) Add tracks - 'Undo - Add x track(s)'.
 1c) Remove tracks - 'Undo - Remove x track(s)'.
 1d) Clear playlist - 'Undo - Clear Now Playing' (note that this command should appear also if user Adds a new track to be played and this command clears NP).
 1e) Shuffle - 'Undo - Shuffle' This is related to the new way Shuffle will work (see 0000023).
2) Add Redo command that reverses the previously done Undo - pretty much the same way as Back and Forward arrows work in Tree navigation. Redo should be followed by a descriptive text as Undo command - as described in 1).

Assigning to Rusty for a review.

rusty

2007-06-06 15:38

administrator   ~0009257

The only suggestion I'd make is that we add a bit more context to these commands so that we can include them sub to the main Edit bar. e.g.

 1a) 'Undo - Sort Now Playing'
 1b) 'Undo - Add x track(s) to Now Playing'.
 1c) 'Undo - Remove x track(s) from Now Playing'.
 1d) 'Undo - Clear Now Playing'
 1e) 'Undo - Shuffle'

Also, should there always be only a single 'Undo - X' command? Or are you proposing that there should sometimes by > 1 command available (via a hierarchy??)?

jiri

2007-06-06 16:04

administrator   ~0009263

Ok, I agree with adding more context.

Re. >1 Undo - yes, that would definitely be better - something like in MS products, like Word, where you can select any number of last commands and they are all Undoed.

Ludek

2007-06-24 23:09

developer   ~0009555

Last edited: 2007-06-25 07:35

1a,1b,1c,1d added in build 1046.

Also another strings was added:
1f: 'Undo - Remove Duplicates from Now Playing'
1g: 'Undo - Randomize tracks of Now Playing'
1h: 'Undo - Reverse Now Playing'
1i: 'Undo - Clean Now Playing'

Re 2: Redo function - Does Rusty wish Redo to be implemented too?

3) I'm not sure what you mean by "Multiple undo". Jiri wrote that it should be implemented similar like in MS Word, but I didn't find any such functionality in MS Word. Note: I use MS Word 2002.

rusty

2007-06-25 15:15

administrator   ~0009562

2) My intent was:
 a) 'Redo - Sort Now Playing'
 b) 'Redo - Add x track(s) to Now Playing'.
 c) 'Redo - Remove x track(s) from Now Playing'.
 d) 'Redo - Clear Now Playing'
 e) 'Redo - Shuffle'
 f) 'Redo - Remove Duplicates from Now Playing'
 g) 'Redo - Randomize tracks of Now Playing'
 h) 'Redo - Reverse Now Playing'
 i) 'Redo - Clean Now Playing'

3) Most common implementations of undo/redo work along the following lines:
 [<-^] [->^]
i.e. an undo or redo button, with a dropdown that displays the last 5 steps in reverse chronological sequence each of which can be 'undone' or 'redone'.

With MM, we don't have these buttons in the toolbar, but we can offer multiple undo / redo as follows:

Undo > List of last 5 steps in reverse chronological order (and user selects the relevant step).

Assigning to Jiri, in case this is more functionality than he originally had intended.

jiri

2007-06-25 15:55

administrator   ~0009565

Assigning to Ludek - this is what I meant and shouldn't be hard to implement.

Ludek

2007-07-30 12:55

developer   ~0009989

All (2 and 3) is implemented in build 1055.

rusty

2007-07-30 21:43

administrator   ~0010010

Tested build 1055:
Add tracks to Now Playing and then sort by Artist
--> MM Crashes and freezes (even a eurekalog can't be sent)!

Setting to immediate.

petr

2007-07-30 22:07

developer   ~0010011

Crash fixed. Will be in 1056.

rusty

2007-08-01 03:11

administrator   ~0010034

Verified 1057.