Template talk:WPBannerMeta

WikiProject Council
WikiProject iconThis template relates to the WikiProject Council, a collaborative effort regarding WikiProjects in general. If you would like to participate, please visit the project discussion page.
 

Detecting conflicts in class values[]

Is there a way to identify conflicts between a page's assigned class value and what would otherwise be automatically detected? E.g., a redirect or a page in the Category namespace tagged as stub-class. --Paul_012 (talk) 23:58, 9 March 2020 (UTC)

Not currently, but it would be simple enough to code on a particular project's banner — Martin (MSGJ · talk) 21:47, 10 March 2020 (UTC)
Thanks. It's not needed so much that I'd ask for an actual implementation; just something that I thought would be nice to have. --Paul_012 (talk) 14:54, 12 March 2020 (UTC)
We've only used automatic detection of a page's class value if no class is defined. (If the class is defined then this will always be used.) I think this is the right approach in general, but any project can change this default behaviour by using a custom class mask. — Martin (MSGJ · talk) 23:03, 5 May 2020 (UTC)

Automatic |tf_n=yes based on |TF_n_XYZ?[]

If someone fills in |TF_n_XYZ= (e.g. |TF_n_QUALITY=), would it be sensible to automatically trigger |tf_n=? I feel as though if you're assigning a taskforce quality rating, that it's safe to presume that taskforce should be activated. This would be particularly helpful for the WP:RATER tool. Since any text in |tf_n= will activate the section, the template could just include the nested parameters:

|tf_n={{yesno|{{{tf 4|{{{TF_n_LINK|{{{TF_n_NAME|{{{TF_n_NESTED|{{{TF_n_IMAGE|{{{TF_n_TEXT|{{{TF_n_QUALITY|{{{TF_n_MAIN_CAT|¬}}}}}}}}}}}}}}}}}}}}}}}}|yes|¬=¬}}

Thoughts? T.Shafee(Evo&Evo)talk 12:24, 1 May 2020 (UTC)

|TF_n_QUALITY= is set at the project template, but the |tf_n= is set at each article. The quality is just inherited from the main quality rating of that article; it is not specified for each task force. — Martin (MSGJ · talk) 07:44, 2 May 2020 (UTC)
@Evolution and evolvability: just wondering if my answer made any sense? — Martin (MSGJ · talk) 08:10, 5 May 2020 (UTC)
@MSGJ:. Woops, I meant to use Template:TF n IMP rather than |TF_n_QUALITY= as the example. Because currently, if Template:TF n isn't filled in, the template will ignore Template:TF n IMP. The template I'm working on is {{WikiProject_Molecular_Biology}}.
Example: {{WikiProject Molecular Biology |class=Stub |importance=Low |RNA-imp=high |MCB-imp=low}} returns:
WikiProject Molecular Biology (Rated Stub-class, Low-importance)
WikiProject iconThis template is within the scope of WikiProject Molecular Biology, a collaborative effort to improve the coverage of Molecular Biology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Stub-Class article Stub  This template does not require a rating on the project's quality scale.
 Low  This template has been rated as Low-importance on the project's importance scale.
 
but should really return:
WikiProject Molecular Biology / Genetics / Biophysics (Rated Stub-class, Low-importance)
WikiProject iconThis template is within the scope of WikiProject Molecular Biology, a collaborative effort to improve the coverage of Molecular Biology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Stub-Class article Stub  This template does not require a rating on the project's quality scale.
 Low  This template has been rated as Low-importance on the project's importance scale.
Taskforce icon
This template is supported by the Genetics task force (marked as Low-importance).
Taskforce icon
This template is supported by the Biophysics task force (marked as High-importance).
 
So the query is more about whether we can automatically assume |TF_n= is yes if any of the |TF_n_XYZ= parameters are filled. T.Shafee(Evo&Evo)talk 12:26, 5 May 2020 (UTC)
Ah, I understand your point now. Typically the only taskforce parameter that is set at the article level is the importance. So you are saying that if |biophysics-imp= is set to any value, then we should assume that |biophysics=yes? That would be fairly simple to implement. Are there any possible side effects of doing this? What if |biophysics-imp=cheesecake, i.e. an unrecognised value - should that trigger the taskforce as well? — Martin (MSGJ · talk) 13:38, 5 May 2020 (UTC)
On this matter, I occasionally see a parameter pair compressed into a single one. Take for instance Talk:László Szőcs - here, the {{WikiProject Football}} has |variants=mid which is not-quite invalid - it is treated as if it were |variants=yes but I suspect that the intention was |variants=yes|variants-importance=mid. --Redrose64 🌹 (talk) 20:51, 13 May 2020 (UTC)
I've not need that before, but it is efficient. Currently this is not recognised by the template, but it might be logical to make the taskforce importance default to the value of the taskforce activiation parameter? — Martin (MSGJ · talk) 06:18, 14 May 2020 (UTC)

Importance params - undiscussed change[]

Wugapodes, where was this discussed? I don't even see it in the sandbox, so it can't have been tested either. --Redrose64 🌹 (talk) 20:56, 5 May 2020 (UTC)

Nowhere, and it wasn't. Having a single parameter that uses a completely different naming scheme from the rest of the parameters is a horrible design, so—assuming ors will expect a consistent naming scheme—we should at least accept the dominant naming scheme as an option. Seemed pretty obviously uncontroversial. It's an alias, so it doesn't break templates that use the idiosyncratic name for this parameter; I've created a parameter alias before, so I didn't feel the need to test that the software still does aliases the way it always has. Wug·a·po·des 21:14, 5 May 2020 (UTC)
Thanks for starting this discussion Redrose, I have reverted this change. The naming scheme is actually very logical and I see no reason to change it without proper discussion. You will notice that uppercase parameter names are ones defined by the banner template whereas lowercase parameter names are defined at the article level. So the banner templates just pass these through |class={{{class|}}} etc. — Martin (MSGJ · talk) 21:30, 5 May 2020 (UTC)
That's great for developers but incredibly unintuitive for end users who are using the template. I didn't just make the change on a whim, it's a problem I actually ran into while ing. Wug·a·po·des 21:36, 5 May 2020 (UTC)
WPBannerMeta isn't intended for general use, it should only be used within WikiProject banners, where we expect a certain level of competence in the art of template ing. That said, its doc page does give a full list of parameters that if copied and pasted will already be in the correct form. --Redrose64 🌹 (talk) 22:04, 5 May 2020 (UTC)
( conflict) It's not "a horrible design", it's a deliberate design. There are two kinds of parameters, distinguished in two parallel ways: by having their names in upper or lower case, and by using underscores or spaces. Those in upper case (with underscores) are configuration parameters, setting characteristics that, regardless of the talk page that the WikiProject banner is used on, do not change themselves - |TF_1_LINK= for the page to link to, |TF_1_NAME= for the text to show for that link, |TF_1_IMAGE= for the image, params for the categories and so on. By contrast, those in lower case (with spaces) are used to pass values through from the individual talk pages: |tf 1= and |tf 1 importance=, etc. Since there are two of these for each task force, your claim "a single parameter that uses a completely different naming scheme from the rest of the parameters" is incorrect.
Please revert your change, sandbox it and obtain consensus. --Redrose64 🌹 (talk) 21:34, 5 May 2020 (UTC)

RfC on parameter alias[]

Should the tf n importance parameter of {{WPBannerMeta}} accept an alias that makes it consistent with the other TF_N_DESCRIPTION parameter names? Wug·a·po·des 22:14, 5 May 2020 (UTC)

Background

Currently, {{WPBannerMeta}} has some parameters that use ALL_CAPS_UNDERSCORED style, and others that use all lower spaced style. The style difference is due to how the inputs are handled by the meta template. Configuration parameters use the all-caps style, while those passed from the article are in the lowercase style. For wikiprojects that have task forces, this leads to code such as:

|tf 1={{{floridiae|}}}
 |TF_1_LINK           = Wikipedia:Wikiproject Tulips/Task forces/Floridiae
 |TF_1_NAME           = the Floridiae task force
 |TF_1_NESTED         = Floridiae
 |TF_1_TEXT           = 
 |TF_1_IMAGE          = Tulipa florenskyi 4.jpg
 |tf 1 importance={{{floridiae-importance}}}
 |TF_1_ASSESSMENT_CAT = Floridiae articles
 |TF_1_MAIN_CAT       = Floridiae articles

If a template uses TF_1_IMPORTANCE the meta template fails silently. In this I added an alias so that the template will accept either tf 1 importance or TF_1_IMPORTANCE, and it was reverted.

Rationale

Allowing either style is more intuitive for ors who create wikiproject banners. While the wider style is consistent, for those maintaining or adding functionality to task force sections of banners, the most obvious parameter name given the data above is TF_1_IMPORTANCE. Should an or make that assumption, the meta template gives no indication that something is wrong, and the reason why this task force parameter is different from the others is not obvious. Using an alias so that the template accepts either style makes the interface more intuitive and prevents silent errors when an or assumes the naming scheme is like the other TF_N_DESCRIPTION parameters. The change is backwards compatible, and no existing transclusions will be broken.

Wug·a·po·des 22:14, 5 May 2020 (UTC)

Protected request on 19 May 2020[]

Please change Template:WPBannerMeta/core to Template:WPBannerMeta/core/sandbox (+protection template) diff. This change makes it so that the JS for collapsible is initialized slightly sooner and bypasses the collapsible to mw-collapsible proxy wrapper of en.wp. —TheDJ (talkcontribs) 08:31, 19 May 2020 (UTC)

I put a test on Template:WPBannerMeta/testcases. The alignment is slightly different in the new version, but it is not an issue. — Martin (MSGJ · talk) 08:42, 20 May 2020 (UTC)
 Done no other comments so I have made the change. If the alignment change is worrying anyone we can revert/discuss — Martin (MSGJ · talk) 11:16, 22 May 2020 (UTC)