Template talk:Static row numbers
This is the talk page for discussing improvements to the Static row numbers template. |
|
Archives: 1, 2Auto-archiving period: 12 months |
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)
Number header does not appear in non-sortable tables
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)
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)
Mobile issue on WP app
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 –
- skin = Vector (2022),
- custom css (skin) = none,
- custom css (global) = none,
- non-default appearance gadgets enabled = (i) add [edit] link to lead section, (ii) change UTC times, (iii) dark mode toggle,
- mobile = iPhone SE with iOS 15.5,
- WP app = 7.4.1 (2500)
- 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">
.
- 1. What classes does the table have? The desktop view (Windows/Firefox) of Fourth_voyage_of_Columbus currently has:
- 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)
- A couple more questions:
- Oh disregard my last sentence - gadget fixed nothing, dunno where I got that idea. Asdfjrjjj (talk) 13:44, 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)
- @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):
- Ooof afraid I don't follow most of this discussion, but let me answer what I can –
- 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)
- 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'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
Desktop issue with sticky table-headers gadget
When the sticky table-headers gadget is enabled -
- 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,
- 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),
- example = Fourth voyage of Columbus#Tables, screenshots at imgur.
Possibly relevant specs –
- skin = Vector (2022),
- custom css (skin) = none,
- custom css (global) = none,
- non-default appearance gadgets enabled = (i) add [edit] link to lead section, (ii) change UTC times, (iii) dark mode toggle,
- non-default testing and development gadgets enabled = only sticky table headers,
- desktop = MacBook Pro (Retina, 13-inch, Early 2015) macOS Big Sur Version 11.6 (20G165),
- 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 athead
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 classmw-sticky-header
ormw-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, whichsortable
also does. So adding a line to handle tables wheremw-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)
Delete unused styles
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
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)
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 ofdata-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)
- I have been removing {{Static row numbers arrows}} as I see it. Along with {{Sorting row}} when it is used with
- @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
Option for row number to repeat if value is same in consecutive rows
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)
- There is an option not to show numbers (and increment counter) on these classes:
bnwiki
Hi, on bnwiki we use Bengali numerals. However this template doesn't produce Bengali numeral on bnwiki (example). Is there a way to fix this? আফতাবুজ্জামান (talk) 00:32, 10 December 2023 (UTC)
- @আফতাবুজ্জামান: The place to do this seems to be line 17 of Template:Static_row_numbers/styles.css, where you need to change the counter style. Instead of
content: counter(rowNumber);
- try
content: counter(rowNumber, bengali);
- However, this doesn't work here on English Wikipedia. I assume this is because the counter style is not set, as it works for changing to Roman numerals with
content: counter(rowNumber, upper-roman);
- So try it on the Bengali Wikipedia where the CSS might be set up differently.
- As far as I can work out the following code should set up the Bengali numbering:
@counter-style bengali { system: numeric; symbols: "\9E6" "\9E7" "\9E8" "\9E9" "\9EA" "\9EB" "\9EC" "\9ED" "\9EE" "\9EF"; /* ০ ১ ২ ৩ ৪ ৫ ৬ ৭ ৮ ৯ */ }
- However Wikipedia only allows a limited subset of CSS in templatestyles and doesn't allow changing rules like that. If it's not set up already on Bengali Wikipedia, then you will have ask technical support there. — Jts1882 | talk 08:53, 10 December 2023 (UTC)
- @Jts1882, You are right, both options doesn't work. I don't know where to set it up. Something like MediaWiki:Cite link label group-decimal? আফতাবুজ্জামান (talk) 22:46, 10 December 2023 (UTC)
- I can't really help further as I can't navigate the Bengali Wikipedia. I can't even find the Template:Static_row_numbers/styles.css file.
- For technical questions on the English wikipedia I would ask at Wikipedia:Village_pump_(technical). Is there a similar place on the Bengali wikipedia where you could ask for help on the setup of counter style? — Jts1882 | talk
- @Jts1882, We don't have anyone who can fix it, that's why i am asking here. Bengali Template:Static_row_numbers/styles.css file is here. Feel free to try (use bn:বাংলাদেশের বিশ্ববিদ্যালয়ের তালিকা to preview). One thing I don't understand is how
content: counter(rowNumber, lower-greek);
works in templatestyles even on bnwiki? Where is it set up in enwiki? --আফতাবুজ্জামান (talk) 19:57, 11 December 2023 (UTC)
- @Jts1882, We don't have anyone who can fix it, that's why i am asking here. Bengali Template:Static_row_numbers/styles.css file is here. Feel free to try (use bn:বাংলাদেশের বিশ্ববিদ্যালয়ের তালিকা to preview). One thing I don't understand is how
- @Jts1882, You are right, both options doesn't work. I don't know where to set it up. Something like MediaWiki:Cite link label group-decimal? আফতাবুজ্জামান (talk) 22:46, 10 December 2023 (UTC)
- If I view the following list here at the English Wikipedia with
ol { list-style-type: bengali; }
added to the CSS with my browser (adding it to your CSS or MediaWiki:Common.css should work the same) then I get Bengali numbering:
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
- Item 6
- Item 7
- Item 8
- Item 9
- Item 10
- My CSS knowledge is very limited and I don't know how to apply it to row numbers. PrimeHunter (talk) 23:26, 11 December 2023 (UTC)
- @PrimeHunter: I was also able to get the bengali numbering working with lists by adding
ol { list-style: bengali; }
to my common.css. Butcontent: counter(rowNumber, bengali);
doesn't work in the styles.css of this template. If I setcontent: counter(rowNumber, lower-roman);
, I get the roman numbering in the edit preview (e.g. the table at Bauxite). If I then use the browser Inspect and change lower-roman to bengali then I see the bengali numbering. I assume it's something to do with the Wikimedia setup not allowingbengali
as an option in the counter, possibly related to the santitised CSS rules. None of the language options for list-style-type are allowed, only decimal, upper/lower roman, upper/lower-alpa and a few others. Perhaps this is something a system administrator can change. — Jts1882 | talk 08:56, 12 December 2023 (UTC)- I added this to my bn:Special:MyPage/common.css):
- @PrimeHunter: I was also able to get the bengali numbering working with lists by adding
table.static-row-numbers.sortable tbody tr:not(.static-row-header):not(.static-row-numbers-norank)::before,
table.static-row-numbers.mw-sticky-header tbody tr:not(.static-row-header):not(.static-row-numbers-norank)::before,
table.static-row-numbers:not(.sortable) tbody tr:not(:first-child):not(.static-row-header):not(.static-row-numbers-norank)::before {
content: counter(rowNumber, bengali);
}
- and previewed bn:টেমপ্লেট:স্থিত সারির সংখ্যা/শৈলী.css without the line
content: counter(rowNumber);
. That seemed to work for me but it's hard to follow Bengali numbers. If it works for you then move the code from bn:Special:MyPage/common.css to bn:MediaWiki:Common.css. PrimeHunter (talk) 11:01, 12 December 2023 (UTC)
- and previewed bn:টেমপ্লেট:স্থিত সারির সংখ্যা/শৈলী.css without the line
- @আফতাবুজ্জামান: Did you get an opportunity to try this? — Jts1882 | talk 16:18, 13 December 2023 (UTC)
- @Jts1882:We have the same issue on fawiki. I tried all of the solutions to no avail! Yoosef (talk) 21:58, 12 January 2024 (UTC)
- @আফতাবুজ্জামান: Did you get an opportunity to try this? — Jts1882 | talk 16:18, 13 December 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 thatarticles should be written in a manner that facilitates transmission in other forms such as print
. It also saysIn 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)
- All of those instances which say
- 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)
- Readers of printed pages are not confused about this. Notes above tables are common. --Timeshifter (talk) 04:09, 13 December 2023 (UTC)
- I disagree about
There are exceptions to most guidelines. This is at the top of the page with WP:CLICKHERE:
This guideline is a part of the English Wikipedia's Manual of Style. It is a generally accepted standard that editors should attempt to follow, though occasional exceptions may apply. Any substantive edit to this page should reflect consensus. When in doubt, discuss first on the talk page. |
--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 thatan 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)
- 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)
- Now you are grasping. A one-line note is not a manual. --Timeshifter (talk) 16:43, 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'tvalid 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.) Ifsome othereditors give reasons to add it, then it can be discussed again. Jroberson108 (talk) 07:07, 16 December 2023 (UTC)
- Let's stay on topic and not bring up unrelated things like
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)
All subtemplates should be deprecated or auto-substituted
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
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 discussionWP: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)
- 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)
- 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)
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}}
{| class="wikitable sortable static-row-numbers"
|-
! rowspan=2 | Color
! colspan=3 | Data
|-
! A !! B !! C
|- {{sort row|4}}
| 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)
- 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)
- 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)
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)
Keep or delete static-row-numbers-norank class
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
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, butCorrection, my impression was based on the other talk discussions. They do look like they do the same thing, sostatic-row-numbers-norank
also increments the number by one. I'm not sure if it is really needed.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 userowspan
, probably something more desirable in the table headers and footers (totals, etc.), which might be why it was named "header". Thestatic-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)
- I played around with the examples and I see it now. Basically, the
- 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'm not seeing any border issues in Chrome or Firefox. The two classes aren't styled exactly the same though. The
- 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)
Keep or delete srn-white-background class
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
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)
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 thesortable
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)
- Jroberson108 (talk) 06:58, 7 January 2024 (UTC)