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

Strainu created this task.Jun 8 2016, 8:27 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 8 2016, 8:27 PM
TheDJ closed this task as Declined.Jan 13 2017, 6:06 PM
TheDJ added a subscriber: TheDJ.

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.

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptJan 13 2017, 6:06 PM
Liuxinyu970226 awarded a token.