Template talk:Static row numbers/Archive 1

From WikiProjectMed
Jump to navigation Jump to search
Archive 1 Archive 2

Jts1882. See User:Timeshifter/Sandbox144. I do ctrl-f5 on Firefox whenever I want to see the latest changes on that page.

I just happened to be up for your latest css edits, and saw the hash disappear. Thanks.

I also noticed that the row number cell borders disappeared on the table with just class=mw-datatable. That is a class that sometimes gets used by itself.

Also the row number borders disappeared when there is no mediawiki table class. See the last tables on the sandbox page.

And some weirdness on the last tables. The number "1" showed up in the row number header. --Timeshifter (talk) 07:24, 29 April 2021 (UTC)

Thanks Jts1882. As you know, your last CSS edit put borders around the row number cells when using class=mw-datatable by itself without class=wikitable. --Timeshifter (talk) 08:46, 29 April 2021 (UTC)
Jts1882. It looks like your latest edit got rid of all problems in desktop view. Thanks again. Now only mobile view is a problem, and only when class=sortable is used.
I edited and updated my note here:
Phabricator T233340. Add sortability to sortable tables for readers of the mobile web site.
--Timeshifter (talk) 06:49, 30 April 2021 (UTC)
The sortable class can be used to create two blocks in desktop. Unfortunately, the mobile view ignores the sortable class functionally but it is still there to affect the css styling. I don't know how or where the mobile view prevents the functionality so have no clues about how to identify when in mobile view. It would be nice if templatestyles had some conditional loading to allow a different .css file for mobile.
An alternative method would be to identify tr elements with th content rather than td content. This can be done with JS, but not purely with css. A css :has() selector (as in JQuery) is being discussed but there is reluctance to introduce it for some reason.
So it looks like we need an update from Wikimedia (allowing sortable tables on mobiles) or from the CSS-gods (a :has() selector), unless there is some other way of detecting when in mobile view. —  Jts1882 | talk  07:27, 30 April 2021 (UTC)
Jts1882. I added a link pointing here from the Phabricator thread. --Timeshifter (talk) 09:43, 30 April 2021 (UTC)
Jts1882. Thanks! It looks like it is fixed! Whatever CSS magic you used seems to have removed the number out of the header cell. I updated my Phabricator note. I suggested they look at the CSS adjustments you made, and that it may help in fixing some of the problems involved in adding sortability to the mobile view. --Timeshifter (talk) 10:07, 1 May 2021 (UTC)
I asked at Wikipedia:Village pump (technical) and the .skin-minerva class was suggested as a flag for mobile view. If it's the only mobile skin then it will work. I don't think this solution has anything to do with Phabricator T233340, though, as that is about the mobile view using the sortable class. The problem here is the inconsistency with how wikipedia deals with tables, sometimes using thead (with sortable on desktop) and sometimes not (without sortable and with it on mobile).
There is still a problem for tables with multiple header rows. They will be fine in sortable tables in desktop, but only the first header row will be handled correctly in mobile. I added a class for a second row that seems to work. I'm wondering if the template should be paired with a closing template the way {{rank}} was. This would allow a parameter |header-rows=n and could set appropriate classes in a wrapper element. —  Jts1882 | talk  10:47, 1 May 2021 (UTC)
When the developers work on implementing sortable on mobile, I think this info may be useful to them. They will have to sort out the inconsistencies you mentioned. Plus I read that the connections between sortable and collapsing tables/elements are causing problems.
Currently, all the tables at User:Timeshifter/Sandbox144 are editable in the visual editor (VE). That is not possible with {{rank}}. So I would prefer whatever method you find that works with the Visual Editor. If multiple rows are a problem, and fixing it would prevent VE use on the table, then I suggest creating a second template just for multi-header-row tables. --Timeshifter (talk) 11:18, 1 May 2021 (UTC)
Fair enough. Standalone is simpler. I think the template should say it is designed to be used with the wikitable and sortable classes and results without these classes may be unpredictable. It will also need a warning about multiple header tables and the mobile view. A header row at the foot of the table might also need handling. —  Jts1882 | talk  11:35, 1 May 2021 (UTC)

(unindent). Here is an article with multi-row headers at both the top and bottom of the various tables:

I need to do some tests with that table in a new sandbox. I would love a template to add integrated row numbers to it. The {{rank}} row numbers are unwieldy because of the need to use nowrap. Also, the need for breaks in the header text to maintain an exact number of rows. I prefer using style=max-width over breaks <br> for header text width.

If I have to do without visual editing for multi-row headers, I don't mind. There would be none of the many row-alignment problems with {{rank}}. So a second template for that would be great. With or without visual editing. And with or without {{End}}. --Timeshifter (talk) 12:18, 1 May 2021 (UTC)

See: User:Timeshifter/Sandbox147.
I saw your note about adding class=static-row-headers to bottom headers.
So I guess we will not need another template for multi-row headers.
--Timeshifter (talk) 14:39, 1 May 2021 (UTC)
I forgot to check mobile view when I worked on sandbox 147. I see now that for multi-row headers it is necessary to add class=static-row-headers for every header line, top and bottom. --Timeshifter (talk) 14:46, 1 May 2021 (UTC)

I was bold and redirected the CSS talk page here

See redirect: Template talk:Static row numbers/styles.css

Hope no one minds. :) --Timeshifter (talk) 22:59, 2 May 2021 (UTC)

Option

Jts1882: How about adding this as an option to {{Aligned table}}? That'd be an easy way to deploy it widely ({{Aligned table}} is used in nearly 10,000 pages) — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 (talk) 22:31, 2 May 2021 (UTC)

Looking at the use of {{Aligned table}} it is mainly used within other templates, so nested in other HTML elements. 10,000 is a lot of pages where something unexpected could happen. While it could simply added as an option, e.g. |static-row-number-column=yes, is there a particular need? —  Jts1882 | talk  13:33, 3 May 2021 (UTC)
Ha! You're right--I thought it was an alternate wikitable template. I see now it's mostly used in sidebars.
Haviing said that... Would there be room for an alternate wikitable template using templatestyles to fix some of wikitable nuisances (or simply as a candidate replacement to the default format)? — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 (talk) 00:31, 4 May 2021 (UTC)

Merged ranks

Jts1882, do you think there's any way this templatestyle could identify merged cells across rows, and merge the rank accordingly. The motive is that in some pages, editors seem very competitive and are very attached to the rank column, and want to make sure ranks accurately reflect ties (e.g. List of oldest living people, Supercentenarians in the United States). — Guarapiranga  02:06, 29 July 2021 (UTC)

I don't think that is possible. The CSS only looks at position of elements in the DOM tree, not the content. This sort of thing needs to be handled my the Wikimedia software, which uses Javascript for the sorting and could add the rank column with more flexibility. —  Jts1882 | talk  08:22, 29 July 2021 (UTC)
How about removing the top border of static-row-header class index cells, or even adding a static-row-tie class without the top cell border that nonetheless adds to the row counter anyway? I tried that here, but failed miserably 😂Guarapiranga  07:39, 30 July 2021 (UTC)

static-row-numbers-norank

See diff.

Jts1882. Is this used like class="sorttop static-row-header" is used here?:

Date July 1 July 8 July 15 July 22 July 29
World 3,946,801 4,002,350 4,059,250 4,128,200 4,190,059
Days to double 172 178 182 187 192
Countries, territories 210 210 210 210 210
 Afghanistan 4,962 5,477 5,983 6,325 6615
 Albania 2,456 2,456 2,456 2,456 2457

I substituted in class="sorttop static-row-numbers-norank"

Date July 1 July 8 July 15 July 22 July 29
World 3,946,801 4,002,350 4,059,250 4,128,200 4,190,059
Days to double 172 178 182 187 192
Countries, territories 210 210 210 210 210
 Afghanistan 4,962 5,477 5,983 6,325 6615
 Albania 2,456 2,456 2,456 2,456 2457

I prefer the new class name since some rows that shouldn't have a row number are not header rows (as above). Some rows at the bottom of tables too. Rows that total data, and so on. Maybe we could remove class=static-row-header from the template CSS?

I could do a search for it, and substitute the new class name. See search:

56 results in article space. --Timeshifter (talk) 10:11, 3 September 2021 (UTC)

Yes it's used as a class on a row, just like static-row-header. I think static-row-header should be used for clarity (making it clear it refers to a header row). Iirc, it's also needed for the background colour on headers apart from the top row in some skins. —  Jts1882 | talk  10:25, 3 September 2021 (UTC)
Also note the difference on borders for the multiple header rows. —  Jts1882 | talk  10:37, 3 September 2021 (UTC)
Jts1882. Can you give me an example page with such a table? And what skin? In the above tables in Firefox in the new Vector skin (default setting) I see a white background on all the cells in the 2nd, 3rd, and 4th static rows in both tables. But those are all data cells, not header cells. --Timeshifter (talk) 14:27, 3 September 2021 (UTC)
The difference in the borders in the static rank column can be seen in the above examples (mobile view is also slightly different). I was referring to the background colour of the static rank column for header rows. I might be misremembering as so many things were tried. Or it might have been the different background colours for wikitable and datatable, which no longer matters. Regardless, I still think a class that explicitly refers to the header is useful for clarity. —  Jts1882 | talk  16:08, 3 September 2021 (UTC)
Jts1882. I see now the borders per cell in the top cells of the row numbers column. They disappear when sorting is done. It doesn't matter to me either way whether the blank individual cells have borders or not.
What exactly did you create static-row-numbers-norank for?
Non-header rows like the ones in the above tables?
--Timeshifter (talk) 16:23, 3 September 2021 (UTC)
It was a response to a request not to include some territories in the numbered rankings (e.g. Falklands and French Guyana in South American lists). I assumed you asked this question because you had seen the discussion at Talk:List of South American countries by population#Remove numbering for French Guiana and Falkland Islands. Whether this is desirable is another question, which can be discussed at the talk pages, but the option is now there. —  Jts1882 | talk  17:05, 3 September 2021 (UTC)
Jts1882. I had not seen that discussion. Thanks for creating the class. I am going to use it for most rows that don't need a row number. It is easier to remember for me. I will keep an eye out for problems with various skins, etc.. Some header rows need bottom alignment of the header text. In that case I will use {{Static row numbers header}} --Timeshifter (talk) 18:37, 3 September 2021 (UTC)
@Jts1882 Could you consider expanding the docs with these two examples and explaining how they work? Thanks for creating this. I've been using increasingly by the day! — DaxServer (talk to me) 09:34, 14 October 2021 (UTC)

Row hover highlighting

Jts1882. I was wondering if we could add row hover highlighting to styles.css:

class=mw-datatable is disappearing from skins. See:

Krinkle created Template:Import-blanktable. It adds hover and a white background.

But I can't figure out an easy way to incorporate that into this template:

It can be incorporated, but then it requires this at the top of tables:

{{Static row numbers}}{{Import-blanktable}}
{| class="wikitable sortable static-row-numbers tpl-blanktable"

or this:

{{Static row numbers}}{{Import-blanktable}}
{| class="wikitable sortable static-row-numbers" style="text-align:right;"

I want row hovering to work with just this:

{{Static row numbers}}
{| class="wikitable sortable static-row-numbers"

I don't want to add the white background to {{Static row numbers}}. Some people don't like it, and may not use {{Static row numbers}} because of it.

But I haven't seen anybody opposed to row hovering. It makes following rows across tables a lot easier. Especially on wide tables.

I can add the white background to {{Static row numbers table}}. I already tested it here:

It works fine, and the white background doesn't override colors set for rows or cells. It will replace class=mw-datatable in that template.

So if people want both row hovering and a white background they can use this:

{{Static row numbers}}
{| class="wikitable sortable static-row-numbers" style="text-align:right;"

Currently over a hundred tables use {{Static row numbers table}}. Up until recently they got row hovering and a white background due to mw-datatable. --Timeshifter (talk) 19:40, 12 August 2021 (UTC)

Wouldn't the simplest thing be to replace class=mw-datatable with another class, say class=srn-datatable, and add the following to {{Static_row_numbers/styles.css}}.
              .srn-datatable {
                   background: #fff;
               }
               .srn-datatable tr:hover {
                   background: #eaf3ff;
               }
Alternatively the hover css could be added for class static-row-numbers so hover works on all instances of the template. —  Jts1882 | talk  06:31, 13 August 2021 (UTC)
After thinking about it more, I don't remember hearing from anybody that actually disliked the white background after seeing it in use. Some people were just hesitant beforehand.
So I would like both the hover and the white background added for class static-row-numbers. That way hover and the white background works on all instances of the template. Without having to remember to add class=srn-datatable also.
I did some tests of Krinkle's template, {{Import-blanktable}}. It respects the background colors written for cells or for rows. I don't understand though why it respects the background colors set for rows, but class=mw-datatable does not.
So maybe adding the CSS directly to class static-row-numbers will work too. Versus adding it to a separate class srn-datatable --Timeshifter (talk) 14:04, 13 August 2021 (UTC)
How about testing it with a custom class srn-datatable and then making the more general change for class static-row-numbers if there is consensus?
On the respecting background colours set in rows it might depend on the order of the CSS on the page or the order the classes are added to the table (I can never remember which). It's also possible an !important was used (although I assume not for wikimedia software). —  Jts1882 | talk  14:48, 13 August 2021 (UTC)
Suggested code above added for class srn-datatable. I've tested a few examples by changing mw-datatable to srn-datatable in edit mode in some pages using {{static row numbers}}. I've also change Module:Country population as can be seen in List of South American countries by population. Can you check some more pages? —  Jts1882 | talk  15:04, 13 August 2021 (UTC)

(unindent). Jts1882. Thanks. I did some tests here:

class=srn-datatable works fine in all the sandbox152 tables. It does not override background colors whether set for a row or for individual cells.

But it does nothing when substituted for mw-datatable within {{Static row numbers table}}. Tables using that template show no changes. For example, in Bauxite. I reverted my test change when done.

It causes no hovering when placed before or after {{Static row numbers table}} in Bauxite. It messes up the table when placed after. It does nothing when placed before.

I did the same test after temporarily removing mw-datatable from {{Static row numbers table}}. Same results for the Bauxite tests.

I did ctrl-F5 before and after all these tests. I am using Firefox, new vector (default in preferences), and Windows 10 Pro in a desktop PC.

Can you run a temporary test to see if attaching hover and a white background to {{Static row numbers}} works in the tables in User:Timeshifter/Sandbox152? If it works for colored rows and cells without problems, then I think we have enough consensus to keep it in. You, Guarapiranga, and I like it. And it may be the only way it will work with {{Static row numbers table}}. See if it works in Bauxite.

And the Phabricator thread said we should use templatestyles for now instead of mw-datatable. --Timeshifter (talk) 17:54, 13 August 2021 (UTC)

It works for me in the User:Timeshifter/Sandbox152 tables, highlighting without overriding applied cell colours.
Changing class=mw-datatable to class=srn-datatable in {{Static row numbers table}} also works, tested with Bauxite. I tried all four skins and they all showed the highlighting.
Incidentally, you can add <templatestyles src="Template:Static row numbers/styles.css" /> to {{Static row numbers table}} so you don't need to use both templates as in Bauxite. —  Jts1882 | talk  09:04, 14 August 2021 (UTC)
Thanks Jts1882. I added <includeonly><templatestyles src="Template:Static row numbers/styles.css"/></includeonly> to {{Static row numbers table}}. I also changed to srn-datatable inside that template. See diff. I checked a few articles using it. And a few skins. Hover with white background is working in all.
I also tested that template in edit mode in all the tables here:
User:Timeshifter/Sandbox152
I substituted {{Static row numbers table}} for the existing wikitext in the top lines of all the tables.
Hover with white background worked in all. And it did not override cell or row colors.
What do you think of my idea of making hover with white background the default in {{Static row numbers}}?
Without having to use class=srn-datatable in the wikitext of tables not using {{Static row numbers table}}.
Since most tables have only one header row most people don't need, or want to use, or figure out, the additional templates:
And they won't have to figure out class=srn-datatable
The only thing they would have to do is add {{Static row numbers}} and class=static-row-numbers for most tables with one header row.
Maybe someday it will be incorporated into the Mediawiki software and the only thing necessary would be this:
class=static-row-numbers
And maybe the Mediawiki software could automatically do the work of all the additional templates too.
More discussion:
https://phabricator.wikimedia.org/T287997#7283236
--Timeshifter (talk) 17:14, 14 August 2021 (UTC)
I think the row highlighting on hover is a good feature for all tables, so I'd favour including that automatically, i.e. adding the CSS to class static-row-numbers. I'm undecided on the white background.
The white background with mw-datatable overrides the normal colour schemes of the skins. With it being deprecated, more tables will be following the skin defaults, unless {{Import-blanktable}} gets used as widely. I'm not even sure what the advantage of the white background was. —  Jts1882 | talk  06:43, 15 August 2021 (UTC)

(unindent). We could go with row highlighting on hover as default in Template:Static row numbers. And class=srn-white as an option. class=srn-datatable would no longer be needed.

I tried using background-color:white; and background:white; in Template:Static row numbers table tests. Neither worked. Overall background color remained gray.

Both worked when added directly into the table wikitext at User:Timeshifter/Sandbox152 during edit mode tests. And it did not override cell or row background colors.

So we could add class=srn-white to Template:Static row numbers table. I am fairly certain that would work since class=srn-datatable added a white background without problems.

I keep my monitor at a lower brightness to protect my eyes since I use my computers all the time. So this makes table backgrounds on or off Wikipedia slightly gray. I find the additional default gray background of class=wikitable to be annoying. Especially in country lists with blue country links on a gray background. --Timeshifter (talk) 13:44, 15 August 2021 (UTC)

I've added the hover CSS to class static-row-numbers and added code for white background under class srn-white-background (I think it better to have more specific names).
I'll leave it to you to decide whether to add srn-white-background to {{Static row numbers table}}.
If your concern is the contrast for when you have your monitor on low brightness, you can customise your common.css file (i.e. at User:Timeshifter/common.css). You could add the white background to all wikitables by putting it on class wikitable.—  Jts1882 | talk  14:49, 15 August 2021 (UTC)
Thanks again, Jts1882. I added srn-white-background to {{Static row numbers table}}.
I tested in edit mode at User:Timeshifter/Sandbox152.
The white background and hover showed up without overriding the cell and row background colors.
I looked at tables and graphs at the popular free site Our World in Data. They use hover and a white background. For example, look at the table tabs here:
https://ourworldindata.org/covid-deaths
--Timeshifter (talk) 21:37, 15 August 2021 (UTC)

Apparently <templatestyles src="Template:Static row numbers/styles.css"/> is no longer needed in this template. Someone removed it, and so I tested to see if hover and white background was still working. It is. --Timeshifter (talk) 17:23, 22 October 2021 (UTC)

Replace # symbol

Hey, per the guideline at MOS:NUMBERSIGN a "#" symbol should not be used in place words. Instead {{abbr|No.|Number}} or similar should be used. Pinging @Jts1882 for the small chance you aren't watching this talk page. Gonnym (talk) 18:27, 24 March 2022 (UTC)

@Gonnym: Using {{abbr|No.|Number}} would be a good solution. Unfortunately, the row numbers and headers are set using CSS, so there is no option for using a template with an explanation (at least one I can think of). The default is no heading. The # is added by using the class static-row-header-hash. The options (not mutually exclusive) seem to be:
  • Remove support for static-row-header-hash. With a class explicitly saying hash I don't think it a good idea to substitute an alternative as that would be confusing.
  • Add support for static-row-header-text to add for "No." or even make this default .
  • Do nothing until Wikimedia provide an alternative. A # is widely used for the header in tables, despite MOS.
Ultimately this template is a temporary measure until there is a Wikimedia solution for automatically numbering table rows. A Wikimedia solution could use JS and make it more flexible, use tooltips, and generally make it easier to use. What do you suggest? —  Jts1882 | talk  09:04, 25 March 2022 (UTC)
I have very little experience with CSS so not sure if this could work, but would it be possible to add <abbr title="Number">No.</abbr> to the content property? Regarding option two (static-row-header-text) that sounds good but I'm not completely sure how you envisioned it. Can you give an example? Gonnym (talk) 10:12, 25 March 2022 (UTC)
The following is a test table for class static-row-header-text. —  Jts1882 | talk  13:15, 25 March 2022 (UTC)
ColA ColB
a b
c d
That looks good! (just noticed it still doesn't use abbr which I guess isn't possible, but that is still better than #). --Gonnym (talk) 11:35, 27 March 2022 (UTC)
The content css only allows plain text. Any html such as abbr just gets displayed literally. I did try and experiment with a hidden element and hover but couldn't get it to work with prefix. This is something that could easily be done in javascript, which means an opt-in user script or a Wikimedia solution. The latter is what is needed. —  Jts1882 | talk  12:28, 27 March 2022 (UTC)

Only count data rows and not header rows mid-table

Can the CSS be modified to only count and number rows (tr) that are data rows (td) and not header rows (th) of type "col"? Some tables use column header mid-table like below:

{{Static row numbers}}
{| class="wikitable static-row-numbers static-row-header-text"
! ColA !! ColB
|-
| a || b
|-
! scope="col" colspan="2" | test
|-
| c || d
|}
ColA ColB
a b
test
c d

Gonnym (talk) 22:56, 18 May 2022 (UTC)

Like that?
ColA ColB
a b
test
c d
Guarapiranga  02:38, 19 May 2022 (UTC)
That can work too. Thanks! Gonnym (talk) 06:45, 19 May 2022 (UTC)
ColA ColB
a b
x y
c d
The class static-row-header also works on normal rows to prevent count and numbering. —  Jts1882 | talk  07:33, 19 May 2022 (UTC)

Was there a way to skip numbers?

I don't mean skip rows; I mean leap numbers.
Also: how does on v-align the number on the top again? Cheers. Guarapiranga  06:03, 7 June 2022 (UTC)

Now there is! Guarapiranga  00:15, 21 June 2022 (UTC)

Vertical-align changes

Guarapiranga. Please see:

I fail to see what that last diff by MZMcBride has anything to do with my edit, Timeshifter. S/he's talking about vertical alignment of the No. table header; my change was on the vert align of the actual numbers, so that editors could set it to be whatever fits the page they're editing. — Guarapiranga  09:11, 22 June 2022 (UTC)
Let's ask MZMcBride. MZMcBride added vertical-align: middle;
You Guarapiranga changed it to vertical-align: inherit;
In the same spot in the CSS. I think you are both changing the vertical alignment of the numbers in the row number column.
MZMcBride also changed the padding of the "No." table header. So MZMcBride changed 2 things.
So I am asking both of you which one of the vertical alignments is better, and why. Middle versus inherit.
Guarapiranga. Your edit summary was "let editors dictate vertical align, not force middle".
How would a table editor set the vertical alignment of the numbers in the row number column? Where would the inherit setting get its alignment from?
--Timeshifter (talk) 11:20, 22 June 2022 (UTC)
I assume it would be inherited from the table or row. I would like to see an example of where middle was necessary. I think we want the same vertical alignment for the row number as the other cells in the row, so why set it at all? —  Jts1882 | talk  11:52, 22 June 2022 (UTC)

Jts1882 Since the row number column does not exist in the wikitext I was wondering how an editor would set anything for it, or its header.

Here below is part of a table (from Demographics of Pakistan#Largest cities) with and without "No." as the header. style=vertical-align:bottom is in the header row in the table in the article.

{{Static row numbers}}
{|class="wikitable sortable static-row-numbers" style=text-align:right 
|+
|-class=static-row-header style=vertical-align:bottom
! width="100" |City Name
! width="100" |Province or Territory
! width="100" |2017 Population
! width="100" |1998 Population
! width="100" |Avg. Annual Growth Rate
|-
 | style="text-align:left;" |[[Karachi]]
 | style="text-align:left;" |{{Flag|Sindh}}
 |14,884,402
 |9,339,023
 |{{Increase}} 2.48%
|}
City Name Province or Territory 2017 Population 1998 Population Avg. Annual Growth Rate
Karachi  Sindh 14,884,402 9,339,023 Increase 2.48%

Add class=static-row-header-text to get "No." as the header:

City Name Province or Territory 2017 Population 1998 Population Avg. Annual Growth Rate
Karachi  Sindh 14,884,402 9,339,023 Increase 2.48%

I don't know how to sandbox a change back to vertical-align: inherit; (or not set it at all as you Jts1882 suggested) in the CSS. Maybe someone else can test this and point me to the test. To see how it effects the above table.

With and without style=vertical-align:bottom in the header row. To see if it inherits it.

As an aside, I was Googling for info, and found this interesting stuff:

--Timeshifter (talk) 17:38, 22 June 2022 (UTC)

Since the row number column does not exist in the wikitext I was wondering how an editor would set anything for it
By setting the CSS formatting on the row in the wikitext (neither html, CSS or wikitext accept column formatting anyway, btw, bc tables are basically structured as rows of cells). — Guarapiranga  21:01, 22 June 2022 (UTC)
Guarapiranga. Maybe you can test that theory in a template sandbox? By removing the vertical-align setting altogether as suggested by Jts1882. Then we can see if the Pakistan table header "No." takes on the setting from this row setting:
|-class=static-row-header style=vertical-align:bottom
--Timeshifter (talk) 22:48, 22 June 2022 (UTC)
Change Template:Static row numbers/sandbox/styles.css and use {{Static row numbers/sandbox}}. Edit: I see Guarapiranga just set those files up today. —  Jts1882 | talk  08:17, 23 June 2022 (UTC)

Sandbox version

Here is the table with the sandbox template.

{{Static row numbers/sandbox}}
{|class="wikitable sortable static-row-numbers static-row-header-text" style=text-align:right 
|+
|-class=static-row-header style=vertical-align:bottom
City Name Province or Territory 2017 Population 1998 Population Avg. Annual Growth Rate
Karachi  Sindh 14,884,402 9,339,023 Increase 2.48%

"No." is in the middle of vertical alignment. Sandbox CSS is currently not set with vertical-align at all. --Timeshifter (talk) 09:55, 23 June 2022 (UTC)

Careful with these tests as there are two versions of styles.css setting the CSS and they are not independent classes. I've add aa section so the sandbox version can be tested in isolation in editor mode. —  Jts1882 | talk  10:20, 23 June 2022 (UTC)
If you look at the sandbox version in editor mode both the header (with No.) and numbered rows are top aligned. However in the saved page the non-sandbox version sets the vertical align to middle. Not sure why as I thought the last loaded styles.css would set the CSS for all tables. —  Jts1882 | talk  10:25, 23 June 2022 (UTC)
I noticed editor preview and parsoid sometimes differ on how they process css. — Guarapiranga  00:46, 24 June 2022 (UTC)
If you add vertical-align: middle; to the sandbox version and test this section in edit mode, then the header is middled as expected, but the row numbers are still top aligned. I also noted that inherit gives an error/warning so is not an accepted value in the Wikimedia sanitised CSS. —  Jts1882 | talk  10:33, 23 June 2022 (UTC)

Jts1882. Typo was messing up vertical alignment of headers. See:

I assume it was a typo. Or was that a way to remove it temporarily? --Timeshifter (talk) 10:51, 23 June 2022 (UTC)

Jts1882. See diff of where you added the typo (?). To see more clearly what I am talking about.
Maybe we need a sandbox2, sandbox3, etc. for this stuff so that we can keep the tests intact. --Timeshifter (talk) 23:22, 23 June 2022 (UTC)
Nothing precludes that. — Guarapiranga  00:49, 24 June 2022 (UTC)

I'm having difficulty following this conversation, but I was focused on making the table headers at Wikipedia:Database reports/Unused templates/1 look consistent with my edit. --MZMcBride (talk) 18:19, 23 June 2022 (UTC)

Mobile issue with sortable

Sortable now works on the mobile site. When using the "sorttop" class with this template, the topmost numbered row losses its number after sorting on mobile (see discussion). Example table: [1]. Jroberson108 (talk) 02:54, 6 July 2022 (UTC)

Even without using "sorttop" and before sorting, the first row on mobile isn't numbered while the desktop version is, which may be more relevant to the underlying issue. Compare: desktop vs mobile. Jroberson108 (talk) 02:59, 6 July 2022 (UTC)

If I remember correctly, the mobile view was handled differently because HTML tables in mobile didn't use <thead> blocks for the header row and the header had to be treated as the first row of <tbody>. Now the sortable table on mobile uses a <thead> block, so there need to be some changes such as replacing .skin-minerva CSS with .skin-minerva:not(.sortable) and other changes to qualify :not(.skin-minerva) CSS. It would be much easier if all mobile tables used the <thead> block. —  Jts1882 | talk  11:09, 6 July 2022 (UTC)
I may have misremembered. Looking at the styles.css it's the .sortable class that introduced use of the <thead> block in desktop view. Mobile had to be treated differently because it ignored .sortable and never used <thead>. Now it might be possible to simplify and just handle .sortable. There may not be any reason to have seperate CSS for the mobile view now. —  Jts1882 | talk  11:52, 6 July 2022 (UTC)
Looks like your change to styles.css fixed the issue. Jroberson108 (talk) 12:10, 6 July 2022 (UTC)
Oops, I thought I was editing the sandbox, but it does seem to have worked so I'll leave it. There are a few other things to check but they are rarely used and/or cosmetic. —  Jts1882 | talk  12:14, 6 July 2022 (UTC)

The issue is not resolved, as I checked initial example on Android based smart phone today. --Arjunaraoc (talk) 09:22, 5 August 2022 (UTC)

@Arjunaraoc: The "World" row uses the "sorttop" class and is sorted above the rest without a row number on both desktop and mobile versions both before and after sort, so it appears to be working correctly. I am also using Android. Are you experiencing something different? Jroberson108 (talk) 12:35, 5 August 2022 (UTC)
@Jroberson108, Thanks for the clarification. I realized that Styles.css is outdated on Telugu Wikipedia resulting in the issue. I have updated it and it works fine there too. Arjunaraoc (talk) 23:28, 5 August 2022 (UTC)

Install guide

I've created a Template:Static_row_numbers page in a local wiki. But any table that I try to get the row numbers on ends up with the contents of the template and then the table. Pretty sure I've not got the template set up right but I can't seem to find a good list of steps needed to get this working. Anybody got a list of steps or guide to installing this template and then using it in pages on a locally installed MediaWiki 1.37.2? BiloxiGeek (talk) 15:13, 6 December 2022 (UTC)

The template uses templatestyles (see WP:TSTYLE) to apply CSS styling from {{Static_row_numbers/styles.css}}. So you need the css file and also to have templatestyles installed on the wiki (it might not be in the default installation; see Extension:TemplateStyles]). If you provide a link I can have a look. —  Jts1882 | talk  17:17, 6 December 2022 (UTC)
I do have the TemplateStyles extension already. I've copied the Template:Static_row_numbers/styles.css contents to a similarly named file in my wiki. It looks like I also copied that styles.css into Template:Static_row_numbers, but I'm not sure why. Now that I look I can't figure out which contents should be in the Template:Static_row_numbers page. BiloxiGeek (talk) 17:53, 6 December 2022 (UTC)
I can't give out a link to my MW install, it's behind a firewall that I can't adjust. BiloxiGeek (talk) 18:01, 6 December 2022 (UTC)
I think I got other problems as well. I noticed that wfLoadExtension( 'TemplateStyles' ); was commented in LocalSettings.php, so I uncommented that and now I can't get any wiki page to load. As soon as I comment that line all goes back to normal. BiloxiGeek (talk) 18:19, 6 December 2022 (UTC)
Fixed that problem (file ownership). When I save what I think should be in the template I get Script error: No such module "documentation".
Template:Static row numbers contains:
<includeonly><templatestyles src="Template:Static row numbers/styles.css" /></includeonly><noinclude> :::::{{Documentation}}</noinclude> :::::
Did I copy the wrong contents maybe? BiloxiGeek (talk) 18:26, 6 December 2022 (UTC)
That looks like the right content for Template:Static row numbers and should work if templatestyles is installed correctly and you have Template:Static_row_numbers/styles.css.
The script error suggests you haven't copied "Template:Static row numbers/doc". You could just remove the noinclude block with {{Documentation}} for testing. —  Jts1882 | talk  09:11, 7 December 2022 (UTC)
I've just checked that I got "Template:Static row numbers/doc", "Template:Static row numbers/styles.css" and "Template:Static row numbers/doc" all copied into my wiki. Still get this just above the table that I'm trying to use it in:
Page Template:Static row numbers/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "wikitext").
So I understand the error and I'm looking into changing the content model for the page but that special page is saying there's errors that I can't interpret. It says:
Missing selector list at line 1 character 1.
Invalid selector list at line 40 character 1.
Missing selector list at line 42 character 1.
Are those errors in the template or the page itself? BiloxiGeek (talk) 14:55, 9 December 2022 (UTC)
@BiloxiGeek: I remember having problem with the content model not being "Sanitized CSS". Go to the CSS file page and select "Page Information" from the left hand menus. There is a table with a "Page content model" row, which has an option to "change". Make sure the page has the "Current content model" as "sanitized-css". —  Jts1882 | talk  20:55, 9 December 2022 (UTC)
For some reason I couldn't change the model. So I gave it try on a separate MW install on a completely different system and still had issues. Enabled the TemplateData extension and it started working. I'm not 100% sure that was actually the fix though, had a few other changes going on around that time. On the system where I was really wanting this working I went through an upgrade to MW 1.39, reconfig, ensured at all the same extensions were enabled and I've got it working now. Thanks for the help. 128.160.42.110 (talk) 13:00, 10 December 2022 (UTC)

Docs page. Quotes are not needed unless there is a space in the value

Gonnym. Quotes are not needed unless there is a space in the value. Look it up. And it's simpler. See: KISS principle. And: MOS:SIMPLIFY.

Note the history on the docs page. I have done a lot of editing on it. And though I don't own the page, I would appreciate if you would not revert without discussion and consensus. This has been previously discussed on the table talk pages. Where we have discussed this template too. --Timeshifter (talk) 15:33, 3 May 2023 (UTC)

See current discussion at Help talk:Table. --Timeshifter (talk) 00:36, 4 May 2023 (UTC)

Thank you for creating!

Thank you so much for creating this, this fills a big hole in many pages. Greenman (talk) 18:42, 16 June 2021 (UTC)

What they said :) — Asdfjrjjj (talk) 04:33, 7 September 2023 (UTC)

See also brief annotation

@Timeshifter: You shouldn't overexplain the caveats with {{Sorting row}} in the "See also" section. Per MOS:SEEALSO, it should be a "brief annotation". Basically it should be similarly sized to the "short description" text. This is what you have:

  • {{Sorting row}} - Adds a sorting row. It can't be used with data-sort-type=number, or any form of data-sort-type=VALUE, or it breaks sorting. See Help:Sortable tables.

You wrote in your revert comment: "The remaining part is important to prevent problems that I don't want to fix. I see this problem regularly, and it baffles editors who don't understand why sorting is not working." Not sure what you might have to fix, but you fixing "Sorting row" has nothing to do with this template. If editors are "baffled", then it an issue with that template not being clear about its caveats. Move those details to the "Sorting row" template so more people can read it. Clicking links to get more info is a normal practice, which you have to do anyways to figure out how to use the template. "Adds a sorting row." is brief enough. Jroberson108 (talk) 09:39, 14 October 2023 (UTC)

People frequently want a sorting row when adding {{static row numbers}}. That was the purpose of {{Static row numbers arrows}} (I did not create that). Now that it is deprecated, people will naturally want to add {{sort row}}. And they will just add it without reading all the caveats. Because they will see it placed in another table, and will do the same.
So one sentence in "see also" is not overburdening anybody. But it may save some people a lot of grief. Myself included. --Timeshifter (talk) 10:01, 14 October 2023 (UTC)
@Timeshifter: I disagree completely. Overexplaining becuase of {{Static row numbers arrows}} isn't an argument, which that template is only used on a paltry 30 pages. It also doesn't solve "Because they will see it placed in another table, and will do the same.", which is irrelevant to this template. People aren't coming to this template to learn about the "Sorting row" template. Anyways, you have your reasons, as much as they make no sense to me and appear to go against MOS:NOTSEEALSO "brief annotation". I'm done cleaning up this template anyways, so other editors can try to keep it organized, clean, and simple. Jroberson108 (talk) 10:50, 14 October 2023 (UTC)
I have been removing {{Static row numbers arrows}} as I see it. Along with {{Sorting row}} when it is used with data-sort-type=VALUE. I don't want to see it incorrectly used further. This note helps a little. Every little bit helps. It's one sentence for crying out loud. {{Static row numbers arrows}} is listed on this template page with a note telling people not to use it, and why. Do you want that note removed too? Since I am doing the work removing those 2 problems from tables, I would appreciate you helping, not hurting that effort. --Timeshifter (talk) 14:04, 14 October 2023 (UTC)

The documentation subpage

User:Timeshifter, you reverted my edit to the documentation subpage saying that. I have reinstated part of the edit, which copyedited the first sentence so that it is a complete sentence. I do not believe that was what you were trying to revert, but please revert my further edit if you disagree. The next two sentences I still believe should not be included. It works in desktop and mobile views applies to almost every template; there is no reason to spell it out. I strongly object to A possible note to add above a sortable table: Row numbers are static. Other columns are sortable. This allows ranking of any column., because such a sentence should never be included in any article per WP:CLICKHERE. Sincerely, HouseBlastertalk 02:31, 13 December 2023 (UTC)

Thanks for clarifying the first sentence.
"'It works in desktop and mobile views' applies to almost every template;"
True, but tables and templates for tables have long been problematic. So it helps to know. It also helps template editors know what table templates are OK, and which ones need fixing. Sometimes the CSS, etc in the better templates can be used in the ones that need to be fixed. So it serves several purposes.
WP:CLICKHERE does not apply. It is not saying "click here".
There are various explanatory notes at the top of many tables.
--Timeshifter (talk) 03:11, 13 December 2023 (UTC)
I disagree about It works in desktop and mobile views. Less is more in documentation, and it is already implied. Information overload is a problem with most templates, and by including unnecessary detail in the lead, we are making it harder for newer contributors to figure out how to use this template.
WP:CLICKHERE is about more than text that says "click here"; that is just the shortcut. The guideline says that articles should be written in a manner that facilitates transmission in other forms such as print. It also says In determining what language is most suitable, it may be helpful to imagine writing the article for a print encyclopedia. In print, you cannot "sort" columns. Thus, it is inappropriate to include information about sorting columns in prose. The tables with notes that violate WP:CLICKHERE should be removed. HouseBlastertalk 03:25, 13 December 2023 (UTC)
Readers of printed pages are not confused about this. Notes above tables are common. --Timeshifter (talk) 04:09, 13 December 2023 (UTC)
I would be confused by such a note, and I believe that such notes should be removed per WP:CLICKHERE. Would you be open to me requesting a third opinion? HouseBlastertalk 14:23, 13 December 2023 (UTC)
Many list articles have a note like this:
"Location links are "Economy of LOCATION" links.
For example: List of countries by wealth per adult
And this is not confusing (as you claim):
"Row numbers are static. Other columns are sortable. This allows ranking of any column."
--Timeshifter (talk) 15:34, 13 December 2023 (UTC)
All of those instances which say Location links are "Economy of LOCATION" links. need to be removed per WP:CLICKHERE.
If you handed me a piece of paper that said "these columns are sortable", I would certainly be confused. HouseBlastertalk 15:54, 13 December 2023 (UTC)

There are exceptions to most guidelines. This is at the top of the page with WP:CLICKHERE:

--Timeshifter (talk) 16:16, 13 December 2023 (UTC)

Of course. Common sense wikilinks to a very helpful page, WP:IAR?. That page says "Ignore all rules" is not in itself a valid answer if someone asks you why you broke a rule.
I would also note that WP:NOTGUIDE (a policy) cautions that an article should not read like a "how-to" style owner's manual. HouseBlastertalk 16:36, 13 December 2023 (UTC)
Now you are grasping. A one-line note is not a manual. --Timeshifter (talk) 16:43, 13 December 2023 (UTC)
Respectfully, that is not how policies work. They apply to the everything in an article. For example, we can't have one unverifiable sentence in an otherwise well-cited article.
I do not believe we are going to convince one another, so I am going to wait for the third opinion. HouseBlastertalk 16:53, 13 December 2023 (UTC)
That is how guidelines work, or it wouldn't be written in {{MoS guideline}}. --Timeshifter (talk) 17:04, 13 December 2023 (UTC)

"It works in desktop and mobile views." doesn't need to be said and should be removed. Something only needs to be said if it doesn't work, assuming there isn't already an active discussion to fix the issue. Also, the template is live (not draft or sandbox), so it is both implied and expected to work except where stated. "A possible note to add above a sortable table: Row numbers are static. Other columns are sortable. This allows ranking of any column." can be removed since it is quickly apparent due to the lack of a sort button on the column header and apparent after sorting other columns, and I've never seen it above any tables. Jroberson108 (talk) 02:13, 16 December 2023 (UTC)

HouseBlaster. I remember when Template:Static row numbers was first being used, and some people were confused, and complained, and didn't realize that it is actually better. Because it doesn't just rank one column. But I guess nowadays people are used to it, and so it can be removed from the doc page. It was only a suggestion, not a requirement.

"It works in desktop and mobile views." That should remain. See my previous reply concerning this. Also, I often forget which table template is fully working and which is not. It is only one sentence. --Timeshifter (talk) 05:22, 16 December 2023 (UTC)

I have removed the sentence about how ranking is not sortable.
I still disagree about It works in desktop and mobile views. I find your argument that it is only one sentence to be strange. I believe you opposed the use of <br /> tags because <br> suffices, citing the KISS principle. An additional sentence adds much more complexity than two additional characters.
You can easily remember where a table template functions by assuming it works everywhere unless otherwise noted. HouseBlastertalk 06:33, 16 December 2023 (UTC)
Let's stay on topic and not bring up unrelated things like <br> per WP:TALK#TOPIC. "It is only one sentence" or your memory aren't valid reasons (legitimate concerns according to the other editors). Template developers are expected to test, and template doc pages should indicate any known issues or limitations so you and others don't have to remember or guess what isn't working. Since there are no valid reasons to keep it, I removed it per WP:DISCUSSCONSENSUS. (Up to this point, no new concerns are being added. No other editors see the existing ones as legitimate concerns and per WP:CON and WP:DISCUSSCONSENSUS, which doesn't require unanimity, I removed the text.) If some other editors give reasons to add it, then it can be discussed again. Jroberson108 (talk) 07:07, 16 December 2023 (UTC)

I have returned the sentence: "It works in desktop and mobile views." 2 out of 3 is not a consensus. Get others involved. My reasons are valid to me. To say they are not valid is insulting, condescending, and demeaning. Almost to the point of a personal attack. WP:NPA. What a template should be is not necessarily what happens. So some templates may be missing the cell phone functionality, and not mention it. HouseBlaster has the right to bring up somewhat related issue of <br /> tags and <br>. Jroberson108 is not in charge of Wikipedia talk pages, or doc pages, though he frequently tries to act like he is. We are talking about one sentence on a doc page that definitely helps some people. We are not talking about the choice between two <br> formats due to their length. And by the way, that was settled on its help page by consensus to allow all forms equally. Some developers were insisting on <br />. It was not about length to me. In the end it was about ease of use, and that no one way should be insisted on. Whatever was easiest for the individual user was what we agreed on in the talk pages. And I believe that is what we should do with document pages. They should work for everybody, or as many as possible. --Timeshifter (talk) 08:46, 16 December 2023 (UTC)

@Timeshifter: Don't presume my actions or thoughts, and don't assume bad faith. I can see how you might misunderstand my statement. In no way have I personalized the discussion. I have struck out my previous statement and added more precise language, also found on WP:CON, which is what I was trying to convey. If you think it premature to remove the text, or that you haven't been fully heard because you still have legitimate concerns, then I apologize. Feel free to continue. Jroberson108 (talk) 21:08, 16 December 2023 (UTC)

Column label unspanned look

@Timeshifter: In Template:Static_row_numbers/doc#Used_with_wikitable, you recently added an example of multiple header rows with a border in the column header. This isn't recommended and won't work when a column label is displayed (static-row-header-text). It should look like a rowspan. Jroberson108 (talk) 06:24, 7 January 2024 (UTC)

The only use case I can think of is for the example table in Template:Static_row_numbers#Disable_number_on_specific_rows where you may want a border on the sorttop and sortbottom rows. Jroberson108 (talk) 06:30, 7 January 2024 (UTC)

Jroberson108. Very few add a row number column label. And the border there (wikitable, non-sortable) doesn't break anything. It just looks different. I prefer not to overburden editors with additional stuff unless absolutely needed. And so I give them a choice. I can clarify that further. --Timeshifter (talk) 06:50, 7 January 2024 (UTC)
Editors will do what they want regardless of what you add. In my opinion, you are encouraging a bad practice similar to the following tables. When two header cells have the same values vertically or one of them is blank, you normally combine them.
Color Data
Color A B C
Red 1 2 3
Lime 4 5 6
Gold 7 8 9
Color Data
A B C
Red 1 2 3
Lime 4 5 6
Gold 7 8 9
Data
Color A B C
Red 1 2 3
Lime 4 5 6
Gold 7 8 9
Jroberson108 (talk) 06:58, 7 January 2024 (UTC)
I want to encourage editors to create more tables. So I show them the easiest way first, and then the optional details for perfectionists like me and you. You being slightly more perfectionist than me. ;)
So now they see both ways. Whereas before, they saw only one way. They actually now may be more, not less, likely to add the class to all header lines in non-sortable tables. Cause now they see why. Who knows. In the end it is up to them. But at least now they are more knowledgeable. --Timeshifter (talk) 07:12, 7 January 2024 (UTC)
@Timeshifter: If you can't agree, then revert it and we can ask others what they think.
If you want to simplify things, which I'm in favor of, then they should be instructed to add the static-row-header class to all row headers even if it isn't needed. That's what the class was designed for. This would remove a lot of instructions and examples making it easier to use. It would also make it effortless for editors to remove the sortable class from a table that uses this template as it instructs now (class not needed when sortable). Jroberson108 (talk) 07:31, 7 January 2024 (UTC)
Why do you go into these massive fights over adding the smallest bit of additional info? It is extremely annoying, and a huge waste of time.
It is rare that the sortable class is removed from a table.
On those rare occasions they will see an extra number at the top. They will come to Template:Static row numbers to figure out why. They will then see my explanation if it is there. But not if it is removed.
--Timeshifter (talk) 07:41, 7 January 2024 (UTC)
@Timeshifter: Stop personalizing discussions because it is reportable, can quickly become offensive (also reportable), and can push others away who want to help. See WP:TALK.
I still feel your changes are controversial, but not strongly, so it can stay. Normally, revert and reach consensus. Prose only might have been more ideal instead of adding yet another clunky wikitext and table block to a section meant to be a simple "common" usage example instead of every possibility. Jroberson108 (talk) 08:58, 7 January 2024 (UTC)

Keep or delete static-row-numbers-norank class

Keep
 – Keep class and document usage. Jroberson108 (talk) 16:13, 13 January 2024 (UTC)

Discussion split from #All subtemplates should be deprecated or auto-substituted. Jroberson108 (talk) 04:32, 2 January 2024 (UTC)

I have one addition, which is to document the static-row-numbers-norank class that {{Static row numbers no rank}} uses if it is to be kept or remove it from the styles. If the class isn't kept, then the substitutions would need to reflect that. Of course, this can be done after deletion. Jroberson108 (talk) 01:14, 2 January 2024 (UTC)

Jroberson108. Fortunately, {{Static row numbers no rank}} is not transcluded on any page. I am wondering why class=static-row-numbers-norank can't be incorporated into class=static-row-header? I am not a template editor, and I don't know how to do it. --Timeshifter (talk) 02:52, 2 January 2024 (UTC)
Although similar, they aren't exactly the same. According to the styles, they both disable the row number, but static-row-numbers-norank also increments the number by one. I'm not sure if it is really needed. Correction, my impression was based on the other talk discussions. They do look like they do the same thing, so static-row-numbers-norank could be removed. Jroberson108 (talk) 04:09, 2 January 2024 (UTC)
Jroberson108. See this diff for List of countries by population (United Nations). Go down to Iceland (172) on each side of the diff to see what I am talking about concerning the borders. class="static-row-numbers-norank" keeps the borders in the row number column. class=static-row-header does not. The numbering is the same for each. --Timeshifter (talk) 04:16, 2 January 2024 (UTC)
I'm not seeing any border issues in Chrome or Firefox. The two classes aren't styled exactly the same though. The static-row-header does have one extra selector that prevents a border setting, so that might be it. Jroberson108 (talk) 04:34, 2 January 2024 (UTC)
I am seeing the lack of borders on my Win 10 Pro PC in Firefox, Chrome, Edge, and Opera. I am talking about the revision that uses class=static-row-header. Go down to Iceland (172) and below where the class is used on several rows. The revision on the other side of the diff uses class="static-row-numbers-norank" and it has all the borders. --Timeshifter (talk) 04:42, 2 January 2024 (UTC)
I played around with the examples and I see it now. Basically, the static-row-header class makes it appear like the empty cells use rowspan, probably something more desirable in the table headers and footers (totals, etc.), which might be why it was named "header". The static-row-numbers-norank class would then be used in the table body. That's my assumption. Jroberson108 (talk) 04:51, 2 January 2024 (UTC)
Template_talk:Static_row_numbers/Archive_1#static-row-numbers-norank elaborates some on the class and has examples. Jroberson108 (talk) 05:36, 2 January 2024 (UTC)
I added the static-row-numbers-norank class to the documentation. Jroberson108 (talk) 06:22, 2 January 2024 (UTC)
The example table on the doc page is helpful for showing what the 2 classes do. I can now see where not having borders is useful. --Timeshifter (talk) 09:26, 2 January 2024 (UTC)

Delete unused styles

Delete
 – Remove unused classes from styles. Undocumented. Jroberson108 (talk) 16:18, 13 January 2024 (UTC)

These classes aren't used anywhere or mentioned on the documentation:

  • static-row-header-row
  • static-row-header-two
  • static-row-numbers-period2
  • static-row-numbers-skip
  • static-row-numbers2

Any objections to deleting them to cleanup and reduce the size? Jroberson108 (talk) 03:21, 11 October 2023 (UTC)

From what you can tell what do they do? Anything useful? Guarapiranga probably created them. Or Jts1882.
Template:Static row numbers/styles.css
Let's wait a few days and see what they say.
What does static-row-header-row do? I looked at the CSS and can't tell.
How can you tell where a class is being used? There are a few that are being used that I would like to know more about. For this template and others.
--Timeshifter (talk) 06:52, 11 October 2023 (UTC)
Changes have been made in sandbox (Template:Static row numbers/sandbox/styles.css). Testing showed no issues. Jroberson108 (talk) 22:16, 12 October 2023 (UTC)
Changes are live now. Jroberson108 (talk) 12:31, 13 October 2023 (UTC)

Keep or delete srn-white-background class

Delete
 – Remove documentation and styles that duplicate {{row hover highlight}}. Jroberson108 (talk) 16:19, 13 January 2024 (UTC)

Should the srn-white-background class be removed and its usage in articles replaced? It duplicates {{row hover highlight}} and isn't pertinent to adding and customizing static row numbers. It's strickly used as a visual preference. Also, {{row hover highlight}} offers more features and would be a better place to manage any related fixes. I'm in favor of removing it. Jroberson108 (talk) 22:17, 2 January 2024 (UTC)

I agree. It is in use mainly in {{Static row numbers table}}. Another reason to deprecate that disaster of a subtemplate. In the meantime we can remove class=srn-white-background from that subtemplate before we auto-substitute it. I think we should remove class=plainrowheaders from that subtemplate before autosubstitution also. I think that subtemplate got slapped around without a lot of thought in some cases. And plainrowheaders may not be what a lot of table editors want in some of those tables. That leaves it as this:
class="wikitable sortable static-row-numbers" border=1 style="text-align:right;"
I used to like border=1 since it is in HTML 5 and allows tables to be pasted in email. I no longer care. So it can be removed too.
--Timeshifter (talk) 00:45, 3 January 2024 (UTC)
Yeah, it would be better to remove it from the template before any substitutions, as well as any other unneeded classes or other attributes. Feel free to do that. Removing the class from the styles page while it is still used won't break anything. Luckily, it's hardly used: search. Besides that template, it's used on four articles, excluding other pages like user and talk. Jroberson108 (talk) 02:10, 3 January 2024 (UTC)
I removed the sandbox styles that duplicate {{row hover highlight}}. Those changes are visible at Template:Static_row_numbers/testcases. I'll wait a day or so before going live with the changes in case anyone has concerns. Jroberson108 (talk) 02:46, 3 January 2024 (UTC)
I removed the classes, etc. from {{Static row numbers table}}. So auto-substitution can be done now.
I removed class=srn-white-background from the 4 article pages, and from my sandboxes that were using it in tables. So I believe the class can be removed from the CSS for Template:Static row numbers. --Timeshifter (talk) 05:12, 3 January 2024 (UTC)
Since there were no objections, the changes are now live. Jroberson108 (talk) 11:54, 6 January 2024 (UTC)

All subtemplates should be deprecated or auto-substituted

Per Jroberson108 I think all the subtemplates should be deprecated. The classes they insert are actually easier to use and understand in my opinion. Especially if they are clearly explained in the doc. --Timeshifter (talk) 22:02, 31 December 2023 (UTC)

Can you reword what you wrote? It sounds like I said all that. Jroberson108 (talk) 22:08, 31 December 2023 (UTC)
I am going by what you said here: Template talk:Static row numbers table#Making this a subst-only template. "However, I do feel this and the other four sub-templates listed at {{Static row numbers}} are all redundant to the main template's features and should be deprecated since none add anything substantial. But, deprecating all sub-templates isn't something to discuss on this template."
--Timeshifter (talk) 22:21, 31 December 2023 (UTC)
I'm just saying the way it was worded, it sounded like I said all of it as opposed to just the first sentence, at least when I read it. A difference of quoted versus unquoted text? Anyways, you responded with what I said, so it should be good now. Jroberson108 (talk) 22:30, 31 December 2023 (UTC)
(edit conflict) I still think substitution would be a better outcome. We would not have to worry about editors forgetting to substitute the template if we can place {{always substitute|auto=yes}} on their /doc subpages (it makes AnomieBOT automatically substitute the template).
I would argue that as long as we document which classes the template adds (and which ones it does not add), we can keep it around as a typing shortcut for those who want to use it. Given the subtemplates are used as shortcuts on hundreds of pages for hundreds of tables, there is demand for this specific configuration of CSS. And while I personally agree that it is easier to manually add the exact classes the table needs, I don't want to stop people from using a typing shortcut they find easier to use. HouseBlastertalk 22:24, 31 December 2023 (UTC)
AnomieBOT is fast. It replaced some {{unsigned}} templates I recently used in less than 10 minutes. So I agree to keeping the subtemplates if the auto-substitution is implemented.
I think the bot can even do it retroactively on all uses of the subtemplates up to now. Not sure. If so, that solves all the breakage problems: past, present, and future.
See: User:AnomieBOT/TemplateSubster force
--Timeshifter (talk) 23:06, 31 December 2023 (UTC)
It absolutely can do previous transclusions as long as it goes on the "force" subpage (until it substitutes the existing transclusions, at which point it can be removed). HouseBlastertalk 23:18, 31 December 2023 (UTC)

Just to be clear, you both are suggesting to undeprecate the two sub-templates and keep all five of them active. Also, you want to use AnomieBOT to forcibly replace any transclusions with substitutions. And going forward, the editor experience when implementing {{Static row numbers table}} (transcluded on 123 articles) would be to not add the following code, which incorporates any additional classes and styles into the template's properties.

{{Static row numbers}}{{Table alignment}}
{| {{Static row numbers table|class=col1center col3center|style=}}

But instead add this code:

{{Static row numbers}}{{Table alignment}}
{| {{{subst:Static row numbers table|class=col1center col3center|style=}}

Or alternatively, add the following code and then, after waiting for the substitution to occur, edit the page a second time to add the {{Table alignment}} transclusion and its classes along with any additional classes and styles, which would be a bit odd having to edit twice, especially on a table with pre-existing classes and styles further complicating the process.

{{Static row numbers}}
{| {{{subst:Static row numbers table}}

Transcluding or substituting the table start wikitext seems like a bad idea since that is where many other templates' classes are frequently added in a mixed fashion along with any inline styles, especially for a pre-existing table with other features. In general, it seems like substitutions becomes increasingly complicated when used on highly customizable content and mixed with other transcluded and substituted templates along with other classes and custom styles, especially on pre-existing content you are trying to incorporate a substitution into.

Also, I still question the usefulness of most of these sub-templates and still feel they should be deprecated. If multiple editors find them useful, then that's fine.

{{Static row numbers no rank}} (transcluded on 2 articles) adds a single class. Frankly, I see this sub-template on the same level as someone buying pre-peeled, repackaged bananas; it's quite normal to add a single class yourself without the added overhead and complexity, especially if additional classes and styles are added through the template's properties or in a second edit after substitution. For me, this is on par with a sub-template that only adds the static-row-header class or more ridiculously the wikitable class.

{{Static row numbers arrows}} (transcluded on 29 articles) for the most part duplicates {{Sorting row}} and adds a single class to the row that can be easily added without a sub-template. The templates are so similar that I wonder why {{Sorting row}} wasn't transcluded in the other template, maybe even add class and style template properties to {{Sorting row}} for the row. Accessibility of this feature is still questionable per Help:Sortable tables.

{{Static row numbers header}} (transcluded on 97 articles) and {{Static row numbers total}} (transcluded on 24 articles) add a class and some niche styling that are easy to add without a sub-template, which other editors may or may not want those specific styles. As an example, the main doc has two examples with a total row that don't use the same styling, which anyone could easily duplicate and customize. Again, both sub-templates have a more complex process when adding additional classes and styles.

I'm sure it isn't possible, but it would be interesting to see analytics on which editors added transclusions to articles, which would give more weight to the sub-templates' usefulness for other editors not involved in this discussion.

Also, I'm having a hard time finding any substituted templates that are used specifically with article content as opposed to temporary article messages. There are plenty for other page types like user, talk, and categories where substitution makes more sense. Can someone provide some examples for article content specifically? Jroberson108 (talk) 15:15, 1 January 2024 (UTC)

I don't think there are (m)any templates that substitute article text, but this is for wikicode. Similar examples would be {{subst:anchor}}, everything in Category:Citation Style 1 translation templates, and everything in Category:Infobox importer templates. The idea behind substituting is that editors who don't want to bother with this templates do not have to think about them, ever. (And if you do use them, you should know how they work.)
I am not sure I understand your examples. People would either subst the template, which results in the exact same thing as if they entered the classes manually. Or they don't, a bot substitutes the template, and it is as if someone entered the classes manually. HouseBlastertalk 20:28, 1 January 2024 (UTC)
I'm aware substitutions can include wikitext/wikicode, HTML, or HTML attributes. I wasn't referring to article "text", but rather the broader contents of an article including wikitext, formatting, and styling, excluding temporary messages. Looking over WP:SUBST, I don't see any recommended for this type of use. There are a few similar being debated, where their templates say don't substitute, so the list appears dated. I don't see any real difference in substituting these sub-templates versus those debated ones. The infobox and especially the cite book translation examples you provided seem usefull.
This isn't clear to me: The idea behind substituting is that editors who don't want to bother with this templates do not have to think about them, ever since substituting any of these sub-templates in an article would add a class requiring the template's styles.
The examples are more of a question on what exactly the editor would add to the article's source when substituting and any complications they might experience since the table start wikitext frequently incorporates other classes and styles on both pre-existing and new tables. Jroberson108 (talk) 23:33, 1 January 2024 (UTC)
I have been playing around with these sub-templates for several hours now. They are a disaster. I keep finding more and more problems. See:
User:Timeshifter/Sandbox234
I now believe we should substitute them all temporarily until all instances have been replaced with wikitext.
Then we should deprecate them all, and hide their usage info in a {{collapsed}} box so that no further instances are likely to occur.
Then we should delete them all through Wikipedia:Categories for discussion WP:TfD. I see no use for any of the sub-templates where the benefits outweigh the problems. --Timeshifter (talk) 00:29, 2 January 2024 (UTC)
The proper venue for deleting these templates would be WP:TfD, and I think I can live with that. Do you want to do the honors or shall I? HouseBlastertalk 00:34, 2 January 2024 (UTC)
I agree: deprecate, replace (manually or through substitution), and delete (TfD). I have one addition, which is to document the static-row-numbers-norank class that {{Static row numbers no rank}} uses if it is to be kept or remove it from the styles. If the class isn't kept, then the substitutions would need to reflect that. Of course, this can be done after deletion. Jroberson108 (talk) 01:14, 2 January 2024 (UTC)
Discussion continues at #Keep or delete static-row-numbers-norank class. Jroberson108 (talk) 04:32, 2 January 2024 (UTC)
The order of operations here would be TfD first, for the same reason you don't empty a category before you take it to CfD. The wider community might wish to keep the templates. If the TfD is successful, the templates will be listed at the WP:HOLDINGCELL, where bots and technically minded humans will work together to implement the result of the discussion. In particular, there is a section in the holding cell for templates to be substituted and then deleted.
I have already listed {{Static row numbers arrows}} and {{static row numbers no rank}}. I am ambivalent at most towards the other three, so I will let one of you guys nominate those. Best, HouseBlastertalk 01:18, 2 January 2024 (UTC)

We don't need WP:TFD to add templates to User:AnomieBOT/TemplateSubster force. According to that page we just need to agree. There are 2 sub-templates with more than 100 transclusions:

Can we agree to substitute them now? --Timeshifter (talk) 02:39, 2 January 2024 (UTC)

If we planned on keeping the templates, sure. But if we want to substitute them before deleting, we need to go through TfD. We can't remove all transclusions and then request deletion because it is not being transcluded. HouseBlastertalk 04:41, 2 January 2024 (UTC)
There is no rule that we can't substitute before deleting. Why drag it out, and keep all the broken stuff until the TfD finishes? I have emptied categories on the Commons many times before deleting them. In fact it was easier to get the old categories deleted if I had already emptied them, and they served no purpose. --Timeshifter (talk) 09:23, 2 January 2024 (UTC)
It has always been my understanding that you TfD before you subst, but I can't see any formal documentation. I have dropped a note at WT:TFD for their input. HouseBlastertalk 14:49, 2 January 2024 (UTC)
My reply there plus further info: We had already agreed that further uses of these subtemplates would only occur via auto-substitution. So there was no gaming. And these subtemplates are breaking stuff in some cases when not substituted. So we could have auto-substituted before any TfDs. Houseblaster rushed to TfD without agreement. The other participant in the discussion wanted to auto-substitute first also. It also gives us time to change our minds on the subtemplates if we decide to keep any of them, but only after rewriting them. It would not be wise to rewrite them until the auto-substitution is done. This way we can do more tests before undeprecating any rewritten ones.
We are the ones deciding what to do with the subtemplates. We don't need further input until we firmly decide to delete any templates. We can deprecate them first.
I thought we were in agreement to deprecate them all?
--Timeshifter (talk) 00:33, 3 January 2024 (UTC)

Template:Static row numbers arrows

Regarding the deletion of {{static row numbers arrows}} being discussed at Wikipedia:Templates_for_discussion/Log/2024_January_2#Template:Static_row_numbers_arrows, I see there is a recommendation to merge and one to redirect. The sub-template has an extra class=static-row-header that should not be merged into {{sorting row}} (requires this template's styles). Redirecting will break any usage of the sub-template in that the class will be missing. I propose adjusting the sub-template by replacing all except the class with the transclusion of {{sorting row}}, then substituting the usage of {{static row numbers arrows}} before redirecting it. I'm hesitant to add yet another contradicting vote to that discussion, which might further confuse things. Jroberson108 (talk) 05:43, 3 January 2024 (UTC)

Jroberson108. The sorting row created by {{sorting row}} does not require the addition of class=static-row-header when used in a table using {{static row numbers}}. A simple redirect, {{sort row}}, is used in the sortable table below that is using {{static row numbers}}. So {{static row numbers arrows}} would be just another simple redirect to {{sorting row}}.
Color Data
A B C
Red 1 2 3
Lime 4 5 6
Gold 7 8 9
{{Static row numbers}}{{sort under}}
{| class="wikitable sortable static-row-numbers sort-under"
|- 
! rowspan=2 | Color
! colspan=3 | Data
|- 
! A !! B !! C
|- 
| Red || 1 || 2 || 3
|-
| Lime || 4 || 5 || 6
|-
| Gold || 7 || 8 || 9
|}
--Timeshifter (talk) 06:19, 3 January 2024 (UTC)
Ok, good to know. I guess you could remove the unneeded class from the sub-template then so it doesn't confuse others too. Or I could. Just need to make sure the new-line is kept. Jroberson108 (talk) 06:30, 3 January 2024 (UTC)
Jroberson108. I removed the class from {{Static row numbers arrows}}. Not sure if I did it right. Please have a look. --Timeshifter (talk) 06:35, 3 January 2024 (UTC)
Looks good. Jroberson108 (talk) 06:40, 3 January 2024 (UTC)

Final 2 subtemplates now at TfD

I installed WP:Twinkle.

Jroberson108, HouseBlaster, and others. See TfD notices on these pages:

--Timeshifter (talk) 07:01, 6 January 2024 (UTC)

@Timeshifter: There's some weirdness going on at Commonwealth_of_Independent_States#Life_expectancy using these templates.
Viewing the source code, the styles appear to be displayed correctly above the table. After the styles, this code is also displayed instead of the table:
class="wikitable sortable static-row-numbers " style="text-align:right;" class="static-row-header " style="text-align:center;vertical-align:bottom;" class="static-row-header " style="text-align:center;vertical-align:bottom;"
Not able to quickly identify the problem. Tried to fix it by adding <includeonly>, but no success. Might have to revert the changes. Jroberson108 (talk) 07:52, 6 January 2024 (UTC)
Fixed it by reverting both templates. Will try to take a closer look. Jroberson108 (talk) 08:00, 6 January 2024 (UTC)
Asked for help at Wikipedia_talk:Templates_for_discussion#Help_adding_TfD_to_templates. (Reverted talk section after fix.) Jroberson108 (talk) 08:22, 6 January 2024 (UTC)
Template:Static row numbers arrows also seems messed up in that it is showing more than it should on the doc when transcluded. Jroberson108 (talk) 08:40, 6 January 2024 (UTC)
Should be fixed now on all three templates. Added "noinclude" around TfD and "includeonly" around content. Jroberson108 (talk) 09:25, 6 January 2024 (UTC)
Thanks for all the work. Someday soon we will have gotten rid of these detestable subtemplates. :) --Timeshifter (talk) 11:13, 6 January 2024 (UTC)

Number header does not appear in non-sortable tables

Fixed
 – Adjusted styles. Jroberson108 (talk) 21:34, 13 January 2024 (UTC)

The template can work with non-sortable tables, but the "No." header does not appear:

{| class="wikitable static-row-numbers static-row-header-text"
! ColA !! ColB
|-
| a || b
|-
| c || d
|}
ColA ColB
a b
c d

Can this be changed so it does work? Gonnym (talk) 22:45, 18 May 2022 (UTC)

@Gonnym: This has been fixed, assuming there aren't any unforeseen issues that require reverting the fix. Jroberson108 (talk) 10:19, 10 October 2023 (UTC)

Option for row number to repeat if value is same in consecutive rows

Not doing
 – Static numbers, so creates erroneous ranks after sorting. Jroberson108 (talk) 21:50, 13 January 2024 (UTC)

Jts1882 and all. See Template talk:Row numbers#This template is deprecated still useful

"if you want the enumeration to pause for items that are ranked the same as the previous or succeeding item"

Would it be possible to add an option for that? For the column being sorted.

Or maybe another template altogether for that kind of sorting. Maybe just for the first column. It would be easier to use than Template:Row numbers since you wouldn't have to create a column with _row_count and _row_count_hold in it. See the table wikitext in any of the list articles here: Special:WhatLinksHere/Template:Row numbers.

Is this possible yet with just CSS? --Timeshifter (talk) 19:52, 5 December 2023 (UTC)

@Timeshifter: I don't think so as sorting relies on content. A row set to not increment would not shift with the content on sorting. It would always be the tenth row that doesn't increment regardless of the content of the row. —  Jts1882 | talk  08:59, 10 December 2023 (UTC)
"A row set to not increment would not shift with the content on sorting."
Are you saying it is a possible option upon initial loading of the page for the numbers to pause for items that are ranked the same as the previous or succeeding item?
That would be a good option in my mind.
Even though the numbers would be static after sorting.
Some people want that for some tables. Tables with Template:Row numbers. The numbers on those tables are pretty useless after secondary sorting too.
A note would have to be put above the table explaining that the row numbering is static, and is only of value for the first column's initial sort.
--Timeshifter (talk) 07:39, 11 December 2023 (UTC)
There is an option not to show numbers (and increment counter) on these classes: tr:not(.static-row-header):not(.static-row-numbers-norank). A class .static-row-numbers-pause) could set the content and not increment the counter. I don't think it a good idea, though, as after sorting it would give an erroneous rank, rather than an unhelpful one (which is still correct for the column it applies to). —  Jts1882 | talk 
So class=static-row-numbers-pause would have to be manually added to all duplicates? Same as for the other 2 classes. So Template:Row numbers is only slightly more work, but gets better results. Since the row numbers will sort too. --Timeshifter (talk) 01:04, 12 December 2023 (UTC)

Desktop issue with sticky table-headers gadget

Fixed
 – Adjusted styles. Jroberson108 (talk) 22:24, 13 January 2024 (UTC)

When the sticky table-headers gadget is enabled -

  1. if the first non-header row has a header cell on column 1, then that row is not numbered, such that the second non-header row is numbered 1 rather than 2,
  2. if first non-header row does not have a header cell on column 1, then that row is numbered, such that the second non-header row is numbered 2 (as is the case with the gadget disabled),
  3. example = Fourth voyage of Columbus#Tables, screenshots at imgur.

Possibly relevant specs –

  1. skin = Vector (2022),
  2. custom css (skin) = none,
  3. custom css (global) = none,
  4. non-default appearance gadgets enabled = (i) add [edit] link to lead section, (ii) change UTC times, (iii) dark mode toggle,
  5. non-default testing and development gadgets enabled = only sticky table headers,
  6. desktop = MacBook Pro (Retina, 13-inch, Early 2015) macOS Big Sur Version 11.6 (20G165),
  7. program = Safari Version 14.1.2 (16611.3.10.1.6), but bug also present (in the same manner described) in Chrome Version 116.0.5845.187 (Official Build) (x86_64).

But in case this isn't a bug / is a feature / is too cumbersome to change, I would just ignore it :) – Asdfjrjjj (talk) 03:30, 18 September 2023 (UTC)

I can reproduce the issue in Firefox under Windows with the monobook skin so it seems an conflict between this template and the gadget. With the gadget, the CSS content: counter(rowNumber); is not being set. I think the reason is that the gadget introduces a thead element for the header row. For some reason Wikimedia doesn't do this for all tables and the CSS for this template got quite convoluted because of this inconsistency. It might be possible to use class mw-sticky-header or mw-sticky-header-element. —  Jts1882 | talk  09:34, 18 September 2023 (UTC)
I don't think it matters if the first column has header cells or not. The use of the gadget changes the HTML table structure, adding the thead section, which sortable also does. So adding a line to handle tables where mw-sticky-header is a class seems to fix the issue (this edit in sandbox). —  Jts1882 | talk  10:16, 18 September 2023 (UTC)
@Asdfjrjjj:. I've made the edit to the template CSS styling, which I think fixed the issue. I have to ask, though, why are those tables in Fourth voyage of Columbus using automatic row numbering. It doesn't seem necessary. —  Jts1882 | talk  11:44, 18 September 2023 (UTC)
Whoa, all is well now, wicked cool ty :). I dunno re numbering, I just always use it, feel free to remove though I wouldn't mind! – Asdfjrjjj (talk) 11:52, 18 September 2023 (UTC)

Mobile issue on WP app

Not fixing
 – Nothing to fix. Jroberson108 (talk) 22:34, 13 January 2024 (UTC)

On mobile (iPhone), header row doesn’t display a number when viewed in a browser (just as when viewed on desktop), but it *does* display a number when viewed on the Wikipedia app. This seems like a bug, eg if table rows were referred to by their number elsewhere in the article…? — Asdfjrjjj (talk) 04:39, 7 September 2023 (UTC)

Jts1882. This is beyond my pay grade. :)
You still around? --Timeshifter (talk) 14:59, 7 September 2023 (UTC)
I'm not sure I can do anything. I don't have an iPhone so cannot duplicate the problem or test any solutions. I don't clearly remember the details, but the CCS had to be modified depending on skin and view, some of which differed depending on the classes used and the format of the HTML tables (whether <thead> used or not).
First we need some examples of pages where the issue shows up (perhaps it's not an iPhone issue). Then more details are required. What skin is being used? What happens when using he mobile page view in the iPhone browser? Does the HTML code for the table include <thead> or not in various cases? Even with that, I'm not sure I can help. —  Jts1882 | talk  15:24, 7 September 2023 (UTC)
Thanks, Jts1882. Let me try pinging Jroberson108. I think he worked on the ins and outs of sortable tables and/or row numbers? --Timeshifter (talk) 23:00, 8 September 2023 (UTC)
I've never worked on it nor do I have any Apple devices. I tested on Android and Windows 10 browsers (Firefox and Chrome on both). I would say it should not show numbers on the rows of column headers, which it appears to work correctly. I don't use the app., so after installing and looking at this template page, it appears correct for me. Again, this is an Android phone. It might be an issue only on the iPhone app.? Jroberson108 (talk) 23:31, 8 September 2023 (UTC)
Ooof afraid I don't follow most of this discussion, but let me answer what I can –
  1. skin = Vector (2022),
  2. custom css (skin) = none,
  3. custom css (global) = none,
  4. non-default appearance gadgets enabled = (i) add [edit] link to lead section, (ii) change UTC times, (iii) dark mode toggle,
  5. mobile = iPhone SE with iOS 15.5,
  6. WP app = 7.4.1 (2500)
  7. example = Fourth voyage of Columbus#Tables subsection Itinerary, screenshots at imgur,
I don't have an android so I can't see whether this is just an iPhone issue, but it might be? I wouldn't fret too much about it this template is still a godsend :) – Asdfjrjjj (talk) 02:49, 18 September 2023 (UTC)
@Asdfjrjjj: Have changes to the template styling (see next section) had an affect on this issue? Probably not, but it may shed light on a fix. Can you inspect the HTML code of the table (right click on first cell of table to get the inspector or Apple equivalent) and look for the following (for desktop, mobile and App):
1. What classes does the table have? The desktop view (Windows/Firefox) of Fourth_voyage_of_Columbus currently has:
<table class="wikitable static-row-numbers mw-collapsible mw-sticky-header mw-made-collapsible">
2. Is there a <thead> section? Example page has <thead class="mw-sticky-header-element">.
I'm guessing that the thead section is the issue. —  Jts1882 | talk  12:01, 18 September 2023 (UTC)
Hmm, I can't inspect html in the WP app, but I see the same classes for <'table'> [dunno code syntax] on desktop Safari, and there is a <thead> section within (before the </'table'>). Does that help? The issue doesn't appear on desktop Safari, nor on mobile Safari, rather only in the WP app, so maybe it's just an app issue? When I have the sticky table-headers gadget enabled, the issue is fixed on the WP app, but if the gadget's disabled, then the issue is still there, even after the css edit below. – Asdfjrjjj (talk) 13:38, 18 September 2023 (UTC)
Oh disregard my last sentence - gadget fixed nothing, dunno where I got that idea. Asdfjrjjj (talk) 13:44, 18 September 2023 (UTC)
A couple more questions:
1. Using the WP app, do any of the tables in Template:Static row numbers/testcases have problems (numbers on headers or unnumbered data rows)?
2. Do the examples using Wikitable have shaded backgrounds for headers?
These are shots in the dark. Without being able to inspect the code and CSS, it's just guesswork. —  Jts1882 | talk  14:19, 18 September 2023 (UTC)
WP app doesn’t natively open any non-mainspace pages (at least mine doesn’t)! or rather, it opens them but using the browser-in-app method, so those pages are laid out just like in the mobile Safari app, which doesn’t have the misnumbered header rows anyways. (Sorry for late response!) –Asdfjrjjj (talk) 07:00, 20 September 2023 (UTC)