Content deleted Content added
m Archiving 1 discussion(s) from Module talk:WikiProject banner) (bot |
m Archiving 4 discussion(s) from Module talk:WikiProject banner) (bot |
||
Line 527:
::::AFAIK it was only ever used by bots, copying class ratings from projects that had one, to projects that didn't, adding <code>|auto=</code> so the rating could be manually reviewed (which no one did) in case projects disagreed with each others' assessments. Was also used in bot runs tagging a WikiProject onto all talk pages in a category tree, also involving the same class copying/inheritance. With PIQA 'inheritance' is the goal and doesn't require manual review. Not aware of another it was used by bots, except copying assessments across projects. Am I missing anything? [[User:DFlhb|DFlhb]] ([[User talk:DFlhb|talk]]) 21:30, 7 November 2023 (UTC)
:::::I agree that once PIQA is rolled out, automatically assessing by inheritance will not be necessary. I believe there are other bots that do/did automatic assessments based on other crtieria, e.g. stub-class based on the length of the article. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 09:54, 9 November 2023 (UTC)
== collaboration parameters missing from auto documentation ==
I've set [[Template:WikiProject Zimbabwe]] to {{para|DOC|auto}} which works, but it doesn't show the 3 collaboration parameters that the template uses. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 09:22, 10 November 2023 (UTC)
:I also noticed that the documenation for the infobox parameter under "Notes and alerts" thinks the parameter name is {{para|infobox}} while under "Full usage" (and in the actual code), the name is {{para|needs-infobox}}. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 09:25, 10 November 2023 (UTC)
:It is true, I have not yet added the collaboration parameters to the auto doc. Some other rarely used parameters are also still to be included. I've fixed the issue with the infobox parameter in the sandbox. — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 10:51, 10 November 2023 (UTC)
::I created [[:Category:WikiProject banner templates using undocumented features]] to find which features most urgently need documenting. I am working on image-needed at the moment, and will get to collaboration later, unless anyone else can help with this — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 10:39, 15 November 2023 (UTC)
== Auto doc code style request ==
While testing (in preview) the auto doc with[[Template:WikiProject Television]] I saw a difference that I think the auto doc could benefit. In [[Module:WikiProject banner/config#L-379]] section and below, can you replace:
* <code>set _PARAMETER_ to "yes"</code>, which produces a text like {{tq|set needs-infobox to "yes"}}, with
* <code>set <nowiki>{{para|_PARAMETER_|yes}}</nowiki></code>, which produces a text like {{tq|set {{para|needs-infobox|yes}}}}
If using the {{tl|para}} there is problematic then even manually creating a similar style would be good. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 07:49, 15 November 2023 (UTC)
:Could we encode this as something like _PARAMETER_|yes so that gsub can be told to put what comes after the pipe as the argument of the parameter — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 10:38, 15 November 2023 (UTC)
::So going by what you asked, this should work:
::<syntaxhighlight lang="lua" line>
local doc = "_PARAMETER_|yes"
local parameter = doc:gsub('|yes', ''):gsub('_PARAMETER_', 'needs-infobox')
local value = doc:gsub('_PARAMETER_|', '')
local code = "<code>|%s=%s</code>"
local result = code:format(parameter, value)
print(result)
</syntaxhighlight>
::For readability I would split line 2. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 11:50, 15 November 2023 (UTC)
:::Another option would be to make the auto_doc table another level deep, so that you just store the value. That way you have <code>config.auto_doc.infobox.value</code>. Not sure which is better though. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 11:54, 15 November 2023 (UTC)
::::Should be possible to do this more efficiently with capture, e.g. <code>'_PARAMETER_%|(%a+)'</code> ? — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 12:33, 15 November 2023 (UTC)
::::Possible code on the sandbox. Not convinced it will work for _PARAMETER_ without value, but need to test it — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 16:43, 15 November 2023 (UTC)
:::::I've tested in on [[Template:WikiProject Television/sandbox]] and it works good. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 17:07, 15 November 2023 (UTC)
::::::Unrelated to the above changes, the {{para|needs-ref}} bullet uses <code><nowiki>_PAGETYPE_</nowiki></code> in the text description, which is shown like that (instead of a page type) with the auto doc. Any idea what a fix might be here? [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 17:11, 15 November 2023 (UTC)
== Linter error in sandbox invocation ==
At [[:Template:WikiProject Algeria/sandbox]], the code expands to:
<code><nowiki>Will be categorised into Category:Wikipedia requested photographs in {{{<code class="tpl-para" style="word-break:break-word">|image-___location=</code>}}}</nowiki></code>
which then evaluates to
<code><nowiki>Will be categorised into Category:Wikipedia requested photographs in image-___location=</code></nowiki></code>
and does not render correctly in the documentation. I don't think any of that is what was intended. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:38, 15 November 2023 (UTC)
:An unintended consequence of the changes discussed one section above. I'm still working on this code anyway, so it will be fixed somehow — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 17:57, 15 November 2023 (UTC)
::If <code><nowiki>local code = "<code>|%s=%s</code>"</nowiki></code> is being used, you might just need {{tag|nowiki}} tags inside the {{tag|code}} tags. There is probably a more sophisticated solution. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 18:43, 15 November 2023 (UTC)
== B-class checklists ==
Please see the discussion at {{section link|Wikipedia talk:WikiProject Council|Determining the future of B-class checklists}} which may involve changes to this module — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 22:43, 8 November 2023 (UTC)
:I have closed this discussion with consensus to remove the B-class checklist from any banner which has not opted out of PIQA, i.e. has not set {{para|QUALITY_CRITERIA|custom}} — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 15:03, 14 November 2023 (UTC)
:Updated code on sandbox. B-class checklist will not be displayed unless {{para|QUALITY_CRITERIA|custom}} — Martin <small>([[User:MSGJ|MSGJ]] · [[User talk:MSGJ|talk]])</small> 08:17, 16 November 2023 (UTC)
|