Sorting in the library window

2
  • +1 for improved sorting using the suggestions already mentioned above.

    Also, how about an expand-all button, or setting for default. I only just discovered the shortcut of minus key (-) and plus key (+)

    Thanks!
  • Thanks fbennet for the news. That's good to hear.
  • fbennett, that is great news. Your work is an will be much appreciated.
    Cheers!

    @JonEP do you have a link to that ticket? That would be grate.
  • dan links to it above
    https://www.zotero.org/trac/ticket/1656
  • OK, I've implemented improved creator sorting on the trunk.

    Zotero should now consider the last and first names of all creators represented by the Creator field for an item (meaning, in order of preference, all of the primary creator type (usually Author), all editors, or all contributors).

    While this change has the potential to greatly slow down display of the items list, I think this implementation should perform pretty well. (Among other things, Zotero will sort on the first word of the visible Creator field first, loading and sorting on the full creators only if necessary.) It still needs some testing on large libraries, though, and particularly those with many identical creators. Some additional optimizations (e.g., comparing only the first few creators) may be warranted.

    The new behavior will be available in 2.1b3.
  • Great progress has been made on this issue. Creators now sort by lastname, then firstname.

    I'm still quite interested in being able to sort by columns... any chance developers could take this up? For instance, it would be great to switch from a view of the library sorted by lastname, firstname, date to a sort by lastname, firstname, title.

    Thanks.
  • Well searching for something that I suspect might be quite simple I came upon this discussion. I agree the ability to sort by multiple columns would be a nice feature to include...

    But, what I'm guessing is now probably a simple question and I'm just missing it somehow is:
    How in the "Creator" column do I show "Lastname, Firstname".

    I'm beginning to get enough references where I have multiple authors with the same last name and multiple entries for each. For example 7 different authors all the same last name (ie. Smith) with 3-5 entries for each author, scanning the library list becomes confusing not knowing which "smith" i'm looking for.

    Thanks.
  • edited November 21, 2011
    Please note that dmiller's tangential request above has not been addressed. A number of threads have addressed aspects of this:
    http://forums.zotero.org/discussion/12228/sort-bibliography-by-page-number/
    http://forums.zotero.org/discussion/19573/sorting-possibilities/
    http://forums.zotero.org/discussion/17725/allow-more-fields-to-be-presentedsorted-in-middle-pane/
    I've started a new thread as a general approach to this question: http://forums.zotero.org/discussion/20637/more-sortby-columns-in-middle-pane/#Item_1
    Thanks.
  • Perhaps when developers address the "more sort by columns" issue, they could take a look at more advanced sorting options (i.e., sorting by multiple columns)?
  • I went looking because I've got about 80 items in my Zotero database by a single author. I've got two requests, one of which may be a possible solution.

    I really need to have titles sorted within author. But I can just as easily see date sorted with author or title within publisher, or a bizillion other combinations. So I'm waking this thread up.

    A possible solution would be to add a "sort by" field with a simple rule for default construction and a way of reconstructing it for a particular project. The rule could be something like "first author + title + publication year" and a menu item of "construct source". "Sort by" would populate on creation (rather like "visible name" in many contact managers). "Construct sort" would simply blindly apply the rule, overwriting whatever is there. It would take a few moments to execute, but it would save a huge amount of time.

    So is anything being done to implement a more advanced sorting technique?
  • edited March 12, 2014
    Today I found myself wanting to use my zotero library to see what titles of interest to me had been published by a certain press. I would love to be able to sort by publisher, and then date, so I could see all the titles of the particular press, arranged chronologically, in order to get a sense for the trajectory of their publishing.

    Having a more agile sorting feature would make it possible to carry out this query, and many others besides.

    Edit: Of course, a workaround is to create a new saved search in which the Publisher = x, and then organize by date within that search. Advanced sorting would save some steps...
  • Is there progress being made on the sorting by multiple columns item. I have been using zotero for a number of years now and am often looking for this feature. I have had to create dozens of saved searches and then I have to remember if I created a saved search, find it if I did make one, click on this and then sort by the second column I want sorted. And then if I want it sorted by a third column I am out of luck.

    Anyway, I just thought I would check in regarding this.

    Thanks
  • nothing new. It's still generally wanted, but as Dan notes above, the platform Zotero uses doesn't support it natively, so it's a pretty solid amount of work to implement.
  • Thanks Adam for your quick response. Zotero is really an amazing piece of software so thanks for keeping it up and running. I guess after using it for so many years (on an almost daily basis) I begin to see some of its limitations.
  • FWIW, I had an exchange with Dan about this a year ago: https://github.com/zotero/zotero/issues/275 (I'll revisit this at some point with better ideas)
  • Thanks aurimas. I just took at look at that exchange. My suggestion would be this. Keep the sort as it is and add a separate button or choice somewhere that is called advanced sort. When you click on this it calls up a dialogue where you can choose what columns you want sorted and which one 1st , 2nd, 3rd, etc. This is the standard way in spreadsheet programs like Excel and calc. I would hate to have to move columns around in order to sort by them.

    Thanks,
    David
  • I don't think Excel can be the model here. If we're looking for guidance it would need to come from software that does something similar, i.e. organize items - file managers, mp3 software, reference managers.
    Too many extra buttons and options decrease usability and if Zotero's user interface were as cluttered as Excel's, that'd be truly bad...
  • The stable sorting I talk about in the GitHub issue is actually not that uncommon. AFAICT, it's implemented in Mendeley, WinAmp, Windows Media Player, Windows Explorer, mp3tag on Windows; Nautilus and System Monitor on Ubuntu; Wikipedia tables on the web (can't think of that many websites that display multi-column sortable tables)

    http://tablesorter.com/docs/ has an alternative way of sorting tables, which may be somewhat harder to implement in XUL. I like that it's more obvious to the user what's going on behind the scenes, has great visual indications (though maybe multiple colors could be better), and it works better with the way users think about sorting tables. With stable sorting, you go backwards from the way you think (i.e. if I want to sort by author, then year, then title, I would first sort by title, then year, then author), but with modifier key sorting, you go forward (i.e. sort by author, year, title). (BTW, this is also implemented in Wikipedia's tables)

    But, what happens if the user shift-clicks the column that was already included in the sort order? Does the column change precedence? Does it change sort direction?

    There's also some benefit to predefining secondary sorting (i.e. when sorting by author, sort by year as secondary sort by default), which would be incompatible with stable sort, but would be ok with shift-click sorting.
  • edited April 23, 2014
    Sorting is a key aspect of what I am often doing when I use zotero so I wouldn't mind a dedicated button for sorting. I also just looked at the zotero UI. I never use the add items by identifier, new note, or add attachment icons let alone the new collection or new group icons. So for me I would be happy if those icons disappeared. I guess my point is that every user will have different ways of using the program. From my perspective a sort button would be great. It could also be hidden under some other icon if need be.

    I just checked another piece of software that I use (IMatch) and in the current version they have a sort button. There are preset sort options and users can create new sort options. Then when you want to change the sorting you click on this button and a drop down menu appears with the different sort option to choose from. If zotero had something like this I would likely be using it all the time.

    I have a few common sorting patterns that I use, which I could set as preset. (Sort by publication then year). (Sort by author then year.

    Anyway my thoughts.
  • The stable sorting I talk about in the GitHub issue is actually not that uncommon.
    I'm still not really clear what you're referring to there (and, to reiterate, the thing I was asking for examples of was the convoluted "hidden sort order following the click history" idea). As I said on the ticket, the only sense in that Zotero wasn't "stable" in the traditional sense was that we used Date Modified as a tertiary (or so) sort, and we fixed that at the time. Is there something else? What is implemented in these other programs you list that's not implemented in Zotero?
  • As far as I know, the main difference between Zotero's sorting and that of other programs is that Zotero's sorting is a lot more sophisticated. We go to rather extensive lengths in trying to put relevant results where you'd want them — for example, choosing secondary and tertiary sort fields automatically, sorting empty fields at the beginning or end differently depending on whether it makes sense for the field being sorted, using additional creators beyond what's actually displayed in the firstCreator column, etc.
  • Thanks Dan for your comments. I agree Zotero is quite sophisticated in many ways and I appreciate the efforts that have been put into the sorting system. And like I mentioned earlier every user is different. So for me the secondary and tertiary sort fields that are automated are not the ones that I would choose so the relevant results are not where I want them to be.

    Since the program has already been programed to sort the columns by secondary and tertiary fields by default perhaps that detail can be put in the hands of the users to choose?
  • edited April 23, 2014
    http://tablesorter.com/docs/ has an alternative way of sorting tables
    Yeah, that's great. I don't think we can do it without UI feedback, though, and I'm not sure we can do much of anything in the tree view UI. But I'm open to allowing the implicit secondary/tertiary/etc. sort (currently firstCreator -> date -> title -> dateAdded, skipping the primary sort as necessary) to be defined as a preference. [Edit: What David said.]

    How important would it be to be able to choose different additional sorts depending on the primary field selected, or is a single list that skipped the primary field (as is currently implemented) sufficient?
  • That would be great to have this an option!

    I guess if it is possible give the user a number of choices. If that was possible I would then likely go in to the preferences and change the default sort order depending on what I was looking for.

    Thanks!
  • The stable sorting I talk about in the GitHub issue is actually not that uncommon.


    I'm still not really clear what you're referring to there (and, to reiterate, the thing I was asking for examples of was the convoluted "hidden sort order following the click history" idea).
    Stable sort means that given a list of items, comparing items that are of equivalent value, maintains their position in the list. So if I were to first sort the list on year of publication, then sort the list on journal, the items within the same journal would remain sorted based on year of publication. This allows the user to define the order of sorting, but you have to click on items backwards.

    This does not work in Zotero, because Zotero predefines secondary/tertiary sorting for certain fields. For Publication, the secondary sorting is done on Creator, so if I sort by year first, then by Publication, I get a list that's sorted by Publication and then by Creator. This is fine for Zotero, I guess, since logical ordering can be predicted for most cases (though clearly not everyone).

    The "convoluted 'hidden sort order following the click history' idea" I was talking about initially is exactly the above, except I didn't know what to call it at the time and the "history tracking" is implicit in the algorithm.
    Yeah, that's great. I don't think we can do it without UI feedback, though, and I'm not sure we can do much of anything in the tree view UI.
    https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/Styling_a_Tree suggests that we can style tree column headers. I'll mess around with it.
  • The "convoluted 'hidden sort order following the click history' idea" I was talking about initially is exactly the above, except I didn't know what to call it at the time and the "history tracking" is implicit in the algorithm.
    OK, I see what you mean now — I hadn't made the connection between that clicking behavior and the stable sort. But then it's not that Zotero's sorting algorithm itself is unstable — like in pretty much any other program, the underlying high-level sorting algorithm itself (i.e., the SpiderMonkey sorting algorithm) is stable — it's just that we made the design decision to include additional fields. Anyhow, I'm much more doubtful than you that people would find the backwards clicking intuitive (or even know it was happening).

    I also have a feeling you won't be able to style the column headers sufficiently — even when elements are styleable in the tree, the available properties are extremely limited — so I suspect a pref is the best we can do here.
  • I mentioned this earlier in the thread, but since the search is on for applications that do similar things (sorting materials by categories), I would reiterate that the itunes alternative MediaMonkey does an absolutely fantastic job at this. Instead of being able to click only one little arrow at the top of one column, you can click first one, then shift-click another, then another, and that becomes the priority ranking for the search. So you could sort by publisher, then date, then creator.
  • If user-defined sort priority preferences were implemented, I think it would be a lot more intuitive and useful for there to be an Advanced Sort button where the order can be defined on the fly, rather than as a set of pre-set preferences by field/item type/whatever. I frequently would like to sort on multiple columns, but rarely is the set of fields the same from instance to instance.
  • edited May 4, 2014
    Like I mentioned earlier I also frequently would like to sort on multiple columns and like bwiernik the set of fields I would choose also changes from instance to instance although if I checked closely my choices would likely fit only a few (maybe 5 or 6) patterns.

    Dan doesn't think that enough users care about being able to sort by multiple columns and that the preset sort orders are sophisticated and do what most users want. I think I got that correct Dan. Please correct me if I am wrong. So given that there has not been user control over sort orders beyond the first columns yet this particular thread is almost 5 years old I will take what I can get even if it is not perfect.

    If I had my way I like the idea of a small dedicated button or a button under one of the icons that when clicked on had a drop down menu that allowed the user to choose from a set of defined sort options. The user would also be able to add preset sort orders to this list and delete and change ones that were present. I guess if I really had what I wanted I would take this plus the idea that bwiernik suggests. But like I said I would be happy with any additional control over sort order that I can get.

    Dan I know you mentioned that you don't like the idea of more buttons, etc. You could give us a preference that allowed us to include or not include this button so those that didn't want it could avoid it.

    And thanks Dan for all your hard work on this project. I really do appreciate your dedication and hard work. My post is by no means attempting to be critical of your thinking, etc.

    Thanks,
    David
  • Dan doesn't think that enough users care about being able to sort by multiple columns and that the preset sort orders are sophisticated and do what most users want.
    I don't think I said that anywhere. What I've said a bunch of times is that, because of the Mozilla framework we use, we can't implement any sort of UI feedback for click-activated multiple-column sorting, and until we can, it isn't going to happen.

    But I realized there's something else we can do (albeit it in a very hacky way):

    https://www.dropbox.com/s/61m70ve2mesn2wv/secondary_sort.png

    This seems like by far the simplest solution.

    I'm leaning towards making it remember the selections for different primary columns separately. That could be slightly confusing if you didn't realize what was happening, but if you did it would probably be more useful.
Sign In or Register to comment.