When a user is viewing a paged table and requests it to sorted by a particular column, what page is shown?
Is there a standard expected behavior for this scenario? I can imagine several possible outcomes, but want to know if there is a standard.
When a user is viewing a paged table and requests it to sorted by a particular column, what page is shown?
Is there a standard expected behavior for this scenario? I can imagine several possible outcomes, but want to know if there is a standard.
You mean which page to show among the n pages in the table? There are no good options –any possibility is likely to be disorienting and frustrating for the user precisely because there is no standard and no particularly good reason to chose one option over the other. If you were to test users, I doubt they’d have consistent expectations. Even the same user may expect different things at different times. Paged tables also provide relatively weak feedback on the current location in the table so it’s hard for users to understand where they are after sorting whatever option you use. Usable sorting is one reason paged tables are inferior to scrolling tables.
Of the possibilities:
If you have a way of showing a currently selected or focused item (row) in the table, then you can go to whatever page that item is on, under the assumption that the users chose to sort at that moment in order to see other items like the item they’re looking at. This is consistent with some implementations of scrolling tables. However, most web-app paged tables don’t support the selection of an item.
You can show the ith page that the users are on when they sorted (e.g., if they’re on the third page when they sorted, show the third page under the new sort order). This is consistent with some other implementations of scrolling tables. It also supports the case where the table is almost sorted correctly (e.g., on Send Date, when Received Date is need). Showing the ith page puts the users on about the “same page” they were before. This is however not the most common use case and users are likely to feel they’ve been thrown to an arbitrary page given the weak location feedback. This option will probably produce the greatest disorientation.
You can show the 1st page under the new sort order. Depending on your tasks, perhaps most of the time when a user sorts a table, the users are interested in the items with the highest or lowest value of the attribute they sorted on. By showing the first page, the probability of you being right can approach 50%. It’s the least disorienting because the user feels they’re back at a mental anchor point –the beginning. On the other hand, users may be frustrated if they feel they’re “starting over.” Overall, this is probably your best option.
Generally following a sort, users want to jump to items with a certain value on the attribute they sorted on. This is difficult with a paged table because paging is slow and the users don’t know what page number corresponds to what value. You could label the links for the pages with the range of values found on them, but that can consume a lot of real estate. At the very least, you should always provide a link to the first and last page of the table however many pages there are so users can get to the items with highest and lowest values in one click.
Alternatively, consider supporting filtering rather than sorting to accomplish the same purpose. Depending on your users’ task, that may work much better and be less confusing and effortful.
First of all, AMEN to the previous answer (and +1) Second, just for real life examples of what users are familiar with and may expect, Yahoo Mail does #3 (jump to page 1 after sort). So do many other web sites.
My personal recommendation - if feasible to implement - would be #1 above (allow jumping to the page containing the currently selected element). Make sure that element is STILL selected.
That is both somewhat intuitive, not very un-expected, and most useful in cases where the user cares what happens. Plus, the option #3 (jumping to first page) is only 1 click away for the user assuming your paging controls include "Go to page 1", whereas, as noted in previous answer, doing first page makes it hard and long for user who did want to stay with the current item.
I definitely support the "add filtering" idea as well if feasible - I find myself using Excel for >50% of the work with tables/lists originated from any app/website, due to its exceptional combination of filtering and sorting. Perhaps YUI has a decent filterable table element assuming your UI is HTML?
The answer of Michael Zuschlag is very good, but I think that the case #1 and #2 that he presents are really uncommon, and doing so can be more confusing than useful.
In my opinion, you should always show the 1st page under the new sort order. If the user has selected an item, usually he don't want to sort anything, because he already found what he was looking for.
If you want to give a sort order to a list, usually you want to see the real, complete order.
A classic scenario can be a torrent site:
I search for a torrent typing some keywords.
After the search I a have an unordered list, 50 items per page.
I go to second page.
Now, I think that is better sort the results starting from the item that has the highest number of seeders, and click to the header of the seeds column.
I expect to see the item with the the highest number of seeders after action 4, so after sorting you have to show me the first page. And I think this is true for about any sorting situation.