[wp-trac] [WordPress Trac] #21643: Uploaded media should keep alphabetic order

WordPress Trac wp-trac at lists.automattic.com
Sat Aug 25 09:09:39 UTC 2012


#21643: Uploaded media should keep alphabetic order
--------------------------+------------------------
 Reporter:  tar.gz        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Upload        |     Version:  3.4.1
 Severity:  normal        |  Resolution:  duplicate
 Keywords:  close         |
--------------------------+------------------------

Comment (by tar.gz):

 Thanks a lot for that plugin, Sergey ! It's already a huge improvement for
 me. What I like is that the listing order seen during the upload ''is
 maintained'' after I hit "save".

 But indeed, it's probably confusing when the user adds more images in a
 second step.

 I think that the behavior of multiple image upload as it is currently
 handeld in Facebook (for image "albums") is probably the most intuitive
 and useful:

 1) If you upload a bunch of images (e.g. 004.jpg, 005.jpg, 006.jpg), they
 will be ordered ''by filename''.

 2) If you upload a second bunch of images (e.g. 001.jpg, 002.jpg,
 003.jpg), they will also be ordered, BUT they will be added AFTER the
 previously uploaded ones (at the bottom).

 So the end result of that example would look like this:

 - 004.jpg
 - 005.jpg
 - 006.jpg
 - 001.jpg
 - 002.jpg
 - 003.jpg

 So the rules for Facebook albums are:
 - Each group of uploaded files is ordered '''alphabetically'''.
 - New groups of uploaded files are added '''at the end''' of the list.

 While in WP 3.4 the result looks like this:

 - 003.jpg
 - 002.jpg
 - 001.jpg
 - 006.jpg
 - 005.jpg
 - 004.jpg

 So we can observe the following rules in WP 3.4:
 - Each group of files is ordered "by upload order, newest first" (which
 happens to be '''reverse-alphabetical''' most of the time).
 - New groups of uploaded files are added '''at the beginning''' of the
 list, since they have a newer file ID.

 I'm pretty sure that in 90% of cases, that won't be the "right" order, and
 the user will have to change it manually.

 Finally, with Sergey's modification, the end result is this:

 - 001.jpg
 - 002.jpg
 - 003.jpg
 - 004.jpg
 - 005.jpg
 - 006.jpg

 So here the behaviour is:
 - Each group of files is ordered alphabetically.
 - New groups of uploaded files are not handled as "groups" at all, they
 are forced into the alphabetical listing.

 I believe that the way Facebook handles multiple image uploads is the most
 user-friendly and coherent (I hope they don't hold a patent on this?:). If
 we want to achieve it in WP, we could apply the following logic:
 - By default, file galeries are ordered from the oldest to the newest ID
 (oldest on top).
 - When a group of files is bulk-uploaded, IDs are given to the files by
 alphabetical order.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21643#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list