Page MenuHomePhabricator

Allow user to write their custom sorter functions
Closed, DeclinedPublic

Description

One of the tablesorter clones [1] allows for a very useful override of sorting rules by defining a function, as illustrated at [2] and documented at [3].

This seems really useful for all kinds of special cases, such as sorting with differ keys on descending order than on ascending orders and would perhaps make T47161 easier to implement (as the different parsers could be offered as functions that can be implemented independently)

[1] https://github.com/Mottie/tablesorter
[2] http://stackoverflow.com/questions/27850608/jquery-tablesorter-determining-sort-order-for-column/27865429#27865429
[3] https://mottie.github.io/tablesorter/docs/example-option-custom-sort.html

Event Timeline

TheDJ subscribed.

There are many things about tablesorter that could be improved

  • like decoupling data type from data format
  • more collation support
  • fixed floating headers

etc etc.

But adding arbitrary parsers from users without testcases isn't one of them. If you want a new parser, write it, and get the code merged.