Page MenuHomePhabricator

Line-breaks between list-items in template parameters are removed
Closed, ResolvedPublic

Description

When save using the Visual Edit mode, VE removes line-breaks of lists and breaks the layout.
Here is an example of this issue: https://commons.wikimedia.org/w/index.php?title=File:Subway_logo_US_Copyright_Office_decision.pdf&diff=292959173&oldid=292957825&diffmode=source

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 20 2018, 5:37 PM
DLynch renamed this task from VE removes line-breaks of lists and breaks the layout to Line-breaks between list-items in template parameters are removed.Sep 5 2018, 3:01 PM
DLynch added a subscriber: DLynch.Sep 5 2018, 3:07 PM
{{Information
|Description=Letter from US copyright office denying registration for the Subway logo.
|Source=https://www.ipmall.info/sites/default/files/hosted_resources/CopyrightAppeals/2004/Daniel%20Cislo.pdf
|Date=2013-07-16
|Author=*Maria A. Pallante, Register of Copyrights, United States Copyright Office
*William J. Roberts, Jr., Copyright Office Review Board, United States Copyright Office
|Permission=
}}

Became

{{Information
|Description=Letter from US copyright office denying registration for the Subway logo.
|Source=https://www.ipmall.info/sites/default/files/hosted_resources/CopyrightAppeals/2013/SubwayLogo.pdf
|Date=2013-07-16
|Author=*Maria A. Pallante, Register of Copyrights, United States Copyright Office*William J. Roberts, Jr., Copyright Office Review Board, United States Copyright Office
|Permission=
}}

Note removal of line-break in the wikitext list in the author parameter.

DLynch added a comment.Sep 5 2018, 3:39 PM

It does seem to legitimately feel that the author parameter has type=line in templatedata, so it's sort of a config issue on commons. That said, should we maybe detect this case (there are line-breaks in the existing value for a line field) and provide a multiline input regardless of the type?

Change 460066 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/VisualEditor@master] ui.MWParameterPage: multiline inputs for line if newlines already present

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

Change 460066 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ui.MWParameterPage: multiline inputs for line if newlines already present

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

DLynch claimed this task.Sep 13 2018, 3:36 PM
Deskana closed this task as Resolved.Oct 1 2018, 2:48 PM
Deskana triaged this task as Normal priority.