Add an option in TemplateData to specify desired wikitext whitespace formatting of parameters
Closed, ResolvedPublic8 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

Details

Reference
bz62147

Related Objects

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz62147.
Elitre created this task.Mar 3 2014, 3:47 PM

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 added a project: TemplateData.
Whatamidoing-WMF set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 5 2015, 10:57 PM

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

Quiddity updated the task description. (Show Details)Nov 16 2015, 11:26 PM
Quiddity updated the task description. (Show Details)
Quiddity updated the task description. (Show Details)Nov 16 2015, 11:34 PM

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:

Mvolz added a comment.EditedNov 16 2015, 11:47 PM

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).

He7d3r added a subscriber: He7d3r.Nov 17 2015, 12:29 AM
Quiddity updated the task description. (Show Details)Nov 17 2015, 2:30 AM
Ricordisamoa reopened this task as Open.Nov 17 2015, 9:35 AM

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.

Mvolz closed this task as Resolved.Nov 17 2015, 10:07 AM
Akoopal removed a subscriber: Akoopal.Nov 18 2015, 7:36 PM
Quiddity updated the task description. (Show Details)Nov 23 2015, 5:22 PM
Jdforrester-WMF updated the task description. (Show Details)

@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?