Module talk:WikiProject banner
![]() | Council | |||
|
![]() | If you wish to discuss the behaviour of the project banner inside the banner shell, then you may wish to post at Template talk:WikiProject banner shell instead. |
|
![]() |
|
This page has archives. Sections older than 60 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Syntax highlighting in automatic documentation
editCould syntax highlighting be added to the automatic documentation (i.e. when |DOC=auto
)?
Current display (e.g. Template:WikiProject AfroCreatives#Full usage):
{{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }}
Proposed:
{{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }}
Only applicable in the #Basic usage & #Full usage sections (I think). ~ Tom.Reding (talk ⋅dgaf) 17:42, 30 May 2024 (UTC)
- That sounds good (and uncontroversial) to me, but after some searching, I have been unable to figure out where the relevant code is. Sdkb talk 18:31, 30 May 2024 (UTC)
- It seems like it might be at Module:WikiProject banner/templatepage from lines 833-863. Someone who knows Lua would need to implement. Sdkb talk 18:35, 30 May 2024 (UTC)
- Excellent idea. I will do it shortly unless someone else has already done it — Martin (MSGJ · talk) 15:33, 2 June 2024 (UTC)
- Please check Template:WikiProject Cycling/sandbox and feed back? I notice you used the "inline" option but I don't know what difference that makes — Martin (MSGJ · talk) 08:36, 4 June 2024 (UTC)
- Compare this:
{{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }}
which uses inline, with this:which doesn't. --Redrose64 🌹 (talk) 12:37, 4 June 2024 (UTC){{WikiProject AfroCreatives |category= |listas= |class= |importance= |auto= |attention= |needs-image= |type= |details= |location= |topic= }}
- Got it. So I think in this case we do not want "inline", so this should be good to go — Martin (MSGJ · talk) 17:15, 4 June 2024 (UTC)
- Any luck with this? ~ Tom.Reding (talk ⋅dgaf) 12:42, 26 July 2024 (UTC)
- Think it was deployed ages ago - are you not seeing it? — Martin (MSGJ · talk) 19:54, 5 August 2024 (UTC)
- Seems Pppery reverted the edits here. Gonnym (talk) 19:59, 5 August 2024 (UTC)
- Ah, didn't realise that. My understanding is that all these category issues were resolved so I have redeployed the code. — Martin (MSGJ · talk) 20:18, 5 August 2024 (UTC)
{{Looks |great=!}}
~ Tom.Reding (talk ⋅dgaf) 10:29, 6 August 2024 (UTC)- Reverted again by Timrollpickering. Please can you explain what problems you are seeing? — Martin (MSGJ · talk) 15:04, 7 August 2024 (UTC)
- See Wikipedia:Village pump (technical)#WikiProject templates category redirect mess for the various category redirects this has impacted. Several are being fixed through renames. Timrollpickering (talk) 14:13, 8 August 2024 (UTC)
- Thanks for the note. I think I will redeploy the code but populate a tracking category instead of non-existent category so we can check for issues. — Martin (MSGJ · talk) 20:25, 8 August 2024 (UTC)
- See Wikipedia:Village pump (technical)#WikiProject templates category redirect mess for the various category redirects this has impacted. Several are being fixed through renames. Timrollpickering (talk) 14:13, 8 August 2024 (UTC)
- Reverted again by Timrollpickering. Please can you explain what problems you are seeing? — Martin (MSGJ · talk) 15:04, 7 August 2024 (UTC)
- Ah, didn't realise that. My understanding is that all these category issues were resolved so I have redeployed the code. — Martin (MSGJ · talk) 20:18, 5 August 2024 (UTC)
- Seems Pppery reverted the edits here. Gonnym (talk) 19:59, 5 August 2024 (UTC)
- Think it was deployed ages ago - are you not seeing it? — Martin (MSGJ · talk) 19:54, 5 August 2024 (UTC)
- Any luck with this? ~ Tom.Reding (talk ⋅dgaf) 12:42, 26 July 2024 (UTC)
- Got it. So I think in this case we do not want "inline", so this should be good to go — Martin (MSGJ · talk) 17:15, 4 June 2024 (UTC)
- Compare this:
- Does the olive text-to-background contrast really pass accessibility here, let alone on the gray background? — HELLKNOWZ ∣ TALK 15:20, 7 August 2024 (UTC)
- If you think this is an issue, then I would suggest you discuss at mw:Extension talk:SyntaxHighlight — Martin (MSGJ · talk) 07:00, 9 August 2024 (UTC)
Warnings
editI would like to add some prominent warnings when people try to use the |class=
parameter in a project banner instead of in the banner shell template
- If {{WikiProject banner shell}} is already on the page (but without a
|class=
parameter), then the message will say something like Please add the quality rating to the WikiProject banner shell instead of this project banner - If {{WikiProject banner shell}} is not on the page yet, then the message will say something like Please add the WikiProject banner shell template to this page and then add the quality rating to that template
I'm sure the wording could be improved. What do you think? — Martin (MSGJ · talk) 12:08, 10 June 2024 (UTC)
Please add {{WikiProject banner shell}} to this page and add the quality rating to it.
maybe something like this? Regardless, link the banner shell template. I'm in favor of the warning. Gonnym (talk) 21:38, 10 June 2024 (UTC)- Yep, probably a link a WP:PIQA somewhere in there too — Martin (MSGJ · talk) 21:39, 10 June 2024 (UTC)
- This should be expended to any parameter we migrate to the shell, like
|listas=
do deal with redundant, duplicate or conflicting data. Gonnym (talk) 16:20, 11 June 2024 (UTC)- This is now coded on the sandbox. Example of the first message can be seen at Module talk:WikiProject banner/testcases#Globally unassessed. the second message below — Martin (MSGJ · talk) 10:24, 3 July 2024 (UTC)
- This should be expended to any parameter we migrate to the shell, like
- Yep, probably a link a WP:PIQA somewhere in there too — Martin (MSGJ · talk) 21:39, 10 June 2024 (UTC)
Cycling B‑class | |||||||
|
Okay this is ready to go, but I will wait for Category:Pages using WikiProject banner shell without a project-independent quality rating (35) and Category:Articles with WikiProject banners but without a banner shell (198) to be emptied first to avoid ugly warnings on so many pages — Martin (MSGJ · talk) 09:35, 4 July 2024 (UTC)
- Note: this is now deployed — Martin (MSGJ · talk) 12:17, 16 August 2024 (UTC)
IM_TOPIC_CATEGORY may not be working in all cases
editThe documentation appears to say that |IM_TOPIC_CATEGORY=
should provide a default category for requested images or photographs. In {{WikiProject Fishes}}, |IM_TOPIC_CATEGORY=Wikipedia requested images of fish
. The category exists at Category:Wikipedia requested images of fish. Despite that looking correct to me, Talk:Bryconops sapezal uses that WikiProject template with |needs-image=yes
, and the incorrect Category:Wikipedia requested photographs of is added to the page. Can someone please troubleshoot or explain this apparent discrepancy? – Jonesey95 (talk) 23:07, 20 June 2024 (UTC)
- I have applied a fix, hopefully will be resolved now — Martin (MSGJ · talk) 06:50, 21 June 2024 (UTC)
Tracking category proposed
editThere is a proposal to track uses of WikiProject banners which are placed outside the banner shell. The coding might be complex but I think this would be really useful — Martin (MSGJ · talk) 17:38, 29 June 2024 (UTC)
- Originating discussion @ User talk:Kanashimi/Archive 1#Cewbot is moving WikiProject banners outside of WPBS. ~ Tom.Reding (talk ⋅dgaf) 18:12, 9 July 2024 (UTC)
- If there is such a tracking category, my bots will automatically repair them by default. Kanashimi (talk) 08:50, 10 July 2024 (UTC)
Redirects not being added to PIQA category
editI notice that on Talk:Mount Gorton (Mount Gorton redirects to Wilson Hills), all 3 WikiProjects are classified via 3 |class=Stub
, {{WPBS}} is not, and Talk:Mount Gorton is not added to Category:Pages using WikiProject banner shell without a project-independent quality rating (35). Could redirects be made to be included in the category, and eventually corrected? And any/all other page types also being omitted? ~ Tom.Reding (talk ⋅dgaf) 13:28, 1 July 2024 (UTC)
- It is not in that category because it is a redirect and doesn't need a quality rating. The
|class=stub
is just ignored on such pages. What needs to be corrected? — Martin (MSGJ · talk) 14:15, 1 July 2024 (UTC)- Since Talk:Mount Gorton refers to a redirect,
|class=Stub
should be removed from the 3 WikiProjects. - I see now that Pages using WikiProject banner shell without a project-independent quality rating is not an appropriate category name for such cases (as it implies they need a rating), but I still think it would be worth tracking these pages that use unnecessary quality ratings. ~ Tom.Reding (talk ⋅dgaf) 14:53, 1 July 2024 (UTC)
- In that case it should probably be in Category:WikiProject banners with redundant class parameter as the class stub is redundant (and incorrect, as redirects don't have ratings). Gonnym (talk) 15:01, 1 July 2024 (UTC)
- Perhaps we could rename to Category:WikiProject banners with ignored class parameter? — Martin (MSGJ · talk) 15:06, 1 July 2024 (UTC)
- "Redundant" seems most appropriate for proper articles which have a rating both inside a WikiProject and the shell.
- "Ignored" seems most appropriate for these redirects (and other similar pages) which have irrelevant class parameters. ~ Tom.Reding (talk ⋅dgaf) 15:15, 1 July 2024 (UTC)
- They are the same in that the class parameter may safely be removed without having any effect. Do we need two separate categories? — Martin (MSGJ · talk) 15:42, 1 July 2024 (UTC)
- With the speed at which these categories are being cleared, I'd say we don't. Less categories to watch. Gonnym (talk) 16:13, 1 July 2024 (UTC)
- The way that the pages in these 2 would-be categories are fixed is different. In 1, WPBS's
|class=
is kept. In the other, WPBS's|class=
, if found, is removed. Someone working on these categories in the future might not know to check the redirect-status of the page before proceeding, and perform the wrong operation. - But, if there is to be only 1 category to contain both of these cases, then I think "unnecessary" is better, as it can describe both "redundant" & "ignored" ~ Category:WikiProject banners with unnecessary class parameter. 2nd choice would be "ignored". With category text describing this distinction, regardless of the chosen descriptor. ~ Tom.Reding (talk ⋅dgaf) 16:27, 1 July 2024 (UTC)
- They are the same in that the class parameter may safely be removed without having any effect. Do we need two separate categories? — Martin (MSGJ · talk) 15:42, 1 July 2024 (UTC)
- Perhaps we could rename to Category:WikiProject banners with ignored class parameter? — Martin (MSGJ · talk) 15:06, 1 July 2024 (UTC)
- In that case it should probably be in Category:WikiProject banners with redundant class parameter as the class stub is redundant (and incorrect, as redirects don't have ratings). Gonnym (talk) 15:01, 1 July 2024 (UTC)
- Since Talk:Mount Gorton refers to a redirect,
Preview warning: unexpected parameter "attention"
editI'm getting a red warning saying, unexpected parameter "attention" while attempting the following:
{{WikiProject Intertranswiki/OKA|attention=yes}}
The interesting thing is, that in preview mode it is properly generating the notice with the diamond caution sign and "immediate attention needed", as well as displaying the name of the hidden attention-needed category in the footer that would be populated if I hit Publish, but all of that with the Preview error at the same time.
Not sure if it's relevant, but the PROJECT param is Intertranswiki/OKA task force
, and a couple of redirects are involved:
- the project page WP:WikiProject Intertranswiki/OKA task force is a redirect, pointing to WP:WikiProject Intertranswiki/OKA
- the template Template:WikiProject Intertranswiki/OKA task force is a redirect, targeting {{WikiProject Intertranswiki/OKA}}.
Have I bolloxed it all up with the redirects, somehow? Can someone help me understand what's going on? Mathglot (talk) 07:25, 2 July 2024 (UTC)
- Further data: I went ahead and saved the page with the Preview error anyway, at Draft talk:Contravention in French criminal law with the intention of pointing to the error here, but after publication the error was gone, and the banner message and hidden category look good. So far, so good; but
|attention=
is a valid parameter, so why does it say that it isn't in Preview? Preview mode still displays the error message now, if you edit it. Mathglot (talk) 07:36, 2 July 2024 (UTC) - It's because you did not define the
|BANNER_NAME=
parameter, and so it uses by default Template:WikiProject+PROJECT which in this case yields Template:WikiProject Intertranswiki/OKA task force which is not the template but a redirect. I have added|BANNER_NAME=
which I think has fixed it — Martin (MSGJ · talk) 08:07, 2 July 2024 (UTC)- MSGJ, Yes, it has! Thank you. Given the complexity of this Module, and the type of situations that might arise, I am considering adding a Troubleshooting section to the doc page, and this would be a good entry there. Or at least, where to look if you get that error message, would be a good start. Such a section might expand to cover other situations, as well. Thanks for your fixes to that template. Mathglot (talk) 10:35, 2 July 2024 (UTC)
- In general though, this error should be a very rare edge case, as task forces should not have standalone banners as they should use the one of the project they belong to. In this situation, there isn't a project one at this moment. Gonnym (talk) 10:57, 2 July 2024 (UTC)
- Gonnym, thank you for your comment I did notice that the module had params like
|tfN=
for handling task forces, and I wondered how to proceed with that, given that the parent WikiProject didn't have its own banner, so I did the best I could. What I'm hearing, is, maybe this is too rare a case to be worth writing up as a troubleshooting case, and I accept that. But, what is the right path forward, here? Should Intertranswiki have its own banner, and then */OKA would use the|tfN=
params? Or, is it good enough, the way things are, now? Mathglot (talk) 11:06, 2 July 2024 (UTC)- I think that if there are not going to be any other task forces needing one, then don't bother changing it as it's already working. If another task force will need one then yes, they should be combined into one template. Gonnym (talk) 11:09, 2 July 2024 (UTC)
- Gonnym, thank you for your comment I did notice that the module had params like
- In general though, this error should be a very rare edge case, as task forces should not have standalone banners as they should use the one of the project they belong to. In this situation, there isn't a project one at this moment. Gonnym (talk) 10:57, 2 July 2024 (UTC)
- MSGJ, Yes, it has! Thank you. Given the complexity of this Module, and the type of situations that might arise, I am considering adding a Troubleshooting section to the doc page, and this would be a good entry there. Or at least, where to look if you get that error message, would be a good start. Such a section might expand to cover other situations, as well. Thanks for your fixes to that template. Mathglot (talk) 10:35, 2 July 2024 (UTC)
Dark mode support
editI implemented dark mode support for the banners in these sandbox edits, without those on dark mode the banners are showing white text on light yellow background which is not great. The test cases seem good to me, but I would still appreciate a second set of eyes on the change before deploying it. Taavi (talk!) 22:20, 4 July 2024 (UTC)
- Also Done for the non-sandbox version. Taavi (talk!) 11:58, 7 July 2024 (UTC)
- Thanks. Maybe coordinate with User:Jdlrobson as he was working on this also — Martin (MSGJ · talk) 02:57, 8 July 2024 (UTC)
Military history articles with no associated task force
editCategory:Military history articles with no associated task force is full of articles from the Draft talk namespace. Could the module be adjusted to only add talk namespace articles to the category? Hawkeye7 (discuss) 02:46, 1 August 2024 (UTC)
- That isn't a module fix. You'll have to edit the note_2 of the banner itself. Gonnym (talk) 03:08, 1 August 2024 (UTC)
Urgent: Please fix this template for printed content Module:WikiProject banner/sandbox/styles.css.
editFirstly, apologies for writing in English if this is not your first language (this is an automated message).
This template has been detected as one of 436 pages using styles that break the page when printed when the user is using dark mode. The fix is very straightforward - all your styles relating to dark mode must be scoped to. Since there is a high risk of this templates being copied to other wikis it is important this notice is acted on ASAP.
To fix this:
- Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
- Wrap any styles relating to `html.skin-theme-clientpref-night` in `@media screen`
If this message has not been acted on in 7 days, this will be fixed by an automated script. Thank you for your help fixing this important issue.
For any questions feel free to ask them at phab:T369874.
Jon (WMF) (talk) 18:22, 2 August 2024 (UTC) on behalf of the web team.
- I've syncrhonised this sandbox with the live version, which should have fixed these issues. Gonnym: you may want to reapply your changes to the sandbox at some point — Martin (MSGJ · talk) 10:29, 6 August 2024 (UTC)
- I'll pass. Gonnym (talk) 10:31, 6 August 2024 (UTC)
- I've added back the css code to the styles sheet. Perhaps you wouldn't mind checking the code and making sure everything looks okay, and I will deploy — Martin (MSGJ · talk) 20:43, 11 August 2024 (UTC)
- The examples at Module talk:WikiProject banner/testcases look the same between the live and sandbox versions, so it seems so. The Class mask tests have some fails but I'm assuming that is from something else. Gonnym (talk) 21:03, 11 August 2024 (UTC)
- Yeah, the class mask tests were all copied from Template:Class mask and there have been many changes since then. So the tests are outdated and probably need removing. — Martin (MSGJ · talk) 08:37, 16 August 2024 (UTC)
- The examples at Module talk:WikiProject banner/testcases look the same between the live and sandbox versions, so it seems so. The Class mask tests have some fails but I'm assuming that is from something else. Gonnym (talk) 21:03, 11 August 2024 (UTC)
- I've added back the css code to the styles sheet. Perhaps you wouldn't mind checking the code and making sure everything looks okay, and I will deploy — Martin (MSGJ · talk) 20:43, 11 August 2024 (UTC)
- I'll pass. Gonnym (talk) 10:31, 6 August 2024 (UTC)
auto doc category
editCan |DOC=auto
also add the template to the project category? Either Category:WikiProject project
or Category:WikiProject project templates
category. Gonnym (talk) 11:27, 28 May 2024 (UTC)
- Don't see any reason not to do this. Will sort in the next couple of days — Martin (MSGJ · talk) 15:35, 2 June 2024 (UTC)
- Do you want it to check to see if
Category:WikiProject project templates
exists first. If so use it, otherwise useCategory:WikiProject project
? — Martin (MSGJ · talk) 08:24, 4 June 2024 (UTC)- Yes, I think it's best to place it in the templates category if it exists. Gonnym (talk) 08:30, 4 June 2024 (UTC)
- I agree. That is now coded in the sandbox, and will currently appear on sandbox templates for testing. When deployed it will only categorise the live templates. You can check Template:WikiProject Deaf/sandbox (which does not have a templates category) and Template:WikiProject Cycling/sandbox (which does have a templates category) — Martin (MSGJ · talk) 08:52, 4 June 2024 (UTC)
- Great, looks good! Gonnym (talk) 09:19, 4 June 2024 (UTC)
- I agree. That is now coded in the sandbox, and will currently appear on sandbox templates for testing. When deployed it will only categorise the live templates. You can check Template:WikiProject Deaf/sandbox (which does not have a templates category) and Template:WikiProject Cycling/sandbox (which does have a templates category) — Martin (MSGJ · talk) 08:52, 4 June 2024 (UTC)
- Yes, I think it's best to place it in the templates category if it exists. Gonnym (talk) 08:30, 4 June 2024 (UTC)
Gonnym there are about 80 templates (see Category:WikiProject banners with errors) which are not able to populate the project category, because it either doesn't exist or because it is a category redirect. Would you like to review these? — Martin (MSGJ · talk) 12:09, 10 August 2024 (UTC)
- Yeah I'm taking a look at these. So far some sent to CfD, RM, or MfD. Gonnym (talk) 12:20, 10 August 2024 (UTC)
- @MSGJ most of the GLAM sub projects have a category titled: Category:Wikipedia-<project name> collaboration" (such as Category:Wikipedia-Philadelphia Museum of Art collaboration). So a template like Template:WikiProject Philadelphia Museum of Art that has a
|PROJECT_LINK=Wikipedia:GLAM/Philadelphia Museum of Art
can be placed there. That should remove most pages in the category. Gonnym (talk) 11:35, 11 August 2024 (UTC)- Or we can just leave them to add the categories manually, as they are currently doing? When you are done reviewing those, I can turn off the tracking — Martin (MSGJ · talk) 20:00, 11 August 2024 (UTC)