Template talk:Sort grade
Appearance
Sorting improvements
[edit]@PrimeHunter: do you know if it is possible to use this template to make the following improvements to grade sorting? A) it would be great if sorting by ascending put the grades in increasing order (i.e. A- then A then A+) and vice versa for descending order; and B) it would be great if rows with the N/A template were treated as lower than F- rather than sorting above A+. Without these two changes, grade sorting is currently inconsistent with number sorting. See the Marvel comics page linked to from the template page for an example of these issues. - adamstom97 (talk) 22:32, 1 July 2025 (UTC)
- @Adamstom.97: I did originally consider to reverse the order. It's a simple change but I guessed that new films would often be added without using the template so I chose sort keys which start with the letter. This means the sorting will often be right and otherwise close to right when templates are missing. B/B-/B+ will be between all A's and C's and so on but may get wrong internal order. With this system it's not possible to get the logical direction of ascending/descending grades. {{n/a}} has an undocumented
sort
parameter which can place it below F-, e.g. with|sort=N
. List of films based on Marvel Comics publications#Critical and public response transcludes some of the N/A from other articles where they would have to be edited so it would be more work in this case. By the way, I like to see the best grades at top on the first click so I would prefer if the number grades could be reversed instead. I have considered some proposals for the sort feature including an option to set the first sort direction for a column but I never got around to making a Phabricator request. PrimeHunter (talk) 08:14, 2 July 2025 (UTC)- I have created phab:T398416: "Provide way to sort a table column in descending order on first click". PrimeHunter (talk) 09:56, 2 July 2025 (UTC)
- Thanks, and thanks for the N/a sort=N tip. - adamstom97 (talk) 10:14, 2 July 2025 (UTC)
- I have created phab:T398416: "Provide way to sort a table column in descending order on first click". PrimeHunter (talk) 09:56, 2 July 2025 (UTC)