Module talk:WikiProject banner/Archive 14: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:WikiProject banner) (bot
m Archiving 1 discussion(s) from Module talk:WikiProject banner) (bot
 
(2 intermediate revisions by 2 users not shown)
Line 166:
I am thinking about adding the B-class checklist to the module so [[Template:WPBannerMeta/hooks/bchecklist|the hook]] will not be required. This could automatically display whenever the parameters {{para|b1}}, {{para|b2}}, etc. are passed. It will need to be a bit clever in order not to display twice on banners which are using the hook, e.g. do not display the checklist if {{para|HOOK_ASSESS}} is defined. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:48, 23 June 2023 (UTC)
:Could anyone who is good with CSS tell me what I need to do to get the [show] buttons to align in the example below? It's driving me crazy. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:03, 28 June 2023 (UTC)
<syntaxhighlight lang=wikitext>{{WPBannerMeta/test|category=no|class=c|b1=|b2=n|b3=y|b4=y|b5=na|b6=jo|attention-needed=y|needs-infobox=y}}</syntaxhighlight>
::It's the margin and padding, but the two rows do it in different ways - one via <code>style=</code> attributes, the other through classes and stylesheets. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 20:41, 28 June 2023 (UTC)
 
Line 776:
::::I've made the suggestion at [[Template talk:WikiProject U.S. Roads]] &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:31, 31 January 2024 (UTC)
:::::An unpromising response over there. I feel it wouldn't be difficult to add this functionality to the module, without adding any overhead to existing uses. It could also be useful in other banners, e.g. Canada Roads &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:00, 2 February 2024 (UTC)
 
== More page types ==
 
Now [[Module:Pagetype]] has the ability to detect two more types of page: soft redirects and set index articles. I proposed to make use of this by:
* Automatically assessing soft redirects as Redirect-class, in any namespace;
* Automatically assessing set index articles as List-class in article space, ''if no valid class is defined''. (There are sometimes SIAs which are mischaracterised, so it would be useful to be able to override the default.)
Thoughts? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 18:59, 2 February 2024 (UTC)
 
:Code for this is now on [[Module:WikiProject banner/sandbox]] and [[Module:Banner shell/sandbox]]. Requested by @[[User:PARAKANYAA|PARAKANYAA]] and @[[User:Hawkeye7|Hawkeye7]]. Have also taken the time to merge in the code from [[Module:Class mask]]. Needs a lot more testing though ... &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:11, 25 February 2024 (UTC)
::Switching to use the sandbox version moved the article from [[:Category:Unassessed articles]] to [[:Category:NA-Class articles]] but I think it should be in [[:Category:Redirect-Class articles]]. [[User:Hawkeye7|<span style="color:#800082">Hawkeye7</span>]] [[User_talk:Hawkeye7|<span style="font-size:80%">(discuss)</span>]] 20:43, 25 February 2024 (UTC)
:::Please tell me which page you are testing on? Redirect-class will generally be used if the project has created the corresponding category, otherwise it falls back to NA-class &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:45, 25 February 2024 (UTC)
:::: The page in question is [[-izzle]]. I have left it using the sandbox version so you can see it. Originally it had the banner shell but was not tagged for a project; I don't know how many of these are out there. As noted, Sandbox version switched it from [[:Category:Unassessed articles]] to [[:Category:NA-Class articles]]. Then, in response to your comment, I added a project template, {{tl|WikiProject English Language}}. This is a standard template that uses [[Module:WikiProject banner]]. This caused a switch. It is now listed as [[:Category:Unassessed English Language articles]] despite the fact that the {{tl|WikiProject banner shell/sandbox}} template has a Class=Redirect card. No error is reported. I think it should have gone into [[:Category:NA-Class English Language articles]] although it would be better still to create the Redirect category. [[User:Hawkeye7|<span style="color:#800082">Hawkeye7</span>]] [[User_talk:Hawkeye7|<span style="font-size:80%">(discuss)</span>]] 21:03, 26 February 2024 (UTC)
:::::It's because {{tl|WikiProject English Language}} is using the live code and not the sandbox code that I have changed. If you have a look now, I have added the sandbox version and it is using [[:Category:NA-Class English Language articles]]. (If [[:Category:Redirect-Class English Language articles]] existed then it would use that, but it doesn't so falls back to NA-Class.) Hope this all makes sense &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:14, 26 February 2024 (UTC)
 
:Most tests are working well (see [[Module talk:WikiProject banner/testcases]]). There is one apparent issue. I proposed above that set index articles could be manually assessed but will default to List-class. This is indeed possible, but this manual assessment would not be inherited by banners inside the banner shell (inheriting only happens if the article is otherwise unassessed by the banner, but in this situation it will not be unassessed because it will default to list-class). So I think the only two options are:
:* Automatic assessment of SIAs as list-class: no ability to override manually
:* No auto-assessment of SIAs: each one will need to be assessed individually (this is the status quo)
:Not sure if anyone has an opinion of this? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:30, 26 February 2024 (UTC)
::I suspect the status quo is better (manual is better than incorrect automatic), but the cost of such errors appears to be low, so I don't hold the opinion strongly. — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 09:08, 27 February 2024 (UTC)
:::I don't really mind either way. A few comments:
:::* [[Wikipedia:Content assessment]] makes it clear that a SIA should be assessed as List-class.
:::* If editors are trying to change that, it's probably because it's not really an SIA, in which case the template on the article should probably be changed.
:::* A common issue is that editors try to rate them as Disambig-class instead. This causes issues because Disambig-class is automatically detected, and only when specific disambiguation templates are used on the article. Auto-assessing these as List-class might prevent this issue.
:::So we can either keep status quo (probably more straightforward) or we can start auto-assessing and be ready to revert if any problems/complaints arise. If no complaints, then it means it was the correct thing to do. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:28, 28 February 2024 (UTC)
No further comments so I have implemented the code (''without'' the SIA detection for now) &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:49, 1 March 2024 (UTC)
 
This is fine by me. My concern was articles being marked as unassessed when they were not. I think at redirect and disambig should be standard grades, but that a a debate for another place and time. [[User:Hawkeye7|<span style="color:#800082">Hawkeye7</span>]] [[User_talk:Hawkeye7|<span style="font-size:80%">(discuss)</span>]] 21:00, 1 March 2024 (UTC)
 
==Discussion about centralizing TemplateData for WikiProject banners==
[[File:Symbol watching blue lashes high contrast.svg|25px|link=|alt=]]&nbsp;You are invited to join the discussion at [[:User talk:Evad37/rater.js#Aliases|User talk:Evad37/rater.js §&nbsp;Aliases]]. <span style="border:3px outset;border-radius:8pt 0;padding:1px 5px;background:linear-gradient(6rad,#86c,#2b9)">[[User:Sdkb|<span style="color:#FFF;text-decoration:inherit;font:100% Lucida Sans">Sdkb</span>]]</span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 17:50, 14 February 2024 (UTC)<!-- [[Template:Please see]] -->
 
:Not sure why Izno said it was impossible. I have made central documentation for a different module (see [[Module:Wikidata_table#L-650]]) that includes TemplateData for all its wrappers, and that seems to work well. Don't see why it couldn't be done here too &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:08, 14 February 2024 (UTC)
::Please respond at the original discussion, per [[WP:TALKFORK]]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 04:11, 16 February 2024 (UTC)
:::It's a user talk page. Fine for brainstorming ideas, but if you want to progress anything then this is the page for that discussion ): &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:51, 16 February 2024 (UTC)
::::A user talk page for a widely used gadget/script. I think that page is preferable for the purposes of continuing an ongoing discussion.
::::As for why I said it was impossible, I am always happy to be proven wrong. What is certainly impossible is doing it without parsing the wikitext of the template in Lua, or a separate JSON page (at which point you might as well just plug in the TemplateData directly), or any of a variety of other things which are functionally equivalent to "you can't transclude <nowiki><templatedata></nowiki> and then extend a transclusion with the things that differ meaningfully". But now that you've split the discussion willfully, guess Sdkb will never know. :) [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 21:51, 16 February 2024 (UTC)
:::::I'm not a fan of talk forks like this, but thanks to the miracles of [[mw:Talk pages project/Notifications|modern technology]] I'm plenty aware 🙂 <span style="border:3px outset;border-radius:8pt 0;padding:1px 5px;background:linear-gradient(6rad,#86c,#2b9)">[[User:Sdkb|<span style="color:#FFF;text-decoration:inherit;font:1em Lucida Sans">Sdkb</span>]]</span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 22:19, 16 February 2024 (UTC)
:::::If you see what I did at [[Module:Wikidata table]], I think it would be very feasible to do something similar in this module. But I'm struggling to understand the purpose, because I thought TemplateData is only used by Visual Editor which is only used in mainspace, whereas this template is used on talk pages. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 23:18, 23 February 2024 (UTC)
::::::Rater appears to use TemplateData based on Ctrl + F in the minified source at [[User:Evad37/rater/app.js]]. And no, it is not solely a tool for VE. Either way, centralized TemplateData ''doesn't'' work with the actual TemplateData editor. Which may or may not be fine, but is an additional hurdle for users who might wish to modify the descriptions of certain parameters further. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 00:18, 24 February 2024 (UTC)
:::::::Yeah, adding on to Izno's reply, my understanding is that TemplateData was originally created for the VisualEditor, but that it now has other applications like the Rater script. And I'd expect further applications in the future as we create new scripts/tools, so I think it's best to always create TemplateData so that there will be machine-readable standardized information for any script/tool that wants to use it. Cheers, <span style="border:3px outset;border-radius:8pt 0;padding:1px 5px;background:linear-gradient(6rad,#86c,#2b9)">[[User:Sdkb|<span style="color:#FFF;text-decoration:inherit;font:1em Lucida Sans">Sdkb</span>]]</span> <sup>[[User talk:Sdkb|'''talk''']]</sup> 00:33, 25 February 2024 (UTC)
::::::::I personally find it very useful to have the parameters listed in the visual editor for WikiProject banner templates. I have added several TemplateDatas to several of the documentation pages and I would love to see it implemented universally. I have no clue how to go about doing it though. [[User:It is a wonderful world|It is a wonderful world]] ([[User talk:It is a wonderful world|talk]]) 21:19, 8 March 2024 (UTC)
:::::::::As discussed above, visual editor is of no use to this template/module because it only exists on talk pages. The only use so far described, is possibly the Rater script. If there were more uses, it might make adding this more of a priority &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:05, 10 March 2024 (UTC)
::::::::::Apologies, when I said "visual editor", what I really meant was the "Insert a template" puzzle piece button at the top of the visual and source editor. [[User:It is a wonderful world|It is a wonderful world]] ([[User talk:It is a wonderful world|talk]]) 21:51, 10 March 2024 (UTC)
:::::::::::Ooh, the [[mw:Help:Extension:TemplateWizard]]. I can't believe I've never noticed this or used it before. Okay, I will add this task to my to-do list or perhaps someone will get to it before me &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:28, 10 March 2024 (UTC)
::::::::::::Thank you very much. It's not a top priority obviously but it would be nice. [[User:It is a wonderful world|It is a wonderful world]] ([[User talk:It is a wonderful world|talk]]) 06:52, 11 March 2024 (UTC)
Proof of concept: try using {{tl|WikiProject Norway/sandbox}} on a random talk page with the TemplateWizard. Only the class parameter is supported yet &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:18, 11 March 2024 (UTC)
 
:Yes, this is exactly what I was envisioning. Thank you. [[User:It is a wonderful world|It is a wonderful world]] ([[User talk:It is a wonderful world|talk]]) 05:51, 12 March 2024 (UTC)
::First iteration of this is now live. It will only work when {{para|DOC|auto}}. It can be improved further but let me know what you think so far? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:12, 15 March 2024 (UTC)
:::Just been testing it on WikiProject Zimbabwe and WikiProject Water Sports, and it works very well for me on both. Though, on WikiProject Zimbabwe, it has an example and information dialogue for the <code>needs-infobox</code> parameter, but not for the <code>needs-photo</code> parameter. Thank you. [[User:It is a wonderful world|It is a wonderful world]] ([[User talk:It is a wonderful world|talk]]) 13:23, 15 March 2024 (UTC)
::::Yeah it's not finished yet. You can add a description in [[Module:WikiProject banner/templatepage/sandbox#L-669|line 669]] of the code if you wish &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:59, 15 March 2024 (UTC)
:::Looks good. Following [[Wikipedia:TemplateData/Tutorial#Completing_the_template_data_information]] I'd change the "string" types to "line" and maybe mark the class as "deprecated" instead of "suggested" as we're moving it to the banner? [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 18:34, 15 March 2024 (UTC)
::::Both good idea and {{done}} on the sandbox. The type:line doesn't seem to make any difference to the template wizard. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:10, 15 March 2024 (UTC)