Many products include sortable tables. Would be good to add this functionality to AUI Tables.
- Must survey products to see what existing implementations are using
- If we have a common option that people want to keep using, yay!
- Check weight of code required to enable sorting - may need to get FERM decision on whether this is too heavy for core load
Prep Update(Jaiden Ashmore):
- Talked to Scott Harwood about JIRA occurences of a sortable table and found that he has been implementing the RestFul table which is similar to what this issue entails but is slightly different. As the RestFul table is built using backbone.js it can implement the column alphabetically sorting via a collection-comparator Collection-Comparator
- Talked to Adam Ahmed and was informed that Stash does not have any client-side table sorting.
- Jason Berry says that Bamboo has implemented this functionality on the client side a few times but they have used a Jquery Plugin: TableSorter
- Geoff Crain has given me some good examples in regards to FishEye/Crucible, e.g. Browse Sortable which has also been implemented using the JQuery plugin talked about above. Here is a implementation of calling the JQuery tablesorter. There may also be some original implementations throughout the code. Geoff indicated one of the drawbacks of the jquery plugin is that it only allows client side sorting. A possible extension would be the ability to allow AJAX requests, which is seen in this link.
- Wesley Walser says that Confluence has used an open source fork of the JQuery table sorter , which has fixed some bugs in the original implementation.
- Add class to TABLE element "aui-table-sortable" to initialise sorting
- Add class to TH element to trigger sorting by that column "aui-table-sort-inc" and "aui-table-sort-dec" (for increasing and decreasing order). Sorting not supported without TH elements.
- Refer to https://extranet.atlassian.com/display/AUI/Tables+1.0 for visual design and interaction requirements
- Work with Design to add the sorting arrows to icon font (so they can be coloured with CSS)
- Ensure sorting icons have alternate text (add default text to /main/resources/auiplugin.properties) and/or ARIA attributes for accessibility