18

I have a table of results and if I click on any column it sorts descending. If I click again, it sorts ascending. If I click it again, what should happen?

Here are the options I see, but not sure which one is best:

  1. It resets to whatever it was before I started sorting
  2. It sorts descending (again)
  • 2
    I don't know if the third click should revert the sort order, but I do know that I've frequently wanted a "no fuck what did I do go back" control of some sort. Finding the column a table was originally sorted by isn't always easy, especially if the table was ordered by some factor not represented as an explicit column, or if the table was lexicographically ordered by multiple column values. – user2357112 supports Monica Nov 5 '15 at 18:31
  • 1
    @user2357112 Agreed. Though I find the three-state form most useful when the user can order items manually, but then choose to sort by column. Most systems that don't provide the three-state column require you to right-click somewhere or open a menu and select "clear sort"/"reset sort"/"sort by none" and that's much more of a pain than it needs to be when just clicking on the column a third time can clear it instead. – JAB Nov 5 '15 at 18:49
16

Should clicking a column header a third time remove the ascending or descending order?

No it shouldn't

Whatever the previous arrangement was that wasn't ascending or descending should be an ascending or descending order of another column. If a user desires to go back to that view of the current column not being sorted one would figure out what column originally was ascending or descending (maybe something that's a primary key or a unique column) and then a user would click on the header there.

Having 3 states to clicking on the column header is weird, non intuitive and most importantly breaks industry conventions IMO. We don't really give users much indication as to what column headers will do other than sometimes displaying a small up or down arrow. But the third state breaks convention and it may take users a while to figure it out and confuse them. So in short I would only toggle between the two states ascending and descending.

What if the previous order didn't order the table by a column value? For example, a table initially ordered by last modification of its entries, or by the order the data was entered?

Refactor out that information and put it in another column if that is pertinent information to the user. If that information isn't important enough to be its own column then I don't see why someone would want to revert to a view that ordered on that value.

  • 8
    What if the previous order didn't order the table by a column value? For example, a table initially ordered by last modification of its entries, or by the order the data was entered? Insertion/modification timestamps are likely not part of the displayed table, and including them would often just be noise. There are also possibilities like a lexicographic order by multiple columns, which can't be replicated by single-column sorts unless the sorting is stable. – user2357112 supports Monica Nov 5 '15 at 19:16
  • 5
    @user2357112 If the last modification timestamp is relevant, it should be shown in the table. If it isn't relevant, why would you order on it? The same applies for creation timestamps. – Nzall Nov 5 '15 at 20:30
  • I agree with what @NateKerkhofs said. I was thinking well what if it was ordered by something not shown in the table. But I couldn't think of anything that you would order by and why it wouldn't be valuable to show especially if your ordering on it. – Frank Visaggio Nov 5 '15 at 20:34
  • 4
    Maybe you have a list of values of some constant in different units, ordered vaguely by usefulness or importance of those units. You can't make that a column, and it wouldn't be a useful column if you did. Maybe more recent data is expected to be more important than older data, but how recent is unimportant. (Usually, I see people putting short, approximate timestamps in that case, but maybe you're in a context where approximate values would be confusing.) Maybe the default order conveys information that is most naturally conveyed through ordering, and doesn't make sense as a column. – user2357112 supports Monica Nov 5 '15 at 21:04
  • 1
    @user2357112 Yeah, I tink search results might be one of the only exceptions to the rule, but in that case I would instead justa dd a button or icon to remove the sort rather than introducing new custom behaviour. – David Mulder Nov 6 '15 at 12:36
4

Use

  1. It sorts descending (again)

Why? Because that's what column headers that sort typically do. I'm not even convinced that you could reset to whatever it was before... What if you've applied sorts/filters to other columns?

If you find your users really need to reset to what it just was, consider an undo function that saves several steps.

  • I second that. To me, this is typical expected behavior. Everything else would most likely confuse the user rather than help her. I also would recommend adding a "remove sorting" functionality, since the purpose of this is initially clear and does not require much brain power to understand. – Jan Nov 5 '15 at 16:42
  • 1
    I'm not sure of the benefit of "remove sort" and I don't see this usually provided. The data is always sorted by something...the user can return it to default simply by clicking the column that it was sorted by in the first place. – user31143 Nov 5 '15 at 16:46
  • I agree with Dan, I've even seen cases where default filtering could be complex and there are buttons / links which users can click to go back to the default sort view – Igorek Nov 5 '15 at 18:03
2

The main reason not to do option 1 is because a list being completely unsorted is not really any more useful to a user than a list sorted by an arbitrary characteristic. Why would a user want the list to unsort? Is there some default sort mechanism? If so, why can't the user just sort by that method?

I can see only one reason that clicking the header a third time should remove the sort: if you can sort on multiple fields at the same time. If the user could sort by first the location field, then the name field, they might then determine that they don't want the sort by location at all, so there needs to be a way to remove it. This would likely require some other controls anyway, as solely using the headers for sorting doesn't lend itself well to assigning sort priority.

  • I can think of one reason, it's when the user sorts on a column (sometimes by accident when he's trying to resize the field) and he loses the item he was interested in somewhere in 100 pages of data, so he wants to unsort the data to find that item again. He either doesn't know which column the data was sorted on before or it was in some default sort order that isn't based on a column that he can see. – Johnny Nov 5 '15 at 21:06
1

It resets to whatever it was before I started sorting

I LOVE THIS OPTION

Only your better apps provide this sort of initiative in communicating with the user. Unsorted may be better! Does a programmer know?
Few users will be amiss to find their column sorted, but anyone that has ever had the experience of dealing with "all encompassing software" may see your company as a tad incompetent. Large institutions like Microsoft make products that range from this sort of depth to the other side of completely shallow.
"The third click returns the data to the original state," is strictly intuitive. But you would have to write the additional coding to work out this reintegration, which most devs avoid despite its uncostly nature. First, ask yourself, is it useful, or just impedance?

Finally, it depends most on what you are trying to communicate with your product, which should complement how your product provides functionality to your customer.

  • 1
    Do you have any support for "is strictly intuitive"? What do you mean be "all ecompassing software"? – virtualnobi Nov 11 '15 at 7:54
1

They both have their use case.

It resets to whatever it was before I started sorting is useful when there is a default sorting, that is more or less implicit.

Famous example: Spotify. A list of songs can be arranged in for example albums, play lists or search hit relevance, that all have built-in sorting order (track number, arrangement by user, and secret algorithm, respectively). This order is not necessarily arranged in a column, or might be downplayed visually compared to the other default columns, or might not even show at all. So the third clicks gets you back without looking for it.

It sorts descending (again) is useful anywhere else. With no downplayed or hidden sorting columns, there is no need for the convention-breaking third click (unless this third click one day actually becomes the convention!)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.