Page 1 of 1

wiki table rows ordering issues

Posted: Tue Jan 11, 2022 9:17 pm
by dusoft
See: https://love2d.org/imgmirrur/tufxdJo.png

Ordering by version does not work as expected.

Re: wiki table rows ordering issues

Posted: Tue Jan 11, 2022 11:52 pm
by EngineerSmith
Well, it is working - just not as you may expect it. It's ordered by string value from biggest to smallest in that screen grab rather than ordered by release date

Re: wiki table rows ordering issues

Posted: Wed Jan 12, 2022 12:40 am
by pgimeno
Hm, it's doing lexicographical sort, but Semantic Wiki supports natural sort according to https://www.semantic-mediawiki.org/wiki/Help:Sorting so not sure what's happening here. Maybe natural sort is a server-side thing and not a JS thing, and it's the JS side that is not doing natsort.

Re: wiki table rows ordering issues

Posted: Wed Jan 12, 2022 3:25 am
by slime
That page says text is sorted alpha-numerically by default. Versions (such as "0.10.x") are probably treated as text since they aren't valid numbers.

That being said, the Libraries page on the wiki isn't really used these days. I think people tend to put them on the awesome-love2d github page instead.

Re: wiki table rows ordering issues

Posted: Wed Jan 12, 2022 4:15 pm
by dusoft
EngineerSmith wrote: Tue Jan 11, 2022 11:52 pm Well, it is working - just not as you may expect it. It's ordered by string value from biggest to smallest in that screen grab rather than ordered by release date
Check once again. I am ordering by version number. 0.7 should be followed by 0.10, not 0.11. Exactly, I am talking about natural sort and I understand that x character messes it up.

Re: wiki table rows ordering issues

Posted: Wed Jan 12, 2022 4:16 pm
by dusoft
slime wrote: Wed Jan 12, 2022 3:25 am That page says text is sorted alpha-numerically by default. Versions (such as "0.10.x") are probably treated as text since they aren't valid numbers.

That being said, the Libraries page on the wiki isn't really used these days. I think people tend to put them on the awesome-love2d github page instead.
Thanks for this insight. Maybe it's better to delete it and redirect to that page, then?