Page MenuHomePhabricator

VisualEditor: HTML comments are dropped from transclusion calls
Closed, ResolvedPublic

Description

https://en.wikipedia.org/w/index.php?title=Vidin&diff=559844598&oldid=559844102 shows several dirty diff issues, including spurious template bars, space changes, and corrupt links.

However, this bug is specifically about the HTML comments that are dropped, "the name of a location map as per http://en.wikipedia.org/wiki/Template:Location_map" and "the position of the pushpin label: left, right, top, bottom, none". These comments often have important messages to other editors, so they can not be stripped.


Version: unspecified
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49603
https://bugzilla.wikimedia.org/show_bug.cgi?id=49655

Details

Reference
bz49608

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:52 AM
bzimport set Reference to bz49608.

At the time of this discussion by VE developers,
[[Wikipedia:VisualEditor/Feedback/Archive 2013 05#General_observations]], hidden notes/comments were preserved. Now all hidden HTML notes on a page (or at least those in templates) are removed when the page is edited by VE.

Page edit notices and section edit notices will not work as a replacement since hidden notes can be instructional for specific references, tables, infoboxes, navboxes, sentences, paragraphs, etc.. Page notices and edit notices are for a whole page or section. For more info:
[[Wikipedia:VisualEditor/Feedback#HTML_notes]] - or wherever it ends up later in the archives.

If HTML notes are going to be replaced by some new hidden notation system, they still need to be preserved in the meantime. They should be treated similarly to how VE handles tables, infoboxes, and other stuff that VE can not currently edit. VE should not be doing anything within templates. Templates are too complex for VE to meddle with in the slightest way. VE should not even remove spaces in templates.

If VE ends up with another hidden note tool, then a bot may have to go around to convert all existing hidden HTML notes to the new VE tool. But why bother?

Why not keep the HTML notes, and use some kind of popup tooltip in VE that pops up when one puts the mouse cursor over a hidden note icon in VE edit mode? So one can read the hidden note in the popup. Kind of like how reference tooltips work.

Confirm that these are being re-broken, but seemingly online in template calls (where we can't alienate them?). Ed, can you confirm at your end if this is a DM issue or a Parsoid one?

I was able to edit around an HTML comment without altering it inline (as expected) in https://www.mediawiki.org/w/index.php?title=VisualEditor:TestComments&diff=712245&oldid=712244 - but changes to the HTML comment in the second template fail to be detected as a change (?). Note that the first template can't be edited as the preceding block comment it created as an mw:Placeholder (per bug 47403) and (wrongly?) merged with the following transclusion.

See also bug 49655 and this (where Ssastry discusses it):
Wikipedia:VisualEditor/Feedback#Removal_of_comments_in_Infobox

[[Wikipedia:VisualEditor/Feedback#Removal_of_comments_in_Infobox]]

See also bug 42124.

(In reply to comment #3)

See also bug 49655 and this (where Ssastry discusses it):
Wikipedia:VisualEditor/Feedback#Removal_of_comments_in_Infobox

The place for "see also" bugs is the "see also" section at the top right of the bug - have put it there. :-) Bug 42124 is not relevant.

Can't reproduce in master. The comment appears in the template dialog and can be edited. With experimental code disabled the template is completely untouched.

This is now fixed; as an example, see https://en.wikipedia.org/w/index.php?title=Bleak_House&diff=560362551&oldid=560338958 as an edit made with VisualEditor that leaves the comments in the templates as they were.

Not sure if it's the same thing, but I just did this today http://it.wikipedia.org/w/index.php?title=Google&diff=59622535&oldid=59377529 and it discarded commented text which, as noted above, should be there for a reason :)

That's a separate bug, will raise as such.

verified in betalabs and test2 - HTML comments are preserved for both cases - generally and, specifically, in transclusions.