Feature #40588
openAbility to disable table sort
0%
Description
I find the table sorting introduced by #1718 annoying because most of the tables I use are not usefully sortable and the sort as implemented can be a nuisance.
I would like an option to turn off the JavaScript sorting globally, that is, restore the behavior prior to #1718.
Globally might mean "per project." I use Redmine hosted on Planio and I'm not sure how the clients there are technically separated.
The specific problems are immaterial if there's an option to turn off table sorting, but I'll show the problems as motivation.
For example, I use tables like this:
First group | Gizmos A |
---|---|
Second | Widgets B |
Third | Widgets A |
Gizmos B | |
Fourth | Gadgets |
Hovering table headers causes the sort arrow to appear briefly. That changes the dimensions of the cells and can cause a jarring blinking effect as the table columns resize.
It's hard to select part of the text in a table cell. If I click and drag over just the word "first" for example, when I let up the mouse button, it sorts instead of keeping my selection. I can work around this by moving the mouse outside the cell before letting up the button, but that's easily forgotten.
Once I've sorted the table one time, often by accident as above, no amount of clicking returns it to the original order. An example table on RedmineTextFormattingTextile suffers from this problem as well.
The example table from RedmineTextFormattingTextile also shows that apparently the same sorting choice can produce different orderings.
That might be related to improper handling of row and column spans. With the simpler example here, a rowspan can rearrange cells into the wrong columns and associate them with the wrong headers.
Original | Sorted |
---|---|
#1718#note-17 lists some other potential problems.
Wiki syntax to disable sort per table or per column would be an alternative. Such syntax might already exist since #1718 says I can "explicitly set the sort algorithm by adding one of the following classNames to the associated table header… sortable-keep (which keeps the row in it’s original order)." Forgive my ignorance, but I don't know how to add classNames in wiki syntax, RedmineTextFormattingTextile doesn't mention it.
For me, however, removing JavaScript sort or a global option to turn it off would be better that fine-grained wiki syntax.
Files
Related issues
Updated by Marius BĂLTEANU 8 months ago
- Related to Feature #1718: Table column sorting added
Updated by Marius BĂLTEANU 8 months ago
- Status changed from New to Needs feedback
I agree with you regarding this table sorting feature, most of the time is not working properly for my cases.
Go MAEDA, what do you thing if we add a feature flag for this?
Updated by Jens Krämer 13 days ago
- File 0001-adds-setting-to-disable-JS-based-table-sort-in-wiki-.patch 0001-adds-setting-to-disable-JS-based-table-sort-in-wiki-.patch added
the attached patch adds a setting to disable the table sorting
Updated by Marius BĂLTEANU 11 days ago
- Category set to UI
- Status changed from Needs feedback to Resolved
- Assignee set to Marius BĂLTEANU
- Target version set to 6.1.0
- Resolution set to Fixed
Patch committed, thanks Jens Krämer!
Reading also the notes from Mischa (#1718#note-17), what do you think about having this setting disabled for new installations?