Page MenuHomePhabricator

Small change to section header not displayed in historical visual diff
Closed, ResolvedPublic1 Estimated Story Points

Description

See https://www.mediawiki.org/w/index.php?title=Parsoid/Deployments&diff=next&oldid=2719566&diffmode=visual
The "15" is scratched out but, the 34 is not displayed. Look at the corresponding wikitext diff which shows that 15 has been replaced by 34.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Note that the <ins>34</ins> is actually present, but for some reason hidden via display: none.

Deskana renamed this task from Visual diff bug in the history tab to Small change to section header not displayed in historical visual diff.Feb 26 2018, 11:37 AM
Deskana triaged this task as Medium priority.
Deskana moved this task from To Triage to Current work on the VisualEditor board.
Deskana edited projects, added VisualEditor (Current work); removed VisualEditor.

This looks like a very complex issue related to the fact that MWHeadingNode has the handlesOwnChildren property set (because of a hack that converts empty headings to paragraphs - which should possibly be moved to Parsoid...), and some weird behaviour that triggers it the deep re-application of html attributes in ve.dm.Converter.static.renderHtmlAttributeList. Basically it's all @Catrope's fault :)

(because of a hack that converts empty headings to paragraphs - which should possibly be moved to Parsoid...)

So turns out that in scrub_wikitext mode, Parsoid does now remove empty headings, so we should be able to kill that hack. That will fix this specific issue, but I still suspect there is a problem with renderHtmlAttributeList.

Verified working with a monkey patch:

matmarex removed a project: Patch-For-Review.
matmarex added a subscriber: matmarex.

The patch was merged some days ago (Gerritbot really doesn't like this task…). The related task mentioned above is also fixed.

All of this code is actually already in production and works correctly:

Deskana set the point value for this task to 1.Mar 15 2018, 2:07 PM