Page MenuHomePhabricator

Deploy TemplateStyles to WMF production
Closed, ResolvedPublic

Assigned To
Authored By
Jdforrester-WMF
Apr 22 2016, 5:46 PM
Referenced Files
None
Tokens
"Party Time" token, awarded by Elitre."Love" token, awarded by Isarra."Orange Medal" token, awarded by Krinkle."Love" token, awarded by MichaelSchoenitzer."Burninate" token, awarded by MartinK."Love" token, awarded by He7d3r."Love" token, awarded by Liuxinyu970226."Love" token, awarded by Harej.

Description

Deploying TemplateStyles to production would give a lot more power to our template editors to create experiences that are optimised for mobile.
See the subtasks for the various things that need to be resolved before this work can be finalised.

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
ResolvedJdlrobson
DeclinedNone
DuplicateNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
DeclinedNone
ResolvedJdlrobson
DuplicateNone
DuplicateNone
ResolvedNone
OpenNone
OpenNone
ResolvedTheDJ
DeclinedNone
InvalidNone
OpenFeatureNone
InvalidNone
ResolvedTheDJ
ResolvedTheDJ
InvalidNone
ResolvedIzno
ResolvedTheDJ
OpenNone
ResolvedJdlrobson
Openovasileva
DeclinedNone
ResolvedTgr
ResolvedAnomie
Resolvedtstarling
Resolvedcoren
ResolvedAnomie
DeclinedBUG REPORTNone
ResolvedAnomie
ResolvedEsanders
ResolvedEsanders
Resolvedssastry
ResolvedAnomie
ResolvedCKoerner_WMF
Resolvedjhsoby
ResolvedTgr
DeclinedTgr
Resolvedcoren
ResolvedAnomie
ResolvedTgr
DeclinedNone
Resolvedssastry
ResolvedTgr
ResolvedTgr
ResolvedTgr
Resolved Deskana
ResolvedCKoerner_WMF
Resolved Whatamidoing-WMF
ResolvedTgr
ResolvedTgr
ResolvedTgr
ResolvedUrbanecm
ResolvedTgr
ResolvedTacsipacsi
ResolvedTgr
ResolvedCKoerner_WMF

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Sorry for taking so long on this :( Somehow it managed to be #2 on my todo list for a very long time, with various other things always taking priority.

I still think T176269 is a bad idea and should be declined.

I don't have much opinion on the idea itself either way but after trying to do the implementation I think I agree it would be better to go without it. I don't see a way to do it without interacting with parser frames which are entirely undocumented and one of the more complex parts of the MediaWiki codebase, so depending on them would probably make a deployment more risky, not less.

I don't want deployment of TemplateStyles to be a moving target—as it has been for many months—so I'm going to stick to the plan to deploy to only svwiki as the first phase.

Well, that's disappointing.

Why would including any others that pile up make it any worse, though?

As @Anomie noted there, T186965: Output HTML should not contain `<p><style>...</style></p>` is fixed (or will be once the patch is merged) for wikis using Remex but not for ones using Tidy (there a <templatestyles> tag in the middle of a paragraph will break it into two paragraphs), so switching to Remex should be a blocker for deploying TemplateStyles. (Tracking task: T175706: Progressively switch Wikimedia wikis from Tidy to RemexHTML. Search for wgTidyConfig here to see the current state; the ones with a null line still use Tidy.) Swedish and Russian have already switched so this has no immediate impact on plans.

This comment was removed by Anomie.

Quick overview of the open technical tasks:

  • On Parsoid (currently this means VE, Flow, the mobile apps and whatever third parties use the REST API) if the <templatestyles/> tag is on its own line it will result in an empty paragraph (and consequently weird spacing). Needs a Parsoid change; would be nice to get it fixed.

That depends on the specific styles that apply to <p> tags. In Firefox 52.6.0 the <p> tag in question seems to collapse to 0 height in all skins on enwiki in a simple test, no weird spacing observed.

That depends. Try something like this:

<div style="height:10px; border:1px solid black;"></div>
<p></p>
<div style="height:10px; border:1px solid black;"></div>

The two divs should touch but won't.

A <p> with no content adds an empty box with 14px margin (on Vector, anyway); if the neighboring elements have at least that much margin (e.g. they are also paragraphs) the margins will collapse and there will be no change at all. Otherwise there will be some extra empty space.

Certainly a very fringe problem though.

Hi,
happy holidays! I have question. How to we fix tags so migration can be faster?

As @Anomie noted there, T186965: Output HTML should not contain `<p><style>...</style></p>` is fixed (or will be once the patch is merged) for wikis using Remex but not for ones using Tidy (there a <templatestyles> tag in the middle of a paragraph will break it into two paragraphs), so switching to Remex should be a blocker for deploying TemplateStyles. (Tracking task: T175706: Progressively switch Wikimedia wikis from Tidy to RemexHTML. Search for wgTidyConfig here to see the current state; the ones with a null line still use Tidy.) Swedish and Russian have already switched so this has no immediate impact on plans.

Not sure I understand your question. Are you asking how to fix the lint errors so that wikis can switch from Tidy to Remex? In that case, there is plenty of information on https://www.mediawiki.org/wiki/Help:Extension:Linter and its subpages.

In T133410#4111612, @Zoranzoki21 wrote:

Hi,
happy holidays! I have question. How to we fix tags so migration can be faster?

As @Anomie noted there, T186965: Output HTML should not contain `<p><style>...</style></p>` is fixed (or will be once the patch is merged) for wikis using Remex but not for ones using Tidy (there a <templatestyles> tag in the middle of a paragraph will break it into two paragraphs), so switching to Remex should be a blocker for deploying TemplateStyles. (Tracking task: T175706: Progressively switch Wikimedia wikis from Tidy to RemexHTML. Search for wgTidyConfig here to see the current state; the ones with a null line still use Tidy.) Swedish and Russian have already switched so this has no immediate impact on plans.

Hey there. Assuming you're talking about the switch to Remex, you can see https://www.mediawiki.org/wiki/Parsing/Replacing_Tidy/FAQ#What_will_editors_need_to_do? . You can ask any followup questions on the talk page there. At T190731 you'll see the list of the wikis whose switch is happening next week.

As @Anomie noted there, T186965: Output HTML should not contain `<p><style>...</style></p>` is fixed (or will be once the patch is merged) for wikis using Remex but not for ones using Tidy (there a <templatestyles> tag in the middle of a paragraph will break it into two paragraphs), so switching to Remex should be a blocker for deploying TemplateStyles. (Tracking task: T175706: Progressively switch Wikimedia wikis from Tidy to RemexHTML. Search for wgTidyConfig here to see the current state; the ones with a null line still use Tidy.) Swedish and Russian have already switched so this has no immediate impact on plans.

Shouldn't this be mentioned on https://www.mediawiki.org/wiki/Extension:TemplateStyles#Configuration (or #Caveats)?