This page is within the scope of the Wikipedia Help Project, a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the Help Menu or Help Directory. Or ask for help on your talk page and a volunteer will visit you there.Wikipedia HelpWikipedia:Help ProjectTemplate:Wikipedia Help ProjectHelp
The rowspan number was wrong. I temporarily added {{static row numbers}} to see that. Also, I added dashes in the blank spots in the bottom 2 rows. Both changes were needed to fix the problem. See diff.
An easier solution is to eliminate the blank columns. And list those years above the table. It would also make the table narrower. --Timeshifter (talk) 06:53, 2 July 2024 (UTC)[reply]
Yeah, that's the alternative I had with removing the years and adding a note above the table about the skipped years. Btw, why does static row display blank without bgcolor? Qwerty284651 (talk) 12:56, 2 July 2024 (UTC)[reply]
Looking at List of National Women's Soccer League seasons, the table uses "sortbottom" such that if you sort on any column other than "season", the season which was wiped out by COVID goes to the bottom. But this means it's then impossible to re-sort the "season" column into the correct order, so I was wondering if the "sortbottom" could be dispensed with and instead a sortkey put on the block of text which spans all bar the first column in the 2020 row. If "ZZZZ" is used, it sorts at the bottom for the alphabetical columns but at the top for the numerical columns. If "999999" is used, it sorts at the bottom in the numerical columns but top in the alphabetical ones. Is there any value that would sort at the bottom in both types of column.......? ChrisTheDude (talk) 08:47, 10 January 2025 (UTC)[reply]
I did some edits. I removed class=sortbottom. It causes more problems that it solves.
Here is the sticky table version before I removed class=sortbottom:
By the way, why did you remove the sticky table formatting? It is greatly needed on a wide table like that since I made the left column sticky too. Very useful for cell phones. You could have just returned the class=sortbottom without removing the sticky table formatting. That way you can still run tests with class=sortbottom. --Timeshifter (talk) 18:44, 17 January 2025 (UTC)[reply]
@Rafael Ronen: I am not sure that is possible for the CDE row by itself. Unless you start it off at the top or bottom, and then use class=sorttop or class=sortbottom.
You can make both CDE and test2 rows use class=sortbottom since they start off as consecutive rows on the bottom.
By the way, your signature color and text size is not very accessible. It is very hard to read for me.
What do you want to use this for? Totally collapsed tables aren't allowed in articles except in the collapsed tables at the bottom of articles. --Timeshifter (talk) 04:38, 18 January 2025 (UTC)[reply]
Let's say I have a table with 5 columns. I want only one column to be sortable (others are unnecessary). To do that it seems the only way is to make table class sortable and then add class=unsortable to other 4 columns. I think it would be good to make it possible to make a column sortable with class=sortable independent of table class. It doesn't have to be 1 column, it could be 2 columns in 5 column table. Setenzatsu.2 (talk) 14:46, 31 March 2025 (UTC)[reply]
@Setenzatsu.2 and Timeshifter: Highly unfeasible. Sorting is not implemented through a template that might be easy to manage, but instead through the backend with highly vetted changes geared towards optimal performace. A class has to be added to the table regardless. Changing the default behavior of the table's "sortable" class from sortable to unsortable would not only be less implicit, but is not optimal since most if not all columns in the majority of the uses are sortable. In addition, the change is not backwards compatible and all the current uses would have to be modified by adding sortable classes to columns and removing the now obsolete unsortable classes. Jroberson108 (talk) 16:44, 5 April 2025 (UTC)[reply]
The table class makes all columns sortable with an optional column class to make specific columns unsortable. Wanting it so the table class does not make all columns sortable with an optional column class to make them sortable changes the current usage to something opposite. Jroberson108 (talk) 04:07, 7 April 2025 (UTC)[reply]
When a non-technical person asks a code-related request you shouldn't get too hang on the specific code name they used. Using a new and different class name makes it so there isn't a conflict. Gonnym (talk) 08:11, 7 April 2025 (UTC)[reply]
The problem is that the table class is what is used to add the ability to sort columns by moving rows, applying styling, add sorting to column headers, collapsing rowspans after sorting, etc. Regardless of the new column's class name, it is already sortable because of the table class, therefore redundant unless you change it so the columns are not sortable from the table class, which creates issues with the current usage. The second issue is that they optimize the code due to its sitewide usage and are highly unlikely to add extra or change it to reproduce something that is already possible with the current classes. But you are welcome to ask. Jroberson108 (talk) 14:57, 7 April 2025 (UTC)[reply]
Sounds like it would be a nightmare to code. Especially when the wikitext for a table has both class=sortable and class=sort. And that would happen often as different editors work on a table. --Timeshifter (talk) 15:47, 7 April 2025 (UTC)[reply]
Wiki syntax is not optimized. That should be a priority as is the code optimization. One shouldn't be more important than the other. If I have a table with 9 columns, and only 1 (or 2 or 3) makes sense to be sortable and I have to put 8 class=unsortable attributes - that's not optimized. I haven't expressed myself clearly in my proposition. As Gonnym said I didn't mean to replace usage, but to supplement it - that doesn't mean the change how class works is neccesary. Now we have table of sortable class and that is fine as it is. Another (sub)class could be implemented let's say "wikitable sortable-specific". It could be done that in the backend there is a translation layer to turn it into "wikitable sortable". "sortable-specific" would allow to point out specific columns to be sortable and other columns would be unsortable by default. It would be used when 50+% of columns is unsortable. Translation layer would just turn "sortable-specific" into "sortable" by adding attribute unsortable to non-specified columns and applying sortable to other columns, in the backend (and that's important). That should be less than 30 lines of code. Just a pseudoclass and translation layer. But it would optimize wiki syntax (from editors' perpective) and save some KBs.Setenzatsu.2 (talk) 21:27, 25 April 2025 (UTC)[reply]
The very small numbers don't seem to be a problem if I remove the asterisks, or remove the asterisks from the first 5 cells in a column. I added a row, so there are 6 data rows in this table. And I moved the asterisks to the 6th row:
Yeah, that's what I did. Somehow that bug puzzled folks for 3 years in the article I've linked above. I suggest we put the case into Numerical sorting problems subsection. AXONOV(talk)⚑18:44, 1 May 2025 (UTC)[reply]
I added: "Asterisks (*) in the first 5 cells break numerical sorting."