Jump to content

Module talk:WikiProject banner

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

To do adjustments

[edit]

I have made a few adjustments to the to do related code in /auxiliary/sandbox.

  1. Converted the presentational table to a more appropriate div.
  2. Use a dark mode token for the background.
  3. Removed support for setting custom styles. Template:WikiProject Freemasonry is the only project which uses them (TODO_STYLE TODO_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.

It looks like Module:WikiProject banner/templatepage needs removal of the parameters of interest. Izno (talk) 02:10, 5 February 2025 (UTC)[reply]

Great, thanks for the info. I can deal with /templatepage — Martin (MSGJ · talk) 18:15, 5 February 2025 (UTC)[reply]
@Izno there is a slight spacing inconsistency with the new divs, which you can observe on Template:WikiProject Japan/sandbox. Are you able to line up the text on the left and the [show] links on the right? — Martin (MSGJ · talk) 16:43, 22 March 2025 (UTC)[reply]
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)[reply]
Padding is always inside the border. The spacing outside the border is the margin. See The CSS Box Model. --Redrose64 🌹 (talk) 23:27, 22 March 2025 (UTC)[reply]
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)[reply]
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)[reply]
@Izno are you still interested in this? — Martin (MSGJ · talk) 20:48, 28 March 2025 (UTC)[reply]
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)[reply]
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)[reply]

NA class category warnings

[edit]

While processing a move request for Template:WikiProject Song Contests, and then updating the categories (for the first time), I was caught unaware of the changes to the NA-related categories, Wikipedia:Categories_for_discussion/Log/2024_December_7#Category:Category-Class_articles. This led to an eventual deletion of Category:NA-importance Song Contests articles and Category:NA-Class Song Contests articles as these became redirects to the now non-existent Eurovision categories.

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)[reply]

Yes I will update those, thanks for the reminder — Martin (MSGJ · talk) 10:41, 14 February 2025 (UTC)[reply]
 Done, finally got round to this — Martin (MSGJ · talk) 16:09, 22 March 2025 (UTC)[reply]

Pre-load templates

[edit]

We are still using the following templates:

and these are also using:

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)[reply]

 Done. I have moved the three preload templates to Template:WikiProject banner preload template and deleted all the rest which are no longer needed — Martin (MSGJ · talk) 18:14, 26 March 2025 (UTC)[reply]

Tidy up intersecting categories

[edit]

I am looking at tidying up the intersecting quality/importance categories and there seem to be 3 types:

— Martin (MSGJ · talk) 07:52, 2 April 2025 (UTC)[reply]

Misplaced banners by bot

[edit]

In January 2024 there was an error in the bot's code which resulted in edits like this. I suspect that most of these have now been fixed but I am still finding the occasional example. So I was wondering if there is a way we could track these. I think that every banner should be above the first h2 heading, so perhaps some pattern that checks whether the banner code is before the first instance of 2 equals signs (==) — Martin (MSGJ · talk) 08:01, 2 April 2025 (UTC)[reply]

Maybe similar code to Module:Is infobox in lead? Gonnym (talk) 08:45, 2 April 2025 (UTC)[reply]
Looks promising — Martin (MSGJ · talk) 09:37, 2 April 2025 (UTC)[reply]

Different shades of green

[edit]
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
WikiProject iconAviation B‑class
WikiProject iconThis article is within the scope of the Aviation WikiProject. If you would like to participate, please visit the project page, where you can join the project and see lists of open tasks and task forces. To use this banner, please see the full instructions.
BThis article has been rated as B-class on Wikipedia's content assessment scale.
B checklist

I am seeing two different shades of green when the B-checklist is used. I don't understand why because they are both using css class assess-b which is defined in Module:WikiProject banner/styles.css as DFFFBF. I believe this is the paler colour, so I'm not sure where the other green is being defined. — Martin (MSGJ · talk) 10:20, 1 May 2025 (UTC)[reply]

I see only one box with a green background above. Please link to an example page where this issue can be observed. My color picker tool is showing the one above as #DFFFBF. – Jonesey95 (talk) 17:14, 1 May 2025 (UTC)[reply]
I see two. The one preceding "This article has been rated as B-class on Wikipedia's content assessment scale." is of colour   (#dfffbf); the one preceding "This article has not yet been checked against the criteria for B-class status:" is of colour   (#b2ff66). They are distinctly different. --Redrose64 🌹 (talk) 20:57, 1 May 2025 (UTC)[reply]
That is weird because on my devices (and presumably Jonesey95's too) there is no background color for the "B" preceding "This article has not yet been checked against the criteria for B-class status:". To me it is   #f8eaba, the color of the rest of the banner. This is the case even with ?safemode=yes. I checked on Edge and Chrome on Windows, and Chrome on Android btw. CX Zoom[he/him] (let's talk • {CX}) 21:12, 1 May 2025 (UTC)[reply]
Well, that's what I get initially, using Firefox, but the green comes in after a fraction of a second. This is clearly a case of FOUC. --Redrose64 🌹 (talk) 22:04, 1 May 2025 (UTC)[reply]
Is it different when you are logged out? I do not get a background color behind the second B (with the magnifying glass). I checked in Firefox for Mac (logged in), Chrome for Mac (logged out, regular and dark mode), and Safari for Mac (logged out). I also do not see any evidence of a background color when I use Inspect elements in my browser tools. Is it possible that some of you have .css customizations applying this color? Or maybe a different skin? I am using the Vector 2022 skin. – Jonesey95 (talk) 23:09, 1 May 2025 (UTC)[reply]
Yes, it's different when logged out - both greens are shown at page load, there isn't even a flash of brown. --Redrose64 🌹 (talk) 16:29, 2 May 2025 (UTC)[reply]
All very strange. The magnifying glass background has always been green for me, on multiple browsers. But when I log out the background disappears. I do not see anything obvious in my personal CSS which could be causing this however. — Martin (MSGJ · talk) 10:08, 2 May 2025 (UTC)[reply]
Even stranger: I am seeing the second green background behind the magnifying glass today. I haven't restarted my computer or even my browser. What a strange situation. Anyway, if we changed that green to dfffbf, would that satisfy those of us who can see the two colors? – Jonesey95 (talk) 17:29, 2 May 2025 (UTC)[reply]
I think I figured out what may be happening. WOSlinker transcluded <templatestyles src="Module:Class/styles.css"/> in a comment below, so when the module asks for the assess-b class, that class is now available to me. So I tentatively conclude: the banner is using two different classes, which are pulling colors from two different style sheets when they are available. The fix may be to make the banner module use the same class (probably class-b) for both backgrounds. – Jonesey95 (talk) 17:46, 2 May 2025 (UTC)[reply]
 Fixed, I think, with this edit. – Jonesey95 (talk) 17:50, 2 May 2025 (UTC)[reply]
Yup, even I was able to see the darker green color as of late. After your edit, I see the same color for both B's in the template. What I still do not understand is why the css was behaving differently for some of us, and differently for the rest yesterday. CX Zoom[he/him] (let's talk • {CX}) 18:09, 2 May 2025 (UTC)[reply]
As I used to tell my customers when was a person who fixed computers: "I just fix things. Answering 'why' questions is a job for philosophers." – Jonesey95 (talk) 18:23, 2 May 2025 (UTC)[reply]
A search over Template & Module namespaces show that   #b2ff66 is the colour defined for B-Class at Module:Class/definition.json and Module:Class/styles.css. Where or why is it being called by the banner, I have no idea. CX Zoom[he/him] (let's talk • {CX}) 22:15, 1 May 2025 (UTC)[reply]
Here's a possibly helpful set of search results. – Jonesey95 (talk) 23:13, 1 May 2025 (UTC)[reply]
Maybe this is the reason. Module:Class uses the assess-b class with css at Module:Class/styles.css and Module:WikiProject banner uses the class-b class with css at Module:WikiProject banner/styles.css. -- WOSlinker (talk) 12:44, 2 May 2025 (UTC)[reply]
I didn't think we were using Module:Class or Module:Class/styles.css anymore, but perhaps I'm wrong — Martin (MSGJ · talk) 14:28, 2 May 2025 (UTC)[reply]
When I am editing this talk page section and I pop open "Templates used in this section:", I see Module:Class/styles.css. That page is transcluded in 43K pages. We could change the B-class color there to #DFFFBF and see if anyone complains. – Jonesey95 (talk) 17:29, 2 May 2025 (UTC)[reply]
It's not just the B class that is a different shade when comparing those two css files. -- WOSlinker (talk) 17:48, 2 May 2025 (UTC)[reply]
If I remember correctly, the colors defined at Module:Class/definition.json were initially used for WP banners during the massive overhaul 2 years ago. There were complaints that these bright colors stand out too much and cause distraction to editors. Eventually, it was agreed to use a lighter pastel-like palette for all classes. CX Zoom[he/him] (let's talk • {CX}) 18:06, 2 May 2025 (UTC)[reply]