Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module talk:WikiProject banner

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

IMAGE_LEFT_CLASS may be needed

[edit]

Please see this edit, which hacked in a class for the IMAGE_LEFT image so that the image would show correctly in dark mode (white on black instead of the previous black on black). It points out the potential need for IMAGE_LEFT_CLASS, and maybe some other image CLASS parameters, in this module/template. – Jonesey95 (talk) 19:38, 25 May 2026 (UTC)Reply

@Jonesey95:  Implemented in the sandbox as |IMAGE_LEFT_CLASS=, |IMAGE_RIGHT_CLASS=, and |IMAGE_CLASS=. The first two override the third (which applies to both RIGHT and LEFT). Tested at Module talk:WikiProject banner/testcases#Image class.
To the closing admin --- please copy the sandbox to main, being careful to comment out the sandbox at line 3.
hike395 (talk) 18:49, 27 May 2026 (UTC)Reply
 Done * Pppery * in solidarity 16:18, 28 May 2026 (UTC)Reply

DOC=auto parameter syntax highlighting

[edit]

I created {{para2}} to apply <syntaxhighlight lang="wikitext">-style highlighting to standalone parameters. It's a very simplified version of {{para}} without all the bells & whistles. Its uses are {{para2|foo}} and {{para2|foo|bar}} only, which create |foo= and |foo=bar, respectively, which cover 98%[citation needed] of all use cases. Assuming {{para2}} covers all cases used by Module:WikiProject banner, the only line that needs to be changed appears to be line #13, from this:

return frame:expandTemplate{title='para', args={parameter, value or ''}}

to this:

return frame:expandTemplate{title='para2', args={parameter, value or ''}}

~ Tom.Reding (talkdgaf)  11:09, 8 June 2026 (UTC)Reply

What is the benefit?  Martin (MSGJ · talk) 12:28, 8 June 2026 (UTC)Reply
For formatting consistency with sections using <syntaxhighlight lang="wikitext">:
{{para|foo|bar}} displays as |foo=bar (current)
{{para2|foo|bar}} displays as |foo=bar (proposed).   ~ Tom.Reding (talkdgaf)  13:02, 8 June 2026 (UTC)Reply
Got it. Why not add that feature to {{para}}?  Martin (MSGJ · talk) 13:04, 8 June 2026 (UTC)Reply
That was proposed 2 years ago @ Template talk:Parameter#How to syntaxhighlight a standalone parameter?, but rejected due to dark mode incompatibilities, presumably on non-doc pages due to the absence of a non-white background on non-doc pages. See that discussion for more detail and a more accurate interpretation. One of the 2 associated phab tickets is still open.   ~ Tom.Reding (talkdgaf)  13:13, 8 June 2026 (UTC)Reply
Why would para2 not suffer the same problems in dark mode? And have you seen the comment from FaviFake on that page?  Martin (MSGJ · talk) 07:43, 9 June 2026 (UTC)Reply
Re: dark mode: because para2 would only be used where it isn't a problem, i.e. on documentation pages, and I don't see syntaxhighlight disappearing.
Re: FaviFake: I've responded @ Template talk:Parameter#para2.   ~ Tom.Reding (talkdgaf)  10:56, 9 June 2026 (UTC)Reply
I've added it to the sandbox, but not totally convinced this is beneificial. I think for a block of code the coloring is helpful, but for a single parameter it seems unnecessary. Compare examples below  Martin (MSGJ · talk) 10:07, 12 June 2026 (UTC)Reply

Current

[edit]

Proposed

[edit]

This request is to modify the |DOC=auto portion only. I was not aware of any |para= usages outside of the documentation, so if isolating /doc usage only is difficult, then it might not be worth it.
Documentation is improved by |para2= usage in my option, for example in Module:WikiProject banner#Custom masks.   ~ Tom.Reding (talkdgaf)  10:55, 12 June 2026 (UTC)Reply

Okay so you probably want to edit Module:WikiProject banner/templatepage#L-288 instead  Martin (MSGJ · talk) 11:50, 12 June 2026 (UTC)Reply
Thanks for the pointer, but I don't know how to do that there.   ~ Tom.Reding (talkdgaf)  22:16, 12 June 2026 (UTC)Reply
Please check Template:WikiProject Christianity/sandbox#Parameters and see if it looks good?  Martin (MSGJ · talk) 12:29, 17 June 2026 (UTC)Reply
That looks nice. It still looks like all instances of "based on the |class= parameter" need to converted to "based on the |class= parameter".
FYI there is a merger discussion for {{Parameter2}} into {{Parameter}} happening here. That happened much more quickly than I was expecting.   ~ Tom.Reding (talkdgaf)  13:26, 17 June 2026 (UTC)Reply
How's that looking now?  Martin (MSGJ · talk) 14:01, 17 June 2026 (UTC)Reply
Great!   ~ Tom.Reding (talkdgaf)  14:04, 17 June 2026 (UTC)Reply
 Done. Will likely need updating once the merge has completed  Martin (MSGJ · talk) 14:16, 17 June 2026 (UTC)Reply

"MAIN_CAT" and config "category" apparent discrepancy

[edit]

The documentation says that MAIN_CAT applies the category to "all pages displaying the template", and also says that category on a config page applies to "all articles" (implying article space only, but MAIN_CAT applies to all pages, and this template is placed on talk pages and does not categorize article pages). Is this an error in the documentation? I ask because of this request to apply Category:WikiProject Ice Hockey articles to {{WikiProject Ice Hockey}}. Is there a way to limit categorization to just article talk pages? – Jonesey95 (talk) 18:35, 20 June 2026 (UTC)Reply

The main cat should be for every single page that is tagged by the banner. That shouldn't change. The sub-categories at Category:Ice Hockey articles by quality (the ones with the actual rating) are the ones that limit to only article pages. What should perhaps change wiki-wide (but will be a pain) is the naming convention we use for the meta-categories that hold both articles and non-articles. Gonnym (talk) 03:41, 21 June 2026 (UTC)Reply
OK, I have adjusted the documentation accordingly. The category name is still inaccurate, but it seems to match the other subcategories of Category:Articles by WikiProject. Fixing the names of all of those categories looks like a fun project for someone who is not me. – Jonesey95 (talk) 06:36, 21 June 2026 (UTC)Reply

Protected edit request on 15 July 2026

[edit]

As a follow-up to recent changes related to image CSS classes, please apply Special:Diff/1356645927/1364186968 Special:Diff/1356645927/1364427602 (new, better diff —⁠andrybak (talk) 13:08, 16 July 2026 (UTC)) to:Reply

  1. Remove unused function display_error. Last usage of it was removed in Special:Diff/1317754418.
  2. Remove unused local variable template_outside_shell. It has been unused since its introduction in Special:Diff/1247210025.
  3. Pass args.IMAGE_LEFT_CLASS or args.IMAGE_CLASS as fifth parameter (class) into the image function for the nested banner case. This fixes images of collapsed nested WikiProject banners, which pass |IMAGE_LEFT_CLASS=skin-invert to the module.

Thanks. —⁠andrybak (talk) 01:34, 15 July 2026 (UTC)Reply

All changes look good to me. Thanks for your attention  Martin (MSGJ · talk) 07:35, 15 July 2026 (UTC)Reply
In the meantime, I stumbled upon another affected template – {{WikiProject Infoboxes}}. Icon for uncollapsed mode is inverted, but nested/collapsed on the talk page is not inverted. —⁠andrybak (talk) 03:21, 16 July 2026 (UTC)Reply
Found another place in the module, where an image class isn't applied – "note images" that are gathered into nested_ratings.
I changed the diff link above to the new diff with the fix and with formatting changes by MSGJ. —⁠andrybak (talk) 13:08, 16 July 2026 (UTC)Reply
 Done  Martin (MSGJ · talk) 14:21, 17 July 2026 (UTC)Reply