Page MenuHomePhabricator

Move info about template-affected attributes from meta tags into data-mw
Closed, ResolvedPublic


We currently use meta tags to mark up template-affected attributes:

This turned out to be problematic for several reasons:

These meta tags can end up in foster-parentable positions for inputs like this:

<table><tr title="{{echo|foo}}"></tr></table> They can end up outside of an extension fragment, which makes it hard to reuse fragments. This currently blocks We have been discussing moving this information to data-mw ever since we added that as a public interface. Subbu has sketched a possible encoding in We should work this out further in and implement the resulting spec. An issue to consider is the interaction between template content editing ( and templated attributes. For simple cases like echo '[[{{echo|foo}}]]' | node parse, we currently only add mw:ExpandedAttrs/Transclusion info. For echo '<div title="{{echo|foo}}">{{echo|</div>}}' | node parse however we add both mw:Transclusion and mw:ExpandedAttrs/Transclusion. The templated attribute can already be edited as wikitext in the mw:Transclusion interface ( We might want to omit the attribute interface here in favor of the general template-affected content interface. Fragment reuse is another issue to consider. We currently don't reuse attribute expansions. These are relatively rare and cheap, so this might be ok for now. We should however choose a representation that makes it easy to add caching for these later. Currently the VisualEditor completely ignores information about template-affected attributes, so no deployment coordination will be required as long as the mw:Transclusion interface does not change. -------------------------- **Version**: unspecified **Severity**: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:50 AM
bzimport added a project: Parsoid-DOM.
bzimport set Reference to bz52913.

Meta tags in foster-parentable positions aren't really an issue anymore.

This was fixed by 283bfd554bf1, so closing this bug. Please reopen if there is something we overlooked.