Project talk:VisualEditor testing/Template test

Editing TemplateData-hinted templates
This doesn't seem to work yet? This, that and the other 2013-06-18


 * What doesn't work about it? Jdforrester (WMF) (talk) 00:35, 18 June 2013 (UTC)


 * Well, if you try to edit the "unsigned" template, you are offered the parameters "1" and "2". The templatedata doesn't seem to be influencing the template editor dialog in any way. Perhaps I am misunderstanding what is meant to happen here? This, that and the other (talk) 02:39, 18 June 2013 (UTC)


 * That's because the template doesn't have names for its parameters. However, if you look at the template's "main panel", you can see the description ("Label unsigned comments in a conversation, to attribute them to the correct user."). It's meant to be an example basic case. Jdforrester (WMF) (talk) 03:50, 18 June 2013 (UTC)


 * Jdforrester: Hmm, the "aliases" seem to be overriding the "label", if I understand it correctly. Can this be changed? There are a lot of templates that take  etc, as their entry values. Quiddity (talk) 16:12, 19 June 2013 (UTC)


 * Once this is done (or decided against), we should start an "adding templatedata" how-to page at en:Wikipedia:WikiProject Templates/Templatedata.
 * and some notices at VPT etc. Quiddity (talk) 19:24, 19 June 2013 (UTC)


 * Yeah, there's a bit of breakage, regressions and not-yet-done-ness of using TemplateData in VisualEditor, which we hope to fix very soon - see 49833. Oliver is keen to help with that documentation BTW. Jdforrester (WMF) (talk) 19:46, 19 June 2013 (UTC)


 * I'm also curious as to why this was not implemented as a table (with a column for parameter name and a column for value) - the whole two-panel paradigm seems to "heavy" for something as simple as a template transclusion. And the bit about adding "content", and adding several templates within the one "transclusion", is completely incomprehensible for me. This, that and the other (talk) 01:04, 20 June 2013 (UTC)


 * On the first point, transclusions' parameterised content can be significantly more complex than just a basic wikitext field - these can be proper DOM elements, so we need the UI space for them. Right now we're only allowed editing of the wikitext, but soon enough they'll normally be DOM elements with fall-back for items that can't be. A "simple table" wouldn't be flexible enough for the demands that (e.g.) infoboxen templates have of their contents.
 * On the multi-template block issue, this is for situations where multiple templates in and of themselves don't create a balanced DOM element; the most common example of this on-wiki are templates that go together like:
 * S-start (aka ).
 * S-reg (aka a TR with content);
 * S-new (aka a TR/TD);
 * S-tul (aka another TD);
 * S-vac (aka a final TD);
 * S-end (aka ).
 * Note that there are a lot of similarly-awkward templates (like those that apply a few "standard" settings to an image, thus altering a or ). The "content" blocks are wikitext blocks in between the templates (or non-template transclusions, like usage of parser functions), which similarly can be unbalanced DOM nodes. Parsoid (and anything sane that handles HTML editing) deals in DOM elements, so we have to provide the user with a way to edit these "as one". The only other alternative would be to prevent VisualEditor editing of these elements entirely, which would be, ahem, not a good experience for our users. A VisualEditor that doesn't support the third most widely-used set of templates on enwiki is pointless. Telling the community that's it's not cool for them to come up with a completely different system clearly isn't going to fly. More details here if you're curious. (BTW, yes, this is one of the reasons VisualEditor/Parsoid is slower than you'd like.)
 * To put it another way: we'd love to do it simply, but our users keep coming up with yet-more-complex/-broken/-maddening ways to use MediaWiki, and we need to support those uses. Jdforrester (WMF) (talk) 01:37, 20 June 2013 (UTC)


 * Olivier! I bet he loves that. ;P
 * Re: documentation, he's welcome to it! The only suggestion I have is that we might want to prioritize en:Wikipedia:Database reports/Templates transcluded on the most pages, but that list includes templates that aren't used in mainspace, so it's not at all perfect. Beyond that, it's out of my depth. Quiddity (talk) 03:58, 20 June 2013 (UTC)


 * @Quiddity: Whoops. :-) Yes, that DB report is a useful start, though there's also the issue of meta-templates that aren't directly used on articles either (and so similarly don't need TemplateData for VisualEditor purposes). Jdforrester (WMF) (talk) 04:07, 20 June 2013 (UTC)