Page MenuHomePhabricator

Add an option in TemplateData to specify desired wikitext whitespace formatting of parameters
Closed, ResolvedPublic8 Estimated Story Points

Description

Note: This will not change the behaviour of various software components immediately. Instead, they will each need to be updated – see the blocked tasks.

See documentation for the format parameter, at:

However, here are two examples of how to add the parameter, at beta cluster:


Original title: html2wt: new templates should display one parameter per line

I understand this was partly discussed in T53175: Parsoid does not add newlines between parameters in new template invocations, making wikitext difficult to read (with suggestions about how to handle the issue), but whatever happened next didn't seem to affect this :)

If you check out the source of https://it.wikipedia.org/w/index.php?title=Utente:Elitre_(WMF)/Sandbox_VE&oldid=64531360 , you'll notice a couple of templates at the top. Those were added with VE, and are collapsed, whereas editors on it.wp would want those kind of templates (which are basically infoboxes) to always display one parameter per line, no matter what the length of the template is.


Version: unspecified
Severity: normal
See Also: T53003

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:52 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz62147.

This will require TemplateData annotations since other editors will complain if we started rendering cite templates (for ex.) with 1 parameter per line always. So, parsoid needs information about what templates use what style. To be discussed whether Parsoid will read this info from TemplateData sources directly or whether VE will pass along this info to Parsoid.

Whatamidoing-WMF renamed this task from html2wt: new templates should display one parameter per line to Add an option in TemplateData to specify whether parameters for each template should be recorded in wikitext all on one line or with each parameter on a separate line.Aug 5 2015, 10:57 PM
Whatamidoing-WMF updated the task description. (Show Details)
Whatamidoing-WMF set Security to None.

Change 243138 had a related patch set uploaded (by Jforrester):
Introducing template format

https://gerrit.wikimedia.org/r/243138

Krinkle renamed this task from Add an option in TemplateData to specify whether parameters for each template should be recorded in wikitext all on one line or with each parameter on a separate line to Add an option in TemplateData to specify desired wikitext whitespace formatting of parameters.Oct 19 2015, 6:48 PM

Change 243138 merged by jenkins-bot:
Introduce new 'format' template property

https://gerrit.wikimedia.org/r/243138

Please document the update in

(and link the update in the task description when done, because Tech/News links here.)
Thanks :-)

It seems to be described most clearly in https://gerrit.wikimedia.org/r/#/c/243138/13/Specification.md but I'm not sure.

Updating an example, so that there's a diff to refer to, would also be good. Perhaps https://www.mediawiki.org/wiki/Template:User_info#TemplateData

Please document the update in

{{done}}

(and link the update in the task description when done, because Tech/News links here.)

{{done}}

Updating an example, so that there's a diff to refer to, would also be good. Perhaps https://www.mediawiki.org/wiki/Template:User_info#TemplateData

Can't do that, until the code is live! But I did update a couple at beta cluster:

I'm not really sure this task is announcement worthy as setting the option
doesn't actually do anything yet. That's waiting on the parsoid change this
blocks.

I'm not really sure this task is announcement worthy as setting the option doesn't actually do anything yet. That's waiting on parsoid change this blocks.

Err, it was already announced, in the Tech/News that went out today: https://meta.wikimedia.org/wiki/Tech/News/2015/47 :-/
How far away are the parsoid changes?
Perhaps someone could update the description above, to give that ETA detail? (Because curious people will be arriving via Tech/News).

For the new format to be effective, it should allow specifying arbitrary spacing like "\n%s = %s", "%s=%s".

@Ricordisamoa as per @Jdforrester-WMF's comment here:

https://phabricator.wikimedia.org/T64217#1650279

more elaborate ways of setting this was declined.

Shouldn't the task be marked as declined too?