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. |
PROJECT_STATUS parameter
The module currently has an undocumented parameter for the status of a project, which will add a CSS class to the outer table. For example if you set |PROJECT_STATUS=semiactive
then it will add class="semi-active-project"
. Does anyone know if this has any purpose or is used by any tools? It either needs documenting properly or removing — Martin (MSGJ · talk) 11:53, 24 April 2024 (UTC)
- The rendering of the banner changes also, see uses. Izno (talk) 16:45, 25 April 2024 (UTC)
- The rendering of inactive banners is not triggered by the PROJECT_STATUS parameter. It's produced by a different ("inactive") function of the module — Martin (MSGJ · talk) 08:58, 26 April 2024 (UTC)
- This parameter was added in 2021 after this request by User:MJL. The rationale given was "The change adds a new class to the banner which would allow users to hide inactive WikiProject at their own discretion". — Martin (MSGJ · talk) 09:01, 26 April 2024 (UTC)
Here are my thoughts:
- It is understandable that some editors wish to hide inactive banners, and the
inactive-project
class should continue to be applied to inactive banners. - I do not see the value of
active-project
orsemi-active-project
and I don't believe anyone is using these. - The
|PROJECT_STATUS=
parameter can be dropped from active project banners - For inactive banners, there may be some utility in allowing
|PROJECT_STATUS=defunct
to be defined instead of the default|PROJECT_STATUS=inactive
. So this parameter should continue to be supported for inactive banners. - Other statuses listed at Wikipedia:Inactive WikiProjects such as "dormant", "revivable", "dead", "stillborn" will not be supported unless there is a specific request for this.
— Martin (MSGJ · talk) 11:16, 29 April 2024 (UTC)
- @MSGJ: I'd agree with what you've laid out there. –MJL ‐Talk‐☖ 18:30, 29 April 2024 (UTC)
- Out of interest, did you use personal CSS to hide these banners, or are you aware of users who have done so? — Martin (MSGJ · talk) 20:27, 29 April 2024 (UTC)
Done — Martin (MSGJ · talk) 11:20, 9 May 2024 (UTC)
Classifying subpages in main talk
All pages not in article space are automatically detected as being non-articles. But Gonnym pointed out that we have some subpages in Main talk space (e.g. Talk:Multiverse (Marvel Cinematic Universe)/FAQ) which should also be classified as non-articles. The types I have seen are FAQ pages like the above, or talk archive pages. It is not clear how we should classify them (e.g. Project-class) or just use the default NA-class for these types of page. Does anyone have any opinion? — Martin (MSGJ · talk) 17:50, 6 May 2024 (UTC)
- I'd say that talk archive can be NA like regular talk. /FAQ (and maybe /GA) ideally should be project but if that is an issue then NA can work also (or allow manual override with the normal class parameter). Gonnym (talk) 08:15, 7 May 2024 (UTC)
- I think I would prefer to treat all these subpages in the same way, rather that try to guess what they are based on the name of the page — Martin (MSGJ · talk) 11:10, 7 May 2024 (UTC)
Moving notes to banner shell
There is some talk on Template talk:WikiProject banner shell about moving certain commonly used notes (e.g. attention needed, infobox needed, image needed) to the banner shell, to avoid multiple projects having to replicate the same parameter. Any comments over there please — Martin (MSGJ · talk) 15:09, 21 May 2024 (UTC)
Outdated code/hooks
I am working through the remaining templates using the old hooks.
- Template:WikiProject Australian Roads -
Done
- Template:WikiProject Indian roads -
Done
- Template:WikiProject U.S. Roads - tricky
- Template:WikiProject Figure Skating/A-Class review -
Done
- Template:WikiProject Military history/aclass (and /sandbox) -
Done
- Template:WikiProject Pirate Politics -
Done
- Template:WikiProject The Beatles/sandbox -
Done
If anyone knows of any more please add to the list — Martin (MSGJ · talk) 15:29, 23 May 2024 (UTC)
- insource:"WPBannerMeta/hooks/" shows that hooks are used at Template:WikiProject Figure Skating/A-Class review, Template:WikiProject Military history/aclass (and /sandbox), Template:WikiProject Pirate Politics, and Template:WikiProject The Beatles/sandbox. Gonnym (talk) 11:33, 28 May 2024 (UTC)
- Thanks, I'll look at those — Martin (MSGJ · talk) 15:34, 2 June 2024 (UTC)
auto doc category
Can |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)
Template:WikiProject United States
Hi, the template is populating Category:Pages with script errors, and it only displays the following message:
"The time allocated for running scripts has expired. The time allocated for running scripts has expired."
I don't know how to fix this, please help, thanks!! --Funandtrvl (talk) 17:00, 2 June 2024 (UTC)
- Please can you provide an example of a page with a script error — Martin (MSGJ · talk) 08:21, 4 June 2024 (UTC)
- @Funandtrvl — Martin (MSGJ · talk) 21:19, 6 June 2024 (UTC)
- Hi, the problem fixed itself after a few hours. Thank you! --Funandtrvl (talk) 01:01, 8 June 2024 (UTC)
Syntax highlighting in automatic documentation
Could 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)
- Compare this:
A-class review tweaks
I have made some small changes to Module:WikiProject banner/config/sandbox and Module:WikiProject banner/auxiliary/sandbox to allow me to stop using custom code at Template:WikiProject Military history/aclass. The only differences is that |A-class=kept
and |A-class=keep
and treated the same as |A-class=pass
, and |A-class=demote
and |A-class=demoted
are treated the same as |A-class=fail
— Martin (MSGJ · talk) 12:03, 10 June 2024 (UTC)
- Deployed — Martin (MSGJ · talk) 21:34, 10 June 2024 (UTC)
Warnings
I 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)Please add
{{WikiProject banner shell}}
to this page and add the quality rating to that template instead of this project banner. See WP:PIQA for details.Cycling Template‑class This module is within the scope of WikiProject Cycling, a collaborative effort to improve the coverage of cycling on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. Template This module does not require a rating on Wikipedia's content assessment scale.
- 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)
Okay this is ready to go, but I will wait for Category:Pages using WikiProject banner shell without a project-independent quality rating (41) and Category:Articles with WikiProject banners but without a banner shell (404) to be emptied first to avoid ugly warnings on so many pages — Martin (MSGJ · talk) 09:35, 4 July 2024 (UTC)
Styles
@Gonnym: regading this edit, are you able to make the corresponding changes to Module:WikiProject banner/sandbox/styles.css? — Martin (MSGJ · talk) 13:25, 12 June 2024 (UTC)
- I have very basic skills in CSS. @Izno can you help with this? Gonnym (talk) 17:02, 12 June 2024 (UTC)
- I am happy to walk you through it; this task is a bit easier than poofing CSS out of thin air. The basic gist of what needs to be done here is:
- See if there's a class some CSS can be attached to. The presence of
addClass
will usually make that obvious.- If no, add a class (
addClass
). - If yes, check to see if the uses in the generating module all need that particular CSS. If yes, proceed to 2. If no, add a specific class to that specific element to support the new CSS.
- If no, add a class (
- Move the CSS to the sheet.
- See if there's a class some CSS can be attached to. The presence of
- I know you've done this before with ib-tv-episode. :P Izno (talk) 20:37, 12 June 2024 (UTC)
- I am happy to walk you through it; this task is a bit easier than poofing CSS out of thin air. The basic gist of what needs to be done here is:
IM_TOPIC_CATEGORY may not be working in all cases
The 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
There 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)
Redirects not being added to PIQA category
I 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 (41). 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"
I'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
I 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)