Template talk:WPBannerDoc
Add topic| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
Question
[edit]Could this template automatically be transcluded on to the template page of project banners? Or perhaps with a parameter |auto-doc=yes? — Martin (MSGJ · talk) 22:56, 18 December 2020 (UTC)
- In theory, yes, but even if you consider the basic parameters
|category=|listas=(and formerly|small=), not all banners support all of them (even though they all should); and you would also have to check the existing doc to remove those if already present, to avoid double-documentation. This is why I've been doing them individually and manually. --Redrose64 🌹 (talk) 08:56, 19 December 2020 (UTC)- We can auto-detect if banners are using most of those parameters - the only exception seems to be listas but that's an easy upgrade to do. If we had a doc parameter, then it would default to the current behaviour, e.g.
|doc=none, but then that could be manually changed to|doc=autowhich would call this template. Worth a play around in the sandbox perhaps? — Martin (MSGJ · talk) 16:40, 19 December 2020 (UTC)
- We can auto-detect if banners are using most of those parameters - the only exception seems to be listas but that's an easy upgrade to do. If we had a doc parameter, then it would default to the current behaviour, e.g.
First draft coded on Template:WPBannerMeta/templatepage/sandbox and results can be seen on Template:WikiProject Doctor Who/sandbox. I now realise that for this to work properly, a few additional parameters will be passed to define the name of taskforce and note parameters, e.g. |TF_1_PARAMETER=Torchwood-task-force — Martin (MSGJ · talk) 16:37, 20 December 2020 (UTC)
|Torchwood-task-force=aside, why is|listas=omitted? Where has the example and the copy-and-paste boilerplates gone? --Redrose64 🌹 (talk) 17:24, 20 December 2020 (UTC)- Give me a chance! This is only the very first draft. As I explained above listas needs a slight change, which I will do shortly. Examples can also be generated automatically. The beauty is that when the template is changed, its documentation alters accordingly. — Martin (MSGJ · talk) 19:33, 20 December 2020 (UTC)
- Listas is now working. Boilerplate and example added. — Martin (MSGJ · talk) 11:47, 21 December 2020 (UTC)
I think the parameter name can be obtained using a text search on the template itself, which would be extremely useful. I have posted at Module talk:String/Archive 1#Read parameter for advice. — Martin (MSGJ · talk) 10:45, 21 December 2020 (UTC)
- Success! We can now automatically deduce the names of the parameters. Latest version at Template:WikiProject Doctor Who/sandbox ready for review ... — Martin (MSGJ · talk) 19:51, 21 December 2020 (UTC)
Listas example
[edit]I'm assuming that a specific example related to the WikiProject (e.g. Jack Harkness for Doctor Who) is not really needed? A generic name like John Doe should suffice. — Martin (MSGJ · talk) 13:23, 21 December 2020 (UTC)
Conversion
[edit]@Redrose64: just to let you know that I am finally getting round to converting this to work with Module:WikiProject banner. I have a way to go, but current code is on Module:WikiProject banner/templatepage/sandbox and an example can be seen at Template:WikiProject Medicine/sandbox. — Martin (MSGJ · talk) 16:59, 10 October 2023 (UTC)
- OK, but please take note, I cannot write Lua code. I will therefore be completely unable to make amendments, bugfixes, enhancements etc. --Redrose64 🌹 (talk) 21:47, 11 October 2023 (UTC)
- That's understood. But you could make suggestions for improvements, etc. — Martin (MSGJ · talk) 15:45, 1 November 2023 (UTC)
WP:PIQA note for Template:WPBannerDoc?
[edit]When updating a WP /doc to be WP:PIQA compliant, it would be nice & simple & intuitive to replace:
{{WPBannerDoc|class|PROJECT=Handball|ASSESSMENT_LINK=Wikipedia:WikiProject Handball/Assessment}}
which produces:
- class – This WikiProject follows Project-Independent Quality Assessment. Please add valid
|class=values to {{WikiProject banner shell}} instead of this WikiProject. Valid class values can be found at Wikipedia:Content assessment.
with a standard WP:PIQA note to refer to {{WikiProject banner shell}} for |class= matters,
perhaps:
{{WPBannerDoc|class|PROJECT=PIQA}}
which could produce something like:
- class – This WikiProject follows Project-Independent Quality Assessment. Please add valid
|class=values to {{WikiProject banner shell}} instead of this WikiProject. Valid class values can be found at Wikipedia:Content assessment.
It doesn't look like this text/functionality exist in {{WPBannerDoc}}. Can it be added?
(For ease of reference, Category:Custom class masks of WikiProject banners contains all WPs opting out of WP:PIQA.)
~ Tom.Reding (talk ⋅dgaf) 11:47, 17 June 2026 (UTC)
- Shouldn't that be discussed at Template talk:WPBannerDoc? I would favour using this module's automatic documentation and deprecating WPBannerDoc — Martin (MSGJ · talk) 12:24, 17 June 2026 (UTC)
- I thought about discussing it at Template talk:WPBannerDoc, but there are only 4 pageviews in the last 30 days there, vs. 149 here. I'll put a notification there for completeness. Also, I looked at the code quickly before posting and perhaps mistakenly thought there was an interaction with this module somewhere.
- I'm ultimately in favor of using automatic documentation, but not in favor of deprecating {{WPBannerDoc}}, because
- that will take more time per WP to make sure there are no WP-specific documentation exceptions before converting to
|DOC=auto, and - some WPs will undoubtedly have exceptions, like the 6 WPs in Category:Custom class masks of WikiProject banners that use {{WPBannerDoc}} (Ukraine, U.S. Roads, Highways, Lists, Video games, Fictional characters), and the 7 WPs in Category:Custom importance masks of WikiProject banners that use {{WPBannerDoc}} (Comics, College football, Animation, Astronomy, Amusement Parks, Rocketry, Wikipedia Help Project).
- that will take more time per WP to make sure there are no WP-specific documentation exceptions before converting to
- Creating a PIQA note goes a long way to fixing existing years-out-of-date documentation, without getting bogged down in the minutiae of an all-in-one solution. ~ Tom.Reding (talk ⋅dgaf) 13:09, 17 June 2026 (UTC)
- I wrote Template:WPBannerDoc more than fifteen years ago, at a time when the programme to convert WikiProject banners to use
{{WPBannerMeta}}was largely complete: out of more than a thousand, there were only about six or seven left to do, these fell into two main groups: (a) projects like Milhist, Ships and U.S. Roads that didn't want to be converted; and (b) some others like Maths Rating that were very complicated. Those that had been converted behaved in a reasonably consistent manner, even though we allowed some local customisation like the quality scale. But the documentation for the individual banners was still highly inconsistent. - I set myself a long-term task: bring in some form of order to the documentation. I maintained an off-wiki checklist, one row per WikiProject banner, showing things like:
- documentation status - none at all; doc page exists but has no meaningful content; doc page has content
- parameters - none listed; some listed; all listed
- param descriptions - none; partial; complete
- Early on, I decided that it would be tedious to retype the parameter descriptions every time, so I put together an off-wiki list of phrases that I used often, which I would copy and paste (example - it survived until today). But I soon realised that several parameters were common to many WikiProject banners, and copypasting all these would be inefficient. So I decided that it would be easiest to put these phrases into a documentation template - that is, Template:WPBannerDoc - which if coded appropriately, I could simply pass in the same parameters as were being passed to WPBannerMeta, and the documentation would generate itself. The thing about WPBannerMeta at that time was that it was entirely Wikicode, no Lua (perhaps this was before we had Lua at all). So it was easy for me to trace the markup through so that I could work out what happened when a banner used WPBannerMeta in an unusual way. There were (at the time) what I thought of as the "basic five":
|category=|class=|importance=|listas=|small=so all these went into WPBannerDoc eary on. More features were subsequently added, plus the subtemplates like{{WPBannerDoc/tf}}for task forces and child WikiProjects. - However, I cannot trace Lua markup through, so I have added few new features to the WPBannerDoc suite since about 2020. --Redrose64 🌹 (talk) 20:10, 17 June 2026 (UTC)
- I like that background.
- Luckily, I was able to implement
{{WPBannerDoc/sandbox|class|PROJECT=PIQA}}{{WPBannerDoc/sandbox|class|PIQA=yes}}per discussion below in the sandbox without resorting to Lua. The template code isn't yet sufficiently complex to require it (unlike some other former templates). The output is:
- I wrote Template:WPBannerDoc more than fifteen years ago, at a time when the programme to convert WikiProject banners to use
- class – This WikiProject follows Project-Independent Quality Assessment. Please add valid
|class=values to {{WikiProject banner shell}} instead of this WikiProject. Valid class values can be found at Wikipedia:Content assessment.
- I'll leave it in the sandbox for a little while for any tweaks/copy editing. ~ Tom.Reding (talk ⋅dgaf) 22:14, 17 June 2026 (UTC)
- I would not have overloaded the
|PROJECT=parameter, which has a defined use: Template:WikiProject Olympics passes|PROJECT=Olympicsinto WPBannerMeta, and so Template:WikiProject Olympics/doc also passes|PROJECT=Olympicsinto WPBannerDoc. How do banners normally specify that PIQA is used? --Redrose64 🌹 (talk) 06:50, 18 June 2026 (UTC)- I have just uypdated the auto doc to display "this parameter should be used with the banner shell template, not on individual project banners. See WP:PIQA for more details." You could use something like that — Martin (MSGJ · talk) 09:21, 18 June 2026 (UTC)
- I chose
|PROJECT=PIQAfor a few reasons:- it's intuitive, since PROJECT is the first word of PIQA (Project-Independent Quality Assessment)
- whatever mechanism triggers the PIQA text will need to supersede the
|class|PROJECT=Olympicstext - any uses of
|PROJECT=PIQAwill, by definition, not require a live WP (|class|PROJECT=Olympicsand|class|PROJECT=PIQAare mutually exclusive) - using a separate parameter like
|PIQA=yeswould imply that|class|PROJECT=Olympics|PIQA=yesis valid, when it is in fact redundant - there are already a lot of decision branches, so I didn't want to start a new branch, but add a caveat to an existing one
- The only problem I could see is if there is a meta-WPBannerDoc template, which sends
|PROJECT=Olympicsto then be evaluated by several different {{WPBannerDoc}} calls. Though looking through the transclusions, it doesn't look like such a template exists. Instead, {{WPBannerDoc}} appears to be exclusively called on a parameter-by-parameter basis.|PIQA=yeswould give {{WPBannerDoc}} more future flexibility, though. It would also make {{WPBannerDoc}}'s own documentation less complicated, so maybe that's a better choice. What would you suggest? ~ Tom.Reding (talk ⋅dgaf) 11:28, 18 June 2026 (UTC)- The thing is, if a doc page has several WPBannerDoc calls like this: we have the
{{WPBannerDoc|class|PROJECT=Olympics|ASSESSMENT_LINK=Wikipedia:WikiProject Olympics/Assessment}} {{WPBannerDoc|importance|PROJECT=Olympics|ASSESSMENT_LINK=Wikipedia:WikiProject Olympics/Assessment}} {{WPBannerDoc|listas|last=Coubertin|first=Pierre de}} ... {{WPBannerDoc|auto|PROJECT=Olympics}}
|PROJECT=Olympicsparam being used consistently. Imagine that one of these uses|PROJECT=PIQA; also imagine that somebody who is setting up a new WikiProject banner doc page decides to look at Olympics for inspiration. They may wonder why one of the|PROJECT=differs from the others. What is the one feature that determines whether a WikiProject banner is PIQA or non-PIQA? --Redrose64 🌹 (talk) 19:28, 18 June 2026 (UTC)- Good point... Sandbox updated to use
|PIQA=yesinstead. ~ Tom.Reding (talk ⋅dgaf) 00:27, 19 June 2026 (UTC)- I would make that the default as 99% of projects follow PIQA. You could use
|PIQA=nofor those which have opted out? Or to match the parameter in the template,|QUALITY_CRITERIA=custom— Martin (MSGJ · talk) 08:50, 19 June 2026 (UTC)- Defaulting to PIQA makes sense and would make updating much simpler. I prefer
|PIQA=noover|QUALITY_CRITERIA=custom. ~ Tom.Reding (talk ⋅dgaf) 11:32, 19 June 2026 (UTC)- What is the one feature that determines whether a WikiProject banner is PIQA or non-PIQA? --Redrose64 🌹 (talk) 18:10, 19 June 2026 (UTC)
|class=~ Tom.Reding (talk ⋅dgaf) 10:48, 20 June 2026 (UTC)- Presumably you mean that the banner has this code: That tells me that the WikiProject banner accepts a
|class={{{class|}}}
|class=parameter. It doesn't tell me that the class is inherited from the banner shell. --Redrose64 🌹 (talk) 11:33, 20 June 2026 (UTC)
- Presumably you mean that the banner has this code:
- |QUALITY_CRITERIA=custom — Martin (MSGJ · talk) 16:37, 20 June 2026 (UTC)
- What is the one feature that determines whether a WikiProject banner is PIQA or non-PIQA? --Redrose64 🌹 (talk) 18:10, 19 June 2026 (UTC)
- Defaulting to PIQA makes sense and would make updating much simpler. I prefer
- I would make that the default as 99% of projects follow PIQA. You could use
- Good point... Sandbox updated to use
- The thing is, if a doc page has several WPBannerDoc calls like this:
- I would not have overloaded the
- I'll leave it in the sandbox for a little while for any tweaks/copy editing. ~ Tom.Reding (talk ⋅dgaf) 22:14, 17 June 2026 (UTC)
Outdenting to note that most banners have |class={{{class|}}} but do not actually accept the class parameter. It is defining that parameter which tells the banner to populate assessment categories. For PIQA projects it works equally well defined blank, i.e. |class=, but removing it will stop all quality assessments for the project. — Martin (MSGJ · talk) 13:41, 22 June 2026 (UTC)
- Where are at on this? The PIQA note will show by default if
|QUALITY_CRITERIA=is blank or absent, and only show non-PIQA text when|QUALITY_CRITERIA=custom(or any text)? ~ Tom.Reding (talk ⋅dgaf) 17:14, 28 June 2026 (UTC)- Sandbox updated. ~ Tom.Reding (talk ⋅dgaf) 12:45, 1 July 2026 (UTC)
Live ~ Tom.Reding (talk ⋅dgaf) 12:23, 12 July 2026 (UTC)
- Where are at on this? The PIQA note will show by default if
WPBannerDoc - listas
[edit]Listas has not been recognised for a while now - could it be removed from BannerDoc, unless you just want to put a note advising people not to use it on banner templates? — Martin (MSGJ · talk) 10:35, 14 July 2026 (UTC)
- That's exactly why I was placing it, to advise people to use
|listas=on WPBS and not the individual banner. I only replaced existing|listas=text with the WPBannerDoc version, and only when there was a generic name example (e.g. not at TM:WikiProject Novels#General parameters). I think it's still useful for this reason. ~ Tom.Reding (talk ⋅dgaf) 10:58, 14 July 2026 (UTC)- If the article is using {{WikiProject banner shell}} then it is preferable to add listas to that template instead - this wording is too weak, because banner shell is the only place where it can be used now — Martin (MSGJ · talk) 11:12, 14 July 2026 (UTC)
- I agree. ~ Tom.Reding (talk ⋅dgaf) 11:26, 14 July 2026 (UTC)
- Perhaps just mirror Module:WikiProject banner/templatepage#L-792 — Martin (MSGJ · talk) 11:44, 14 July 2026 (UTC)
- I agree. ~ Tom.Reding (talk ⋅dgaf) 11:26, 14 July 2026 (UTC)
- If the article is using {{WikiProject banner shell}} then it is preferable to add listas to that template instead - this wording is too weak, because banner shell is the only place where it can be used now — Martin (MSGJ · talk) 11:12, 14 July 2026 (UTC)
Initial bullet
[edit]I have reverted this edit by Tom.Reding (talk · contribs) because it was causing WP:LISTGAP problems on every page that transcludes it. Other than Template:WikiProject East Asia/doc, where else does the bullet need to be suppressed? --Redrose64 🌹 (talk) 21:06, 19 July 2026 (UTC)
- What are the WP:LISTGAP problems? I didn't see any.
- There was at least 1 other page that could have benefited from
|nobullet=yes, i.e. it was surrounded by # instead of *. Unfortunately, I noticed it early on in my WP:PIQA updates, but I didn't make a note of it. I resolved the formatting in a way that was satisfactory, but not as satisfying as|nobullet=yes. ~ Tom.Reding (talk ⋅dgaf) 02:11, 20 July 2026 (UTC)- Steps to reproduce:
- Choose any WikiProject doc page that has two or more consecutive uses of
{{WPBannerDoc}}. I am going to choose Template:WikiProject Cryptocurrency/doc because this has four consecutive instances of{{WPBannerDoc}}and no other documented params to confuse the issue. - Use your browser's "Inspect" or "View source" feature to examine the HTML of the "Optional parameters" section.
- Observe that there is a single
<ul>...</ul>element enclosing four instances of<li>...</li>, one for each parameter. - Go to this version of Template:WPBannerDoc and open it up for editing. Don't change anything.
- In the box labelled "Preview page with this template (what's this?)", paste in the name of the doc page chosen earlier. Click on Show preview.
- Use your browser's "Inspect" or "View source" feature to examine the HTML of the "Optional parameters" section.
- Observe that there are now four
<ul>...</ul>elements each enclosing a single instance of<li>...</li>.
- Choose any WikiProject doc page that has two or more consecutive uses of
- Screen reader users will hear, three times, "End of list. List of one item." This is the accessibility issue described by WP:LISTGAP. --Redrose64 🌹 (talk) 07:20, 20 July 2026 (UTC)
- Thank you.
- The other page was Template:WikiProject North America/doc. I think there is 1 more out there, where I changed the entire ordered list to unordered, which makes searching for it more difficult.
- Would you know how to safely make the initial bullet conditional? ~ Tom.Reding (talk ⋅dgaf) 18:47, 20 July 2026 (UTC)
- Steps to reproduce: