MediaWiki talk:Common.css/Archives/2021

From Meta, a Wikimedia project coordination wiki

en-wp-boxes

FYI, MediaWiki wiki is removing the content from its version of mediawikiwiki:MediaWiki:Gadget-enwp-boxes.css while I'm working on TemplateStyling it. Editors here should consider moving/importing the styles of interest here instead of @importing. --Izno (talk) 16:52, 28 June 2021 (UTC)

en-wp-boxes

Restored from MediaWiki talk:Common.css/Archives/2021 § en-wp-boxes.

FYI, MediaWiki wiki is removing the content from its version of mediawikiwiki:MediaWiki:Gadget-enwp-boxes.css while I'm working on TemplateStyling it. Editors here should consider moving/importing the styles of interest here instead of @importing. --Izno (talk) 16:52, 28 June 2021 (UTC)

Hello @Izno: I've updated Module:Message box/ombox.css and Module:Message box/configuration for {{ombox}}. I'll be updating these from enwp if that's okay. —MarcoAurelio (talk) 10:38, 4 March 2023 (UTC)
Update requested at Module talk:Message box#Update request. I've imported the CSS styles from enwiki via transwiki import. —MarcoAurelio (talk) 11:59, 4 March 2023 (UTC)
@MarcoAurelio awesome! We have some things we will need to finish before removing the import (feel free to cross off anything you can do):
  1. Someone to do the copies there.
  2. An (interface) admin will need to add <div class="mw-parser-output"> ... </div> around the contents of these 80 MediaWiki space pages. Using AWB may be helpful.
  3. We will want to notify the JavaScript author/owner of User:Tks4Fish/contribsFooter.js. When I did rollout of hlist/styles.css on en.wp, I let the script authors know on their talk pages and suggested they pull the TemplateStyles page in as raw CSS content. Done.
  4. Copy-paste the remaining content in boxes.css that is unrelated to Module:Message box, which is just the minor non-content customizations from lines 283 to 296, with the exception of the div.locked-warning selector (which has no uses in code or otherwise). I think it makes more sense to do that than continue to import the full contents, and we can decide here if we want that CSS to remain. (I have no opinion.)
  5. Remove the import line.
I also found Template:Message, we might consider making that a passthrough for Template:Ambox. Izno (talk) 00:51, 5 March 2023 (UTC)
Hi @Izno - Thanks for the guidance:
  • As for #1 I'm sorry but I don't understand what needs to be copied or where :-) If you mean Module:Message box/ambox.css etc. these are all done.
  • As for #2, I'm pinging @Xaosflux since it seems it's what we did for Blockedtext but would it be possible to add the mw-parser-output class in the Template or Module itself to avoid having to add it manually every time?
  • As for #4 I think we can create a MediaWiki:Common.css/boxes.css subpage (or a different one) and store LL. 283-296. I agree that continue to import the whole CSS is not needed since each xxbox template will now be using its own TemplateStyles.
Best regards, —MarcoAurelio (talk) 10:33, 5 March 2023 (UTC)
As for #2, I’d be vary of adding it to the template/module – it would mean random <div class="mw-parser-output">s popping up on pages, which could confuse scripts and gadgets and break things that assume that the <table> is top-level in the template output (like the + rules in Module:Message box/ambox.css). However, 79 search results don’t mean 79 edits, there are some MediaWiki namespace pages that depend on the same template aimed specifically at MediaWiki messages (e.g. on Template:Abuse filter warning), and can be updated all in one. —Tacsipacsi (talk) 14:13, 5 March 2023 (UTC)
@Tacsipacsi: Makes sense. I've added the class to {{abuse filter warning}}. —MarcoAurelio (talk) 14:25, 5 March 2023 (UTC)
break things that assume that the <table> is top-level in the template output (like the + rules in Module:Message box/ambox.css). This change should have no impact on the TemplateStyles. I do know for a fact that making Message_box TemplateStyled impacted how EditProtectedHelper processed the page as well as a few other scripts, but those don't seem to be used here. Izno (talk) 20:31, 5 March 2023 (UTC)
  • #1, I was referencing that Module talk:Message box#Update request needs to be done, not that the TemplateStyles need to be pulled in.
  • #2, I added it in the MediaWiki wiki version of this module but only for {{fmbox}}, but I don't think it makes sense to do it there in general. Tacsipacsi points out how it can confuse scripts, but besides that, people put other kinds of mboxes in MediaWiki space. So it makes more sense from that perspective to add it to the relevant pages. As for where it should get added between templates that use Module:Message_box in MW space and directly in MediaWiki space, on en.wp I put it in the templates where I could, but I think it would be better to put it in MediaWiki space now for all of them. There was some discussion in phab:T329966 about it.

    That said, there are indeed not 80 edits to make if we put it in the templates or other things transcluded. a new search without abuse filter warning takes us down sub 60 and adding it to MediaWiki:Uploadtext would probably be another 10 off the list.

  • #4, I advocate against having a separate page. That causes a second network request (pre-HTTP3?), which slows down rendering, and wikis that do use @import don't realize that it is typically expensive in that way.
Izno (talk) 20:28, 5 March 2023 (UTC)
Having to wrap everything in manual "mw-parser-output" for messages is such a kludge, this really should get fixed upstream. — xaosflux Talk 11:43, 6 March 2023 (UTC)
@Xaosflux, the ticket linked discusses it. You're welcome to open a new one or add a comment there. It's a kludge no matter what, and while I think I prefer to put it on the software side, you've gotta convince 'them' I guess. Izno (talk) 18:05, 6 March 2023 (UTC)
Since uploading is restricted here to admins and uploaders I think I'll be skipping the Uploadtext/** messages. We could even consider deleting them as unused. —MarcoAurelio (talk) 11:45, 6 March 2023 (UTC)
Hello:
  • Template:Abuse filter warning is now wrapped so no need to wrap the MediaWiki:Abusefilter-.* messages as the template already has it.
  • MediaWiki:Uploadtext done as well. The subpages of it i.e. MediaWiki:Uploadtext/es just transclude the English one so no need to wrap these with the div I guess.
  • I've wrapped some Editnotices that I think are still in use, and left untouched others that I think are no longer needed.
  • And I think I've wrapped all locally customised MediaWiki messages too.
Please doublecheck so we can move to phase #2 :-)
@Izno: Would it work too if we added mw-parser-output to {{fmbox}} |class= parametre? e.g. {{fmbox|class=mw-parser-output|text=...}}?
Thanks, —MarcoAurelio (talk) 14:53, 6 March 2023 (UTC)
Yeah, I had meant to intimate just putting it in the 1 transcluded.
Double checks:
The rest look fine.
Would it work too if we added mw-parser-output to {{fmbox}} |class= parametre? No. mw-parser-output has to go around whatever is being styled. TemplateStyles works by prepending that class to everything you define in a TemplateStyles sheet, and then it uses the descendant combinator i.e. a space. Izno (talk) 19:17, 6 March 2023 (UTC)
Editnotice wrapped since I guess it'll be copied in 2024. As for the EventDataModels, I am unable to change its content model or edit it. I'll see if moving it around fixes the issue. —MarcoAurelio (talk) 21:17, 6 March 2023 (UTC)
Moving the page once and back worked. It's wikitext now, and can be editted. Wrapped as well. —MarcoAurelio (talk) 21:32, 6 March 2023 (UTC)
Aaand deleted! since the master page is gone since 2012. I should've checked before :-) —MarcoAurelio (talk) 21:36, 6 March 2023 (UTC)
┌─────────────────────────────────┘
Was working on messagebox, need these 4 pages converted to {{abuse filter warning}}, probably with |friendly=yes and then wrapped. Other than that, need to do items 1 and 4 above next. Izno (talk) 07:13, 7 March 2023 (UTC)
@Izno: Will do. I thought this was enough for {{abuse filter warning}}? I guess I'll have to do another round for MW messages using the template :-) —MarcoAurelio (talk) 14:31, 7 March 2023 (UTC)
Converted. —MarcoAurelio (talk) 19:59, 7 March 2023 (UTC)
Yes, you're right, you didn't need to add it to those 4 pages. Izno (talk) 20:02, 7 March 2023 (UTC)
I'll be able to do #1 and #4 after dinner if we're ready to go. —MarcoAurelio (talk) 20:05, 7 March 2023 (UTC)
Module:Message box & Module:Message box/configuration updated. —MarcoAurelio (talk) 22:15, 7 March 2023 (UTC)
Common.css imported too. —MarcoAurelio (talk) 22:23, 7 March 2023 (UTC)
Time to remove the import then! Izno (talk) 01:22, 8 March 2023 (UTC)
@Izno: Done. —MarcoAurelio (talk) 11:09, 8 March 2023 (UTC)
This section was archived on a request by: Izno (talk) 23:29, 8 March 2023 (UTC)