Module talk:WikiProject banner

Dark mode changes

edit

This sheet declares many background colors without declaring corresponding colors, which may cause issues in dark mode, per mw:Recommendations for night mode compatibility on Wikimedia wikis. Explicitly declaring a color any time there is a background color declared is the easiest way to resolve this issue. I don't have specific recommendations, because different color specifications work differently in context (sometimes color:inherit works well; other times you need color:black or the color-base token). background-color: transparent; should be removed entirely.

Most of the dark mode Linter issues in Talk space that are caused from inside templates are caused by {{WikiProject banner shell}}, and at least some of those errors are likely to be coming from this style sheet. There are related modules and style sheets that need similar fixes, such as Module:WikiProject banner/auxiliary and Module:WikiProject banner/config, if you want to really tidy up. I am not claiming that any of these missing color declarations cause actual dark mode display issues, but having these instances cluttering up the list of issues makes it harder to find the actual problem cases. – Jonesey95 (talk) 18:12, 16 February 2026 (UTC)Reply

Please can you put suggested changes in Module:WikiProject banner/sandbox/styles.css and any other relevant sandboxes?  Martin (MSGJ · talk) 19:00, 16 February 2026 (UTC)Reply
I have adjusted Module:WikiProject banner/sandbox/styles.css, Module:WikiProject banner/auxiliary/sandbox, and Module:WikiProject banner/config/sandbox. I added "color:black" as the simplest possible change, and because it often works (and a more complex color specification where "black" was not appropriate). This change will require testing in testcases, viewed in dark mode. I suspect that there are additional instances of background-color being set without color in this family of templates and modules, but this will be a start. – Jonesey95 (talk) 19:10, 16 February 2026 (UTC)Reply
Testcase feedback:
In sum, I don't see any issues caused by my changes, at least on testcases pages, but I have found and fixed some actual dark mode issues that may or may not be called out by the Linter. – Jonesey95 (talk) 19:35, 16 February 2026 (UTC)Reply
I'm working on this black text issue and continuing testing. I will reactivate this request when I think that I have made net improvements with no noticeable bugs. I'm sure there will be issues, due to the complexity of the template system here, but given that the existing templates have dark mode problems, I think that these edits will be an improvement overall. – Jonesey95 (talk) 20:08, 16 February 2026 (UTC)Reply
OK, I think I'm happy with these changes now. I think that I have improved the performance of these templates in dark mode while also removing Linter issues. Again, I expect that resolving this batch of widespread issues of not explicitly defining colors will reveal a few more subtle issues in template and module subpages, but I won't be able to see them in affected pages until these changes are implemented. You can expect a second edit request at some point. – Jonesey95 (talk) 20:15, 16 February 2026 (UTC)Reply
The diffs are here for Module:WikiProject banner/sandbox/styles.css, here for Module:WikiProject banner/auxiliary/sandbox, and here for Module:WikiProject banner/config/sandbox. – Jonesey95 (talk) 22:28, 16 February 2026 (UTC)Reply
Not sure the change to /config/sandbox will have the effect you desire, because there is no use of that "colour" index  Martin (MSGJ · talk) 03:50, 17 February 2026 (UTC)Reply
Feel free to proceed without it. I will analyze the resulting transclusions to try to narrow down where the remaining actual problems are. – Jonesey95 (talk) 06:36, 17 February 2026 (UTC)Reply
If you're looking for places where changes will actually be applied, here's an example: at Talk:Ada (programming language), we use {{WikiProject United States}}, which contains a #FFE7FF box that uses a background color without an explicit color. That appears to be causing the Linter error for that talk page, and applying Module:WikiProject banner/sandbox/styles.css appears to fix the error. The same situation applies at Talk:List of airports in Moldova, with {{WikiProject Aviation}}. – Jonesey95 (talk) 07:00, 17 February 2026 (UTC)Reply

 Done /styles and /auxiliary  Martin (MSGJ · talk) 09:46, 17 February 2026 (UTC)Reply

Thank you. That was successful, as far as I can tell. – Jonesey95 (talk) 15:57, 17 February 2026 (UTC)Reply

Next round of changes

edit

MSGJ, when you have a moment, I figured out how to pass the color from /config/sandbox. It resolves a missing color in the box to the left of "This article has failed an A-Class review" at Template:WikiProject Military history/testcases and will fix that same error in many WP Military History template transclusions. The live templates apply only a CSS background to the blue box, and the sandbox templates also apply the needed color (even though it is not used, it silences the Linter, allowing us to clear away chaff from the issue list and find real problems). Here are the diffs: Module:WikiProject banner/auxiliary/sandbox (note the comment that needs to be applied; there is just one actual new line of code); Module:WikiProject banner/config/sandbox; Module:WikiProject banner/sandbox (again, note the comment; there is just one new line of code to be applied). – Jonesey95 (talk) 15:57, 17 February 2026 (UTC)Reply

Would it be better to move these styles into the stylesheet?  Martin (MSGJ · talk) 16:00, 17 February 2026 (UTC)Reply
Perhaps. I'm not well versed in style sheets. – Jonesey95 (talk) 21:28, 17 February 2026 (UTC)Reply
Module:WikiProject banner/sandbox/styles.css is a style sheet. --Redrose64 🌹 (talk) 13:36, 18 February 2026 (UTC)Reply
I know what they are, but I don't know how to apply the necessary changes to the style sheets such that they are referenced by the modules correctly. – Jonesey95 (talk) 15:12, 18 February 2026 (UTC)Reply
I am hopeful that someone is willing to implement the above changes without letting the perfect be the enemy of the good. If someone else wants to make subsequent changes to move some of the module code to style sheets, that would be great. I do suspect that further changes will be needed to fix dark mode issues with these templates, so maybe its better to postpone a style sheet conversion until all of the quirks are worked out. – Jonesey95 (talk) 17:15, 21 February 2026 (UTC)Reply
Will sort this tomorrow unless someone gets it done before me  Martin (MSGJ · talk) 21:57, 1 March 2026 (UTC)Reply
Okay  Done  Martin (MSGJ · talk) 22:27, 2 March 2026 (UTC)Reply
Thanks for following up. – Jonesey95 (talk) 22:32, 2 March 2026 (UTC)Reply

WikiProjects are now non-autocollapsed

edit

Every Special:Random/Talk with WikiProjects is now uncollapsing the projects. Tbhotch (CC BY-SA 4.0) 17:46, 5 March 2026 (UTC)Reply

This is because all user-editable JS (which I think includes everything being autocollapsed) was disabled due to a security issue. See phab:T419154 * Pppery * it has begun... 19:02, 5 March 2026 (UTC)Reply
I don't see the issue described by Tbhotch: WikiProject banners are collapsed for me. What I do know is that user .js (JavaScript) pages (such as User:Tbhotch/common.js, User:Tbhotch/twinkleoptions.js and User:Tbhotch/vector.js) are presently disabled, but JavaScript loaded from Preferences Gadgets seems to be unaffected. --Redrose64 🌹 (talk) 20:22, 5 March 2026 (UTC)Reply
The issue is now resolved. Tbhotch (CC BY-SA 4.0) 03:10, 6 March 2026 (UTC)Reply

DOC=auto parameter order

edit

Could the parameter order for automatic documentation be made to match {{WikiProject Biography}}: {{WikiProject banner shell|blp=yes|class=|listas=|?

|DOC=auto currently produces: {{WikiProject banner shell |class= |listas= |blp= | @ Template:WikiProject Human rights#Full usage.

{{WikiProject Biography}}'s order is preferred because |listas= is the parameter with the longest values, so |listas= should be at the end, and |blp= is the most important parameter, so |blp= should be at the front.   ~ Tom.Reding (talkdgaf)  10:56, 9 March 2026 (UTC)Reply

Can do, that makes sense  Martin (MSGJ · talk) 11:12, 9 March 2026 (UTC)Reply

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