https://bugzilla.wikimedia.org/show_bug.cgi?id=67558

--- Comment #3 from Bartosz DziewoƄski <[email protected]> ---
(In reply to Dave Yost from comment #0)
> Instead you get a sort with B as the major comparison, and A is ordered
> randomly, because the sort algorithm used is unstable.
>
> Do not use unstable sort for user interfaces, ever. Your favorite algorithm
> might, /might/, be a tiny bit faster, but that feature is completely blotted
> out by the importance of usability.

This is probably not true. The sorting algorithm (which, by the way, is simply
Array.prototype.sort) is supposed to be stable (the code even has comments
about this), but it is stable in relation to the original table ordering and
not the "previous" table ordering.

(If you have tested this and it isn't stable, then that's a bug.)


> Click to sort ascending on column 1.
> -> table resorted ordered by column 1
> Click to sort ascending on column 2.
> -> table resorted ordered by column 2
> -> column 1 is no longer sorted

You're actually describing a feature, and a change in current behavior, that
you would like to see. (The original bug summary was incorrect, Andre fixed
it.)

I agree it would be useful in some cases, but sorting by the original order is
also useful in some cases (e.g. when one of the table's columns is the row's
ordinal number).


Do you think that replacing the current behavior with this one would be better
in the general case, especially if there's the workaround Michael described?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to