Page MenuHomePhabricator

Deduplicate template styles in mobileviews API
Closed, DeclinedPublic

Description

T168333: CSS is duplicated on each template usage is now fixed for most things but the mobileviews API splits the HTML into sections so it needs to do its own, per-section deduplication.

The mechanism, as implemented in core for rMW9b2b375fcef1: ParserOutput: Add 'deduplicateStyles' post-cache transformation, is to find <style> tags with a data-mw-deduplicate attribute, and replace all but the first of each deduplication value with <link rel="mw-deduplicated-inline-style" href="mw-data:..."/>; the ellipsis there is a percent-encoded representation version of the deduplication value.

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
DeclinedNone

Event Timeline

Tgr created this task.Feb 13 2018, 12:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 13 2018, 12:20 AM
Anomie updated the task description. (Show Details)Feb 13 2018, 2:40 AM

@Tgr Could you please clarify how this task relates to TemplateStyles deployment ruwiki? Thanks!

Tgr added a comment.Feb 13 2018, 8:01 PM

That's up to the ruwiki community to decide, there never was much concern about duplication on the WMF side. I'd imagine if they are concerned about desktop performance they would be about mobile web as well, which is where this API is used.

ggellerman triaged this task as Medium priority.Feb 27 2018, 6:43 PM
Deskana lowered the priority of this task from Medium to Low.Mar 16 2018, 9:50 AM
Deskana added a subscriber: Deskana.

Nice to have, but not a blocker for any deployments per T133410#4055687.

Deskana moved this task from Up next to Backlog on the TemplateStyles board.Mar 16 2018, 9:51 AM
Jdlrobson closed this task as Declined.Oct 29 2019, 4:49 PM
Jdlrobson added a subscriber: Jdlrobson.

The plan is to deprecate the mobileview API within the next few years so this will not get worked on (T186627).