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.

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
ResolvedJdlrobson
DeclinedNone
DuplicateNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
DeclinedNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
Openbwang
Duplicateovasileva
ResolvedNone
OpenNone
OpenNone
ResolvedTheDJ
DeclinedNone
InvalidNone
OpenFeatureNone
InvalidNone
ResolvedTheDJ
ResolvedTheDJ
InvalidNone
ResolvedIzno
ResolvedTheDJ
OpenNone
ResolvedJdlrobson
DeclinedNone
ResolvedTgr
ResolvedTgr

Event Timeline

Lofhi triaged this task as Medium priority.Apr 4 2018, 5:42 PM
Kizule changed the task status from Open to Stalled.Apr 4 2018, 6:51 PM
Kizule claimed this task.
Kizule moved this task from Backlog to Doing on the TemplateStyles board.
Kizule subscribed.

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

But, I will make a patch for this.

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

@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!

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écial: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écial:LintErrors

Oops. Thanks!

@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. :-)

Ladsgroup changed the task status from Stalled to Open.Jul 11 2018, 3:06 PM
Ladsgroup subscribed.

Since Remex is now deployed on French Wikipedia.

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

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 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 subscribed.

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)

Success! An announcement on the wiki is pending.

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)?

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.

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

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.