Page MenuHomePhabricator

Deploy TemplateStyles on French Wikipedia on 2018-07-19
Closed, ResolvedPublic

Description

We quickly reached a community consensus to enable TemplateStyles in frwiki, according to
https://fr.wikipedia.org/w/index.php?title=Discussion_Projet:Modèle&oldid=147120453#Votes

There were no suggestions or criticisms reported by contributors! Thanks for the extension.

Details

Related Gerrit Patches:
operations/mediawiki-config : masterDeploy TemplateStyles to frwiki and zhwiki
operations/mediawiki-config : masterDeploy TemplateStyles to frwiki and zhwiki

Related Objects

StatusAssignedTask
OpenNone
OpenNone
ResolvedNone
DuplicateNone
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenNone
OpenNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
OpenNone
OpenNone
DeclinedNone
InvalidNone
OpenNone
OpenNone
ResolvedTheDJ
ResolvedTheDJ
InvalidNone
OpenNone
ResolvedTheDJ
OpenNone
ResolvedJdlrobson
OpenJdlrobson
OpenJdlrobson
ResolvedTgr
ResolvedTgr

Event Timeline

Lofhi created this task.Apr 4 2018, 5:41 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 4 2018, 5:41 PM
Lofhi triaged this task as Normal priority.Apr 4 2018, 5:42 PM
Thibaut120094 added a subscriber: Thibaut120094.
Zoranzoki21 changed the task status from Open to Stalled.Apr 4 2018, 6:51 PM
Zoranzoki21 claimed this task.
Zoranzoki21 moved this task from Up next to Doing on the TemplateStyles board.
Zoranzoki21 added a subscriber: Zoranzoki21.

Blocked on Tidy -> RemexHTML switch, see T133410#4009008.

But, I will make a patch for this.

Restricted Application added a project: User-Zoranzoki21. · View Herald TranscriptApr 4 2018, 6:51 PM

Change 416708 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[operations/mediawiki-config@master] Deploy TemplateStyles to frwiki and zhwiki

https://gerrit.wikimedia.org/r/416708

Deskana added a comment.EditedApr 6 2018, 10:36 AM

@Lofhi I'm so glad the French Wikipedians are interested in TemplateStyles!

As noted above, TemplateStyles can't be deployed until the RemexHtml migration is completed. If you'd like to help speed that up, I suggest reading the instructions for editors on how to help with the migration. If you can reduce the number of high priority lint errors, you can be switched over to Remex earlier, then TemplateStyles can be deployed. Don't be intimidated by the number of errors that are there, because many errors could come from templates that, if fixed, might resolve hundreds of errors all at once.

Thanks!

Nirmos added a subscriber: Nirmos.Apr 6 2018, 11:10 AM

This task is about French Wikipedia, but Deskana's link goes to French Wiktionary. Here's the relevant link: https://fr.wikipedia.org/wiki/Sp%C3%A9cial:LintErrors

This task is about French Wikipedia, but Deskana's link goes to French Wiktionary. Here's the relevant link: https://fr.wikipedia.org/wiki/Sp%C3%A9cial:LintErrors

Oops. Thanks!

Lofhi added a comment.Apr 8 2018, 1:04 PM

@Deskana We are aware of these problems and this background maintenance is already done by several contributors in the shadows. It'll take a little time...

@Deskana We are aware of these problems and this background maintenance is already done by several contributors in the shadows. It'll take a little time...

No problem! Sounds good to me. :-)

Framawiki added a subscriber: Framawiki.
ggellerman moved this task from Doing to Up next on the TemplateStyles board.May 8 2018, 6:20 PM
Ladsgroup changed the task status from Stalled to Open.Jul 11 2018, 3:06 PM
Ladsgroup added a subscriber: Ladsgroup.

Since Remex is now deployed on French Wikipedia.

Please read T197603#4297301 for relevant information.

Change 446586 had a related patch set uploaded (by Gergő Tisza; owner: Zoranzoki21):
[operations/mediawiki-config@master] Deploy TemplateStyles to frwiki and zhwiki

https://gerrit.wikimedia.org/r/446586

Deskana moved this task from Up next to Doing on the TemplateStyles board.Jul 18 2018, 2:12 PM

Change 416708 abandoned by Zoranzoki21:
Deploy TemplateStyles to frwiki and zhwiki

Reason:
Abandoning as per T199909

https://gerrit.wikimedia.org/r/416708

Change 416708 restored by Gergő Tisza:
Deploy TemplateStyles to frwiki and zhwiki

https://gerrit.wikimedia.org/r/416708

Change 416708 abandoned by Gergő Tisza:
Deploy TemplateStyles to frwiki and zhwiki

Reason:
looks like gerrit created a new version when I rebased this: https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/ /446586

https://gerrit.wikimedia.org/r/416708

Deskana renamed this task from Deploy TemplateStyles on French Wikipedia to Deploy TemplateStyles on French Wikipedia on 2018-07-19.Jul 19 2018, 9:42 AM
Deskana awarded a token.
Deskana reassigned this task from Zoranzoki21 to Tgr.Jul 19 2018, 9:44 AM
Deskana added a subscriber: Tgr.

Per the deployments calendar, @Tgr is handling this deployment.

Change 446586 merged by Gergő Tisza:
[operations/mediawiki-config@master] Deploy TemplateStyles to frwiki and zhwiki

https://gerrit.wikimedia.org/r/446586

Stashbot added a subscriber: Stashbot.

Mentioned in SAL (#wikimedia-operations) [2018-07-19T11:18:43Z] <tgr@deploy1001> Synchronized wmf-config/InitialiseSettings.php: enable TemplateStyles on enwiki, frwiki, zhwiki T197603 T191452 T189022 (duration: 00m 55s)

Deskana closed this task as Resolved.Jul 19 2018, 11:32 AM

Success! An announcement on the wiki is pending.

Deskana moved this task from Doing to Done on the TemplateStyles board.Jul 19 2018, 11:37 AM
Niridya removed a subscriber: Niridya.Jul 19 2018, 5:33 PM
Niridya added a subscriber: Niridya.
Lofhi added a comment.Jul 21 2018, 9:23 AM

Hi @Deskana, it's a little off topic, but I can't find an adequate answer.

While starting to clean Commons.css, one of the administrators wondered if TemplateStyles might extend the loading time (parsing, possible duplication, ...). Do we know if this has a negative impact on performance?

Also, I couldn't find anything about Lua. Is it recommended to add a templatestyles tag in the wikitext returned by a module?

That sounds like a good question for https://www.mediawiki.org/wiki/Extension_talk:TemplateStyles so someone else could also find it (as it's not directly related to deploying on French Wikipedia only what this task is about)?

Nirmos added a comment.EditedJul 21 2018, 11:26 AM

While starting to clean Commons.css, one of the administrators wondered if TemplateStyles might extend the loading time (parsing, possible duplication, ...). Do we know if this has a negative impact on performance?

See T185853. Even in the worst case scenario (i.e. in the migration period when styles in the MediaWiki namespace and styles from TemplateStyles are loaded at the same time) there was no measurable change in performance. In theory, TemplateStyles would be good for sparsely used templates, and bad for ubiquitous templates, but since we did not observe any such thing, my guess is that the amount of CSS that is local to a wiki is so small in proportion to the total amount of CSS. Unfortunately, I don't have any numbers to support that – it's just a gut feeling.

With regard to multiple invocations of the same template on the same page, the styles are deduplicated since T168333, although it's unclear if this was needed at all.

Also, I couldn't find anything about Lua. Is it recommended to add a templatestyles tag in the wikitext returned by a module?

It is possible to add a templatestyles tag in a Lua module, like this:

return frame:extensionTag( 'templatestyles', '', { src = 'Infobox/styles.css' } )

Or you can do it in wikitext:

<templatestyles src="Infobox/styles.css" />{{#invoke:infobox}}

It doesn't matter which one you choose. What does matter is that the templatestyles tag is added first, at the very top, otherwise you'll experience a FOUC.

Lofhi added a comment.Jul 21 2018, 5:35 PM

Thanks for the advice @Aklapper (I will avoid asking my questions here in the future) and thanks for the complete answer @Nirmos !

Od1n added a subscriber: Od1n.EditedJul 21 2018, 5:59 PM

Just to clarify, I was precisely concerned about TemplateStyles in small templates invoked many times. More precisely:

  • Server-side: all processing time for parsing, deduplicating, etc. (CPU/RAM usage)
  • Client-side (which I'm more worried about): cost of markup bloat with the numerous added <link> tags (page size, also CPU/RAM usage)

Compared to a simple, shared CSS ruleset, which is even cached by the client.