This is an archive of past discussions about Module:WikiProject banner. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page.
How does your code interact with the exists check in lines 409-413 and 620-624? By the way, the bot should now be actively moving these categories, so it should all be sorted in a few days, so we could just wait? — Martin (MSGJ · talk) 10:57, 17 December 2024 (UTC)
The moving of the categories seems to have stalled at CfD, so we should probably fix this. Can you see if your code can be simplified so we don't check categories exist multiple times? By the way, it's great to have another Lua editor to help out — Martin (MSGJ · talk) 22:14, 17 December 2024 (UTC)
Yeah, the duplicated expensive function calls are bugging me too. I've reworked the function so it stores "which suffix worked" in a variable, and I've added a case before both exists-checks you mentioned so they'll use that variable instead if it's non-nil. That leaves at most three exists-checks per category (except maybe an edge case for FM); does this look good? jlwoodwa (talk) 00:12, 18 December 2024 (UTC)
At Module:WikiProject_banner#L-283, the banner name should not be the value of localbanner_name=mw.title.new(args.BANNER_NAMEor'Template:WikiProject '..(args.PROJECTor'PROJECT')), but it should instead be the value of mw.getCurrentFrame():getParent():getTitle(), as this will allow any redirect usages to be validated as well, and not only those templates titled "WikiProject something". Gonnym (talk) 12:09, 4 January 2025 (UTC)
Template:WikiAfrica/Share Your Knowledge conversion
Update Module:WikiProject banner/templatepage to move the class and listas parameters
In the autodoc section of Module:WikiProject banner/templatepage, the |class= and |listas= values should be removed and shown in the examples in use inside the WikiProject banner shell.
Convert:
Basic usage
Place this on the talk page of relevant articles:
{{WikiProject Skyscrapers|class=|importance=}}
to:
Basic usage
Place this on the talk page of relevant articles:
{{WikiProject banner shell|class=|{{WikiProject Skyscrapers|importance=}}}}
and
Full usage
It is usual to remove any unused parameters from the template call.
{{WikiProject Skyscrapers|category=|listas=|class=|importance=|attention=|needs-infobox=|unref=|Imageneeded=}}
to:
Full usage
It is usual to remove any unused parameters from the template call.
{{WikiProject banner shell|class=|listas=|{{WikiProject Skyscrapers|importance=|attention=|needs-infobox=|unref=|Imageneeded=|category=}}}}
Looks good. In the "deprecated" section, maybe also add the "this parameter should be used with the banner shell template" to the class parameter. Gonnym (talk) 10:11, 30 January 2025 (UTC)
Override importance to NA on non-articles
There is a suggestion (link) that importance ratings e.g. |importance=mid should be ignored on non-articles, like redirects. At the moment the module will automatically apply NA-importance to these pages if no importance is specified, but it will not override a specified importance. What do people think? — Martin (MSGJ · talk) 07:33, 16 September 2024 (UTC)
The suggestion makes sense, and overridden pages can be filtered into Category:Pages with conflicting importance ratings. As long as any WikiProjects that wish to use their own importance scheme can use a custom importance mask, I don't see a problem. I would just be careful about not emptying that category too quickly, to give WikiProjects that do importance-rate #Rs, cats, templates, etc., time to make their own masks. ~Tom.Reding (talk ⋅dgaf)11:26, 16 September 2024 (UTC)
If the rating is ignored, then it doesn't create a conflict. For example if you type |class=C on a redirect, then that will be ignored and it will still be classified as a redirect, and it does not trigger the conflicting ratings category. Should that be the same for ignored importance ratings? — Martin (MSGJ · talk) 11:50, 16 September 2024 (UTC)
If any and all WikiProjects that currently use importance on non-articles (idk what that # is) have their importance masks in place, then sure, importance ratings can be ignored. ~Tom.Reding (talk ⋅dgaf)12:38, 16 September 2024 (UTC)
None intentionally, as far as I am aware. The only ones I have encountered have been left over from a move or merge of a page. If we did this, it would affect all non-articles, i.e. disambiguation pages, templates, portals, etc. would all get NA-importance automatically. So we should consider projects like Template:WikiProject Templates, Template:WikiProject Portals, etc. which may be tracking the importance of these pages. If they are, then a custom importance mask can be used — Martin (MSGJ · talk) 13:49, 16 September 2024 (UTC)
Yes, WikiProject Underwater diving classifies redirects with the potential to become full articles with the importance the full article would have, thereby giving anyone who might be considering converting to a full article some idea of whether it would be worth the effort. · · · Peter Southwood(talk): 04:47, 30 September 2024 (UTC)
If we are going to do this, then we need the check all possible projects which are tracking non-articles by importance. If there are any, then they need to be switched to a custom importance mask. I will add candidates to check to the table below — Martin (MSGJ · talk) 08:05, 19 September 2024 (UTC)
Okay so we can do this - will look at coding it next week. It will be an opportunity to move away from using {{importance mask}} and use a Lua version instead — Martin (MSGJ · talk) 13:59, 20 September 2024 (UTC)
Just to confirm. The new version will force NA importance on any non-article, but it will still permit NA to be used on an article. Is this correct? Would it be better to prohibit NA in article space, in which case NA would resolve to Unknown? — Martin (MSGJ · talk) 12:24, 25 September 2024 (UTC)
NA on an article sounds strange. I'd like to see an actual usage where one would set this. It would seem that if an article is NA then it's pretty much not notable for inclusion in Wikipedia (or that the project shouldn't have tagged it). Regarding the other namespaces, any project that wants to give importance to non-articles should have a custom mask? Gonnym (talk) 09:09, 26 September 2024 (UTC)
I tend to agree. NA on an article would not make much sense, and if any project wanted to do that, they should set up a custom mask. — Martin (MSGJ · talk) 09:28, 26 September 2024 (UTC)
Set index pages should probably be treated like disambiguation pages, unless some projects are actually setting different importance to them. Gonnym (talk) 22:39, 26 September 2024 (UTC)
Couldn't agree more. I have long argued that set index articles should be classified as disambiguation pages, because that is what 99% of them are. There may be a few real SIAs with actual content, but most are just a collection of links. The easiest way to do this, is make an edit like this, which would convert all the list articles on surnames into disambiguation pages in one swoop. But as you can see I was reverted back in 2023, and many kB of discussion ensued which did not reach a satisfactory conclusion — Martin (MSGJ · talk) 10:42, 27 September 2024 (UTC)
We already have that list and can detect them. But the problem is that set index articles are supposed to be articles and shouldn't be getting NA importance — Martin (MSGJ · talk) 11:05, 27 September 2024 (UTC)
Well in that case, an article shouldn't get NA importance and should get categorized as unknown (though again, I personally think they should be detected as set index and set to NA). Gonnym (talk) 11:27, 27 September 2024 (UTC)
If we make this change I anticipate some queries/complaints along the lines of "why can't I set NA importance for this set index article?" I think we are taking the reasonable and appropriate action, but the mis-classification of SIAs continues to cause problems ... To reduce confusion, let's keep the possibility of assessing articles with NA-importance for now. If the SIA/disambig issue is ever sorted properly, we can revisit this — Martin (MSGJ · talk) 14:04, 27 September 2024 (UTC)
Hang on a bit here. WikiProject Underwater diving uses importance on redirects to indicate which could/should reasonably be converted to full articles some day, and how important the topic is to the project. Are you classifying redirects as non-articles? How will we visibly indicate which redirects are potentially articles and which are not? · · · Peter Southwood(talk): 03:45, 30 September 2024 (UTC)
Yes, all redirects are classified as non-articles. We can set up a custom importance mask for your project, and you can continue to assess importance in any way you wish — Martin (MSGJ · talk) 07:56, 30 September 2024 (UTC)
That seems an entirely reasonable option, thanks for your response. My template coding skills are rudimentary, so I may have to come bck with some questions about how it works if I don't manage to get it to do what is needed. Cheers · · · Peter Southwood(talk): 14:54, 30 September 2024 (UTC)
That's not what they are saying. They are saying that Rater will only allow them to rate NA. I can confirm that I am seeing this too, but need to look into why this might be — Martin (MSGJ · talk) 20:28, 30 September 2024 (UTC)
The change to this module does seem to have mucked up rater. I have no idea why, because the module is working just fine. But perhaps we should consider a partial revert to allow time for @Evad37 to look into this and apply a fix — Martin (MSGJ · talk) 10:17, 1 October 2024 (UTC)
I have reverted the change to the importance mask (although I still can't think of any way this could have an impact). Please let me know if you notice an improvement to rater? — Martin (MSGJ · talk) 17:38, 1 October 2024 (UTC)
I'm just going to toss in a general comment that supports allowing projects to tag the importance of Drafts and Redirects. In the former situation, I will find drafts from the New Article reports and tag them appropriately with all of the desired details. Then when someone reviews it, that editor only has to assign a quality rating. I find that well-meaning people don't always know what importance to assign when they aren't active members of a project, and I'll have to go tweak the rating later. Also, the importance rating can serve as an indicator of which drafts should get attention to push them across the finish line as articles.
As for redirects, it's similar. Some redirects have possibilities for expansion into future articles, and if we can rate them by importance now, it gives some indication on which should be prioritized over others. Not every project may see the utility in this, but some will. Removing this possibility across the board disallows projects to use this potential tool. Imzadi 1979→18:27, 2 October 2024 (UTC)
I agree on both counts, but this tends to be different for different projects. Some do not allocate an importance at all, others find it a useful tool. I would suggest that only non-articles that have the potential to become articles can usefully be allocated an importance, and all others should probably be rated as NA, while all actual articles should have a non-NA rating if the project allocates importance. If the project does not allocate importance, then no importance should be the only and automatic rating, and no options are needed. · · · Peter Southwood(talk): 04:08, 3 October 2024 (UTC)
Importance for drafts and redirects (and userspace drafts?) sounds reasonable for the reasons stated. I guess it depends on how many projects are actually doing this. If it's common, then we should support this as standard. It it's niche, then those projects can easily use a custom mask — Martin (MSGJ · talk) 17:29, 3 October 2024 (UTC)
We now have the green light to reimplement this change. So we need to decide whether to allow importance ratings for certain non-articles, e.g. redirects and drafts, or treat all non-articles as NA. Does anyone else have any opinions on this, or should we try WT:COUNCIL? — Martin (MSGJ · talk) 22:58, 5 October 2024 (UTC)
NA importance (break 2)
Just to make sure that everyone is board with this change, the table below clarifies the proposed output in different scenarios, as I understand it — Martin (MSGJ · talk) 09:33, 6 October 2024 (UTC)
Done. Diving should now be able to go back to the standard importance mask (unless there is anything else non-standard that you want to do) — Martin (MSGJ · talk) 20:31, 7 October 2024 (UTC)
Apparently this was never implemented properly for drafts. I only tested it on redirects! Now fixed on the sandbox. This means that the page type will be displayed on the banner. Which is better: draft or draft article?
Current: This page is within the scope of WikiProject Physics ...
Option 1: This draft article is within the scope of WikiProject Physics ...
Option 2: This draft is within the scope of WikiProject Physics ...
Thanks Peter. I've gone with option 2 for now because that matches what the banner shell template uses, but don't really mind either wy. — Martin (MSGJ · talk) 12:05, 30 January 2025 (UTC)
I have coded some tracking categories to help us ensure that all listas values are moved into the banner shell template. I have created the following tracking categories:
Parameter removed by bot (User:Qwerfjkl has offered to use his bot)
Parameter moved by bot (I think User:Cewbot should already do this)
Human review needed. (These should already be tracked in Category:Pages with DEFAULTSORT conflicts and possibly cleared out by other editors working through this category.)
When completed and categories emptied, I think the code can be simplified to just have "Category:WikiProject banners with listas value which needs moving to banner shell", when listas is used. Gonnym (talk) 21:38, 6 September 2024 (UTC)
Absolutely. And after a while, we could just remove the parameter entirely and then they will turn up in the unknown parameter categories — Martin (MSGJ · talk) 11:22, 7 September 2024 (UTC)
It's taken a while but I think we are now ready to remove all the code for listas from this module. Any remaining values will be picked up by the unknown parameter tracking — Martin (MSGJ · talk) 21:56, 9 January 2025 (UTC)
Removed. Now if you remove |listas={{{listas|}}} from banner templates, any use of listas will tracked as an unknown parameter — Martin (MSGJ · talk) 22:39, 30 January 2025 (UTC)
Actually, not sure of the best way to fix this, but we also have Category:NA-Class AfC project pages articles. Basically any project that was not using "articles" at the end of their assessment category will be affected. The next step is to rename other non-article page categories to "pages", and then I think this problem will largely be resolved. But it may take a bit of time to do this ... — Martin (MSGJ · talk) 23:24, 7 December 2024 (UTC)
U.S. Roads does not use this module for its task forces. I have looked into converting it in the past, but there were barriers. I may have to move those categories back to their original names — Martin (MSGJ · talk) 21:49, 8 December 2024 (UTC)
I don't think this module should continue supporting the handful of templates that want to do stuff their own way. Gonnym (talk) 01:30, 9 December 2024 (UTC)
Update: all remaining non-article categories have been nominated for moving. Please comment here. Once these are done, we can fix this mess properly — Martin (MSGJ · talk) 23:15, 9 December 2024 (UTC)
No it would be best to fix this now. This renaming has caused chaos because the bot can't process it and the templates can't be easily amended. Please make the necessary amendments immediately. Timrollpickering (talk) 00:25, 16 December 2024 (UTC)
You are being overly dramatic, using words like "chaos", and it is not helpful. A handful of redlinked categories does not constitute chaos. I believe the necessary changes have now been made to the module, sop hopefully the bot can continue its work — Martin (MSGJ · talk) 22:42, 16 December 2024 (UTC)
Again, this is literally just the first two out of some 6,000+ assessment categories that may need to be reviewed and templates that need to be updated to use the new category names. It would be greatly appreciated if this could be made a priority, because the current backlog of incorrectly categorized pages is severely impacting the category redirect fixing bot. --R'n'B (call me Russ) 13:18, 5 January 2025 (UTC)
OK - the 20th Century Studios category apparently was moved by an overzealous editor (per the history) who saw a bunch of similarly-named categories being moved, and assumed that this one should be too. But then you have Category:Category-Class Animation articles of NA-importance, which was moved by the bot after someone (not me!) marked it for CFD/Speedy. Don't know how many others there are like this. --R'n'B (call me Russ) 20:02, 5 January 2025 (UTC)
I will try and look at the code changes needed for the intersecting categories as soon as possible (hopefully sometime this week) — Martin (MSGJ · talk) 07:37, 6 January 2025 (UTC)
If |class=NA then no intersection category will be used.
If |importance=NA then no intersection category will be used.
For a non-article class (e.g. Redirect-class) it will check if the category with "pages" exists and will use that, otherwise it will use the category with "articles".
I jumped the gun on removing NA categories. There was a CfD but it only applied to two categories not more generally. I've left these in for now — Martin (MSGJ · talk) 12:42, 10 January 2025 (UTC)
@HouseBlaster and @R'n'B have pointed out a problem with the code for projects that have opted out of PIQA. We are using Module:Pagetype to detect whether a page is an article or some other type of page (e.g. disambiguation pages and redirects are not classified as articles), and this is used to determine whether to use "pages" or "articles" in the category name.
We should distinguish between two things here. What a project classifies a page for their project, and what a page is. WP History can say that in their opinion an article is not the global quality of say "B" and they give it a "C", what they can't do, is say an article is a category. Same thing with disambiguation pages. A page is, or is not, a disambiguation page. That is something that is global. I'm opposed to any and all changes which let projects falsely identify pages. Gonnym (talk) 10:54, 20 January 2025 (UTC)
There are projects that choose to define certain categories as Project-class because they are internal project categories rather than content categories. I'm not sure we should be enforcing such a strict interpretation, to stop them doing that — Martin (MSGJ · talk) 10:33, 21 January 2025 (UTC)
Small inconsistency: in the #Deprecated parameters section, both listas & class bullets' 2nd sentence should start with either "Please see ..." or "See ..." and not both. This is the only instance of "Please see ..." I see, so preference goes to "See ...". ~Tom.Reding (talk ⋅dgaf)12:00, 8 February 2025 (UTC)
From what I can tell, I think we are all set to delete (under WP:T5) the templates listed above, but I am asking here before actually pushing the button. HouseBlaster (talk • he/they) 02:48, 11 February 2025 (UTC)
Then in the Template:WikiProject Song Contests page, warnings came up, requesting to create the 'articles' categories, leading to me recreating the redirects to suppress the warnings (cc: @Liz). Can these warnings be suppressed outright in the module codes since the articles are being automatically set to the 'pages' categories already? – robertsky (talk) 23:09, 13 February 2025 (UTC)
I would firstly like to move these to a more suitable location (as Template:WPBannerMeta is no longer in use) and also to update and simplify this whole family of templates, because things can be done a lot more easily these days — Martin (MSGJ · talk) 16:16, 22 March 2025 (UTC)
Converted the presentational table to a more appropriate div.
Use a dark mode token for the background.
Removed support for setting custom styles. Template:WikiProject Freemasonry is the only project which uses them (TODO_STYLETODO_TITLE_STYLE), and the way in which they are used is not friendly for dark mode, though the particular color flavor happens to be readable. I removed another which was using the default in light mode.
Playing around with the left/right padding on the container seems to do it. Adding 2px on the left and another 2px on the right I think got it. Basically what's happening is that tables have a natural border-spacing (not coincidentally it's 2px) which is padding like but applied slightly differently. Izno (talk) 16:53, 22 March 2025 (UTC)
Tables are special in that they have the border-spacing property. The point I was making is that in fact there is more to the box model than just padding and margin. Izno (talk) 00:58, 23 March 2025 (UTC)
I don't see any changes to the sandbox and the example is still looking the same? If you can fix the spacing in the sandbox, I suggest we change all of the collapsible boxes in the module to use div boxes, to keep things consistent — Martin (MSGJ · talk) 08:46, 24 March 2025 (UTC)
I didn't make any adjustments, which is why you do not see any changes.
I didn't change the other collapsible boxes because they're more or less fairly marked up as tables, from memory (and memory may be wrong of course). Izno (talk) 21:30, 28 March 2025 (UTC)
In that case I can't really see a benefit to converting the table to a div, as it will introduce an inconsistency. I have removed the style parameters from /templatepage, so these will now be treated as unknown parameters — Martin (MSGJ · talk) 18:53, 30 March 2025 (UTC)