https://bugzilla.wikimedia.org/show_bug.cgi?id=52913

       Web browser: ---
            Bug ID: 52913
           Summary: Move info about template-affected attributes from meta
                    tags into data-mw
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: DOM
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

We currently use meta tags to mark up template-affected attributes:
http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Templates_in_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 https://gerrit.wikimedia.org/r/#/c/65575/

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
https://gist.github.com/subbuss/6092148/raw/e153a444b6e252d9eebd690e996e28cdbb859df7/gistfile1.txt

We should work this out further in
http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Templates_in_attributes
and implement the resulting spec. 

An issue to consider is the interaction between template content editing
(http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Template_content) 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 (data-mw.parts).
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to