Content deleted Content added
m Archiving 1 discussion(s) from Template talk:WPBannerMeta) (bot |
m Archiving 2 discussion(s) from Template talk:WPBannerMeta) (bot |
||
Line 230:
:1. is caused by the difference in width caused by the words <code>show</code> and <code>hide</code> (seriously; it's even worse with the default names expand and collapse). This is possible to fix using some margin on a second container for the title (IDK if that already exists). This is how Navbox currently does it, because Navbox needs things to be centered. It might also be fixable if we set show/hide in this template to display: inline-block and give it a reasonable width (4ems is the amount of margin Navbox uses), but I haven't tried that. (NB this is why some templates like Article history's show/hide as well as a few of our collapse templates cause some flicker when collapsing/uncollapsing, since they're using text-align: center rather than what Navbox does, which is more involved. I'm just lazy since the solution requires enough work in multiple templates that like to support different locations for the title of the collapsed content.)
:2. is something that honestly can't be fixed without divification. I have tried multiple times to get it the way everyone wants it for all tmboxes as tables. Tmbox divification is non-trivial because of the fact there are multiple templates using the styles that aren't a function of [[Module:Message box]]. [https://en.wikipedia.org/w/index.php?search=contentmodel%3Asanitized-css+insource%3A%2Fmin-width+*%3A+*%5B0-9%5D*%25%2F+-intitle%3A%2F%5C%2Fsandbox%2F&title=Special%3ASearch&profile=advanced&fulltext=1&ns10=1&ns828=1 This search] has a list of the ones that need adjustment (and some false positives), but it's not a large number. I got started with a more incremental step somewhere about whether a message box uses divs or tables for layout that allows each type to opt in, which would at least get us toward deploying it for some places, but I seem to have misplaced the sandbox. I'll look for that. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 15:36, 28 July 2023 (UTC)
== Unknown parameters checking ==
An user recently added the ability to check for unknown parameters to a banner template: See [[Special:Diff/1157384999]]. Is it possible to incorporate that functionality directly into the meta template? <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 20:28, 28 May 2023 (UTC)
: No, because Lua modules can't access more than 1 level of parent frame. [[User:Pppery|* Pppery *]] [[User talk:Pppery|<sub style="color:#800000">it has begun...</sub>]] 20:30, 28 May 2023 (UTC)
:I actually have a plan for this. It involves reading the content of the template page to work out the names of the parameters that are being used. Will post here if I get it working. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 06:58, 23 June 2023 (UTC)
:I now realise that Pppery is correct. Perhaps the best we can do is with a solution that calls the module directly, i.e. the template uses <code>{{#invoke:WikiProject banner|main|...}<includeonly/>}</code> rather than <code>{{WPBannerMeta|...}<includeonly/>}</code> Then we will be able to access the parameters used on banner instances. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 20:52, 26 June 2023 (UTC)
{{ping|CX Zoom|Pppery}} I think I've got this working on the sandbox. Available to test on [[Template:WikiProject National Football League/sandbox]]. Let me know what you think — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 14:54, 21 July 2023 (UTC)
:It seems to me that it works. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 07:23, 23 July 2023 (UTC)
::Okay I will look at deploying this shortly then. The module will populate categories of the form [[:Category:Pages using PROJECT_NAME with unknown parameters]], if it exists, otherwise the default category [[:Category:WikiProject templates with unknown parameters]] — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 11:34, 24 July 2023 (UTC)
::{{done|Deployed}} — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:41, 24 July 2023 (UTC)
I have updated the documentation to recommend using <code>{{#invoke:WikiProject banner|main|...}<includeonly/>}</code> so that projects can benefit from the automatic parameter checking <!-- Template:Unsigned --><small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User: MSGJ| MSGJ]] ([[User talk: MSGJ#top|talk]] • [[Special:Contributions/ MSGJ|contribs]]) 08:54, 26 July 2023 (UTC)</small>
: {{ping|MSGJ}} [[:Category:Pages using WikiProject Food and drink with unknown parameters]] seems to be filled up with articles with b-class review and task force parameters, is that an issue with {{tl|WikiProject Food and drink}} or the meta template itself? [[User:Taavi|Taavi]] ([[User talk:Taavi|talk!]]) 17:16, 28 July 2023 (UTC)
::Okay I think I can see what is going wrong there. There are multiple parameter variants accepted for each task force. I will have to upgrade the code to recognise though ... — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 19:59, 28 July 2023 (UTC)
::This should be fixed now, although the category may take some time to empty itself — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 11:47, 29 July 2023 (UTC)
== Task forces no longer inherits importance ==
{{moved from|Wikipedia:Village pump (miscellaneous)}}
I have just noticed that WikiProject banners no longer automatically categorises importance for task forces and other sub-groups if no specific value is set for those. This one for example: [[Talk:Sweden women's national football team]]. For all task forces, the article is put into unknown importance. They used to mimic the importance set for the parent project unless there was a specific value set for the task force. Is it a bug or a new feature? --[[User:Mango från yttre rymden|Mango från yttre rymden]] ([[User talk:Mango från yttre rymden|talk]]) 22:26, 24 July 2023 (UTC)
:This feature may have got missed when converting the template to Lua. Is this still something which would be useful to the football project? Shouldn't be too hard to fix. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:46, 24 July 2023 (UTC)
::If this was the past behaviour, I'd support reinstating it. But, there should be an option for opt-out, because importance to individual task forces might not always align with its parent. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 07:00, 25 July 2023 (UTC)
:::I see. It's not just for WP Football, it's the same for [[WP:Computing]] and [[WP:Television]] and a few more that I've forgot now. I would assume that most, if not all, other banner templates are affected as well.
:::It's a known feature, most people assume that task forces get the same importance as the parent project. So yes, it was the past behavior. Most people don't even know that task forces can have a separate importance assessment, that feature is very ill documented in the rare cases it's mentioned at all. I guess people can learn if we start informing properly about it, but I think it would severely undermine task forces if they had to start all over on that, a feature/institution that is already suffering from dwindling commitment. Literally tens of thousands of articles would need to be assessed again. To have task forces inherit importance assessment from the parent project is a good baseline and perfectly fine in most cases. So yes, I think it would be very useful.
:::I think an opt-out feature is unnecessary, because it can always be set specifically anyway. But sure, there is a point to have an opt-out if a task force really want to have it that way and make their own importance assessments from scratch. --[[User:Mango från yttre rymden|Mango från yttre rymden]] ([[User talk:Mango från yttre rymden|talk]]) 09:50, 25 July 2023 (UTC)
::::Even before the recent changes, taskforces didn't inherit importance unless they were explicitly coded to do so. For example, [[Template:WikiProject Cryptography]] has <syntaxhighlight lang=mediawiki> |tf 1={{{computing|}}}<!-- see Computer Science Project template -->
|tf 1 importance={{#if:{{{computing-importance|}}}|{{{computing-importance}}}|{{{importance|}}}}}<!-- Inherit importance if not specified -->
|TF_1_ASSESSMENT_CAT = Computing articles</syntaxhighlight> which means that when {{para|computing|yes}} is set, if {{para|computing-importance}} is blank or absent, the value set by {{para|importance}} is used instead; and if that is also blank or absent, the page is added to {{cl|Unknown-importance Computing articles}}. Compare [[Template:WikiProject Ancient Egypt]] which has <syntaxhighlight lang=mediawiki>|tf 1={{{religion|}}}
|tf 1 importance={{{religion-importance|}}}
|TF_1_ASSESSMENT_CAT = Egyptian Religion articles</syntaxhighlight> which means that when {{para|religion|yes}} is set, if {{para|religion-importance}} is blank or absent, the page is added to {{cl|Unknown-importance Egyptian Religion articles}} - {{para|importance}} is ignored. As regards [[Template:WikiProject Football]], this has e.g. <syntaxhighlight lang=mediawiki> |tf 1={{{Africa|{{{africa|}}}}}}
|tf 1 importance = {{{Africa-importance|{{{africa-importance|}}}}}}
|TF_1_ASSESSMENT_CAT = football in Africa articles</syntaxhighlight> and similar code for the other taskforces, there are aliases but in no case is inheritance of {{para|importance}} coded for. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 22:27, 25 July 2023 (UTC)
:::::Redrose, you are right this was never supported as standard but it was a feature of [[Template:WPBannerMeta/hooks/taskforces|taskforce hook]] which apparently a lot of projects made use of. So I will code the {{para|inherit importance}} parameter in the new version. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:59, 25 July 2023 (UTC)
::::::Ah, I see that you removed it in {{diff|Template:WikiProject Football|prev|1164817636|this edit}}; setting <syntaxhighlight lang=mediawiki> |inherit importance={{{importance|}}}</syntaxhighlight> is another way of explicitly coding for it. I know of no WikiProject banners that would inherit the importance without using one or the other of these methods of explicit coding. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] 🌹 ([[User talk:Redrose64|talk]]) 05:33, 26 July 2023 (UTC)
Okay I think I have this coded in the sandbox. There is no longer any need to pass through the importance parameter again, so {{para|inherit importance|<nowiki>{{{importance|}}}</nowiki>}} is unnecessary. Instead a straightforward {{para|INHERIT_IMPORTANCE|yes}} could be used for this. I have some questions about this below. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 09:57, 26 July 2023 (UTC)
:@[[User:Mango från yttre rymden|Mango från yttre rymden]]: just waiting for your thoughts on the questions below (and anyone else) — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 18:32, 27 July 2023 (UTC)
:This feature is now deployed and I added |INHERIT_IMPORTANCE=yes to the football banner — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 11:48, 29 July 2023 (UTC)
===Display===
The template will state something like
* This article is supported by the '''[[Wikipedia:WikiProject Football/Sweden task force|Swedish football task force]]''' (marked as [[:Category:High-importance football in Sweden articles|High-importance]]).
What should it display if the importance is inherited? We can no longer say it has been "marked as High-importance". Should this part be omitted or should we note in some way that the importance has been automatically inherited? — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 09:57, 26 July 2023 (UTC)
:Currently, absence of importance marker denotes "unassessed importance", but at the same time the project has actively chosen to inherit the importance, so it is not "unassessed". I support some text along the lines of "(marked as High-importance)". I can suggest "inherited as High-importance", and can't think of any better way of doing it. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 18:44, 27 July 2023 (UTC)
::Perhaps we just say "'''assessed''' as High-importance". I don't think "inherited as High-importance" is grammatical but I can't think of a better way of expressing that — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 21:21, 27 July 2023 (UTC)
===Invalid importance===
What should happen if {{para|sweden-importance|fhdjfh}} - should Sweden inherit the parent project's importance or should "fhdjfh" be used, which will resolve to "Unknown" — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 10:00, 26 July 2023 (UTC)
:Inherit parent's importance, if garbage is inputted. Have a category track these, because sometimes there might be genuine mistakes like misspelling "mid" as "mis" due to erroneous keystroke, which should be tracked and fixed. <span class="nowrap">—'''[[User:CX Zoom|CX Zoom]]'''[he/him]</span> <sup class="nowrap">([[User talk:CX Zoom|let's talk]] • {[[Special:Contributions/CX Zoom|C]]•[[User:CX Zoom/X|X]]})</sup> 18:46, 27 July 2023 (UTC)
::So basically anything that resolves to Unknown (blank or invalid) will inherit. Yes that makes sense to me. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 21:19, 27 July 2023 (UTC)
|