Last modified: 2013-12-03 22:43:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54913, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52913 - Move info about template-affected attributes from meta tags into data-mw
Move info about template-affected attributes from meta tags into data-mw
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
DOM (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: ssastry
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-16 04:40 UTC by Gabriel Wicke
Modified: 2013-12-03 22:43 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Wicke 2013-08-16 04:40:10 UTC
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.
Comment 1 Arlo Breault 2013-09-27 18:32:02 UTC
Meta tags in foster-parentable positions aren't really an issue anymore.
Comment 2 Gabriel Wicke 2013-12-03 22:43:22 UTC
This was fixed by 283bfd554bf1, so closing this bug. Please reopen if there is something we overlooked.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links