jQuery plugin for turning an HTML table into a table with with multi-column sorting capabilities (Documentation).
This plugin is currently maintained as a module in MediaWiki core.
Parent project: MediaWiki-User-Interface
jQuery plugin for turning an HTML table into a table with with multi-column sorting capabilities (Documentation).
This plugin is currently maintained as a module in MediaWiki core.
Parent project: MediaWiki-User-Interface
You may want to have a look at T349298.
Change 958497 had a related patch set uploaded (by Brouberol; author: Brouberol):
[operations/deployment-charts@master] [eventgate-analytics] Add kafka-jumbo1010 to config
In this line :
Change 619601 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.page.ready: Simpler tablesorter/makeCollapsible call
Change 619601 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/core@master] mediawiki.page.ready: Simpler tablesorter/makeCollapsible call
In T258421#6321118, @Aklapper wrote:There can be multiple categories/tags for every column and there could be many configurable and suggested filter-presets.
This. A sane frontend UI for that (plus not sure what's needed when it comes to backend storage).
There can be multiple categories/tags for every column and there could be many configurable and suggested filter-presets.
This. A sane frontend UI for that (plus not sure what's needed when it comes to backend storage).
In T258421#6321022, @Aklapper wrote:To me this sounds like you could add an additional column with that "category", and then you are able to sort the table rows by that column value.
To me this sounds like you could add an additional column with that "category", and then you are able to sort the table rows by that column value.
I don't think that anyone will soon define and create an on-the-fly filtering on arbitrary values system for tables...
Thanks @PrimeHunter - I've updated T253907 to include restoring sorttop/sortbottom too.
See T226697#6223462 for examples of affected tables.
Ignoring earlier comment, maybe a way to get this implemented would be for the edit toolbars or a piece of user Javascript to provide a "reverse sort button" which does the heavy lifting of actually reverse sorting the table in the wikitext on the particular column.
This would require redoing the sort value formatting. Currently all numeric is formatted with formatDigit and then assigned -Infinity if it is not a number, before being sorted. In order to keep natural sorting here would require applying natural sort on the remaining items that now share -Infinity. Bit hard to do as we just 'removed' that information in the previous step.
It would be nice to restore everything about the original table when the order is restored. rowspans and the position of sortbottom rows are currently not restored as mentioned in https://en.wikipedia.org/w/index.php?title=Help:Sorting&diff=962664726.
I wouldn't recommend making secondary sort the default; that is not expected behaviour.
It doesn't look like that's the intention of the original request either. I assume it was a sorting stability issue/bug back then (and with that, I guess this ticket can be closed).
Thanks @Johan - this will be going out with this week's train
Change 598877 merged by jenkins-bot:
[mediawiki/core@master] jquery.tablesorter: Return to initial sort order on third click
Please let me know when you know when this will be in production and I'll add it to Tech News.
That makes sense - the double indicators return when it's sorted in the initial order, and the title on hover (which already indicates whether clicking will sort ascending or descending) also indicates if returning to the initial sort order. Hopefully that makes it clear enough.
@Tchanders Wow, thanks a lot!
I had a look into this - there's a patch up to show how it could be done.