Jump to content

User:Zinnober9/sandbox3

From Wikipedia, the free encyclopedia

Behavior change for {{PresFoot}}

[edit]

Hello! Last week I found a template with awkward usage and after this discussion with fellow editor Jonesey95, about (primarily this presidential election results table set), I have a bot proposal for addressing this awkward template usage on the 3692 pages affected.

Currently {{PresFoot}} is doing two tasks— closing tables as expected, but also behaving as the last row, which is not the expected standard. The expected standard template trio is that of the general "xHead (takes table style parameters)", "xRow (takes content parameters)", "xFoot (Just a closer)". With PresFoot currently doing both, it makes end of table changes (new last rows) somewhat bothersome since you would need to change the existing PresFoot to PresRow, and then add a new PresFoot. This is probably why a fifth of the existing cases of PresHead forgo using PresFoot and are closed by a regular table closer bracket. Also, in the edge cases of a table only have a single row of content, the current usage would require you'd have {{PresHead}} followed by {{PresFoot}}, with no {{PresRow}} usage. The other issue with this current {{PresFoot}} setup is if an editor who wasn't familiar with this unexpected behavior were to use these and did PresHead, PresRows, and closed it with an empty PresFoot, they'd get a table of content with an extra "null" row for 2020 (1 vote/ea. for a 33% spread (Rep/Dep/Third). This is one example. A short overview of the usage cases can be seen in my sandbox example here.

A Request for Comment was posted May 15th on the template set's talk pages (crossposted notices on PresHead/PresRow linking to the discussion on PresFoot's talk) and no objections have been stated.

I do not expect any false positives coming with this proposal, since in my way of thinking, all pages affected will have PresHead, and be either closed by PresFoot, or (if absent any PresFoot) a table bracket. There are three pages (two articles 1, 2), and my Sandbox2) using PresFoot in the expected no taken parameters way and shouldn't need changing.


Key Actions Requested:

Before the two actions below,
For all articles transcluding {{PresFoot}}
  • IF {{PresFoot}} is present, change all existing cases of PresFoot(with parameters) to PresRow(with parameters). (2950 cases)
  • ADD {{PresFoot}} with no parameters to a new line after final {{PresRow}}. (same articles)

example of these changes

Additional Action Requested:

  • While doing these changes it makes sense to bring these tables' usage into compliance with WP:CHRONO (earliest to latest). All cases I've sampled of these PresTables were contrary to this standard. My hope is that this task can be combined with the above and still be a single edit per page. example of Chrono change

If easy to check behind, add this, otherwise if complicated, ignore.

  • It's in the realm of possibility that some articles that have a PresFoot are also followed by an unnecessary stray table closer, but I'm not expecting this with any frequency. I also suspect that checking for these in cases where it is a stray and not closing some other table would be a harder task with a fair chance of false positives, so I'm not requiring this extra check. If I am wrong and this is an easy thing to check for so there aren't stray table closers, great, please add. Otherwise a few stray table closers won't be harming anything.

Thanks for considering, Zinnober9 (talk) 08:55, 23 May 2025 (UTC)

Comments

[edit]

I think this looks like a good plan. I have rearranged some things so that they happen in chronological order, and I have removed the changes to articles that have closing table markup already (they are working fine and will not be affected by the template change). I suggest providing links to example edits in articles. – Jonesey95 (talk) 19:25, 28 May 2025 (UTC)

@Jonesey95 Great, thank you! I guess since those cases with the table closers are technically not broken, they would be less desired edits. They can stay and possibly be manually converted and correctly Chrono'd later. I adjusted the blue section a little. Will leave that optional since I suspect they'll skip that part, but figure it's worth asking about just in case there's any. Added an example edit for the PresFoot and PresRow changes, and added an example edit for the Chrono change. Any other examples needed? Zinnober9 (talk) 01:55, 29 May 2025 (UTC)
All of it looks good. – Jonesey95 (talk) 02:12, 29 May 2025 (UTC)