Page MenuHomePhabricator

Implement client-side filtering of tables using javascript
Open, LowPublicFeature

Description

Author: scott

Description:
A nice addition to the software would be a way to filter the rows of a table based on an entered (or selected) expression. What I mean by this is that if you have a large table with one field of nominal values, you would be able to select one of the values. Only rows containing that value in the field would be shown. Then, you could sort the table seeing only the rows with this specific value in the field.

Examples of this in action can be seen at:
http://www.viala.hu/frdl/tablesort/tablesort.html (BROKEN)
http://leparlement.org/filterTable (BROKEN)
http://community.wikia.com/wiki/User_blog:Sammylau/Wikitable_Filterable:_The_Filter_for_Long_Tables

It should be easily implemented by end users, such as by adding another class to the table.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=40763

Details

Reference
bz10013

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:48 PM
bzimport set Reference to bz10013.
bzimport added a subscriber: Unknown Object (MLST).

Another example is that which appears on Special:Allmessages, which is horribly slow... good speed on large tables would help. :)

I've added a little script to the Countervandalism Networks' MegaTable at the Toolserver last week:

http://toolserver.org/~cvn/MegaTable

Perhaps something like that ?

It's just a proof-of-concept, but you get the idea (type in the searchbar and hit enter. The latter triggers the search but that could be triggered after keyup instead to make it live).

I could make it into a jQuery plugin.

eg.

<table class="mw-makefiltertable">
would be treated by the plugin into:

<div> <input type=text /> </div>
<table class="mw-makefiltertable mw-madefiltertable">

Krinkle

scott wrote:

Yes, Krinkle - that's just what I had in mind with the usage you suggested. Your code seems to be case sensitive, but other than that, it looks good!

Krinkle, this report is assigned to you. Do you plan to work on it?

The current priority is Normal. However, nobody seems to have this feature in their plans? Should it be Lowest instead?

Krinkle: I am resetting the assignee of this issue to default because there has been no progress in the last months. Feel free to take it again when you are actually planning to fix this. Thanks.

This comment was removed by OneOfMany07.

@OneOfMany07: Please avoid comments that do not help get a task closer to resolution. Thanks a lot!

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.

Hi, is there an update on this one? It would also be kinda nice to have this feature on Wikipedia. I just tried the mentioned "filterable" class and it appears that it is still not implemented (or not working) on e.g. de.wikipedia.org).
Would it be possible to get this onto the road map? It's kind of an important QoL feature for me.

@Agowa: In general, all updates can be found in the corresponding task. If you'd like to see something implemented, your best option is to contribute a patch.