[wp-hackers] GSoC Proposal: Sort By Column

scribu scribu at gmail.com
Sun Apr 4 02:41:43 UTC 2010


I've posted a more detailed proposal description on my site:

http://scribu.net/wordpress/gsoc-proposal-enhanced-admin-pages.html

I'm pasting the relevant sections below, for convenience:

Sorting by column

All list-type screens in WordPress are paginated. In other words, only a
small subset of all the items are loaded at a time. This throws JavaScript
sorting scripts like DataTable out the window. The sorting has to be done on
the server-side.

This is not a big problem, since WordPress already has support for sorting
most types of items.

In terms of UI, I *won’t* go with the regular clickable column headers
approach because it has a 3-click cycle:

   1. sorted-ascending
   2. sorted descending
   3. unsorted

Unlike with JavaScript sorting, each click would be expensive, since it
would require a new request to the server.

Instead, I plan on adding a dropdown to the Screen Options section, where
the user could select the column to sort by. There would also be two radio
buttons for the order: ASC / DESC. This way, the user can choose the sorting
*and* the order in one request.

Either that, or add *two* buttons on each column, one for ASC and one for
DESC sorting (hidden until the user hovers over that column).
AJAX Loading

After sorting is done, I can concentrate on speeding things up with AJAX.
Whenever a user wants to see a different page of items, they will be fetched
via an AJAX request and be inserted in place of the old items.

This should also work when: changing the sorting, changing the number of
items per page.

Feedback welcome.


-- 
http://scribu.net


More information about the wp-hackers mailing list