Page MenuHomePhabricator

Unneeded extra whitespace shown on some articles
Closed, DuplicatePublic


On a lot of whitespace is generated in VE, due to templates that put a label on an image (map), as noted on the feedback page
This needs to be fixed before VE can go live on nlwiki by default.

Event Timeline

Mbch331 created this task.Mar 25 2017, 4:45 PM
Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptMar 25 2017, 8:46 PM

This is a specific case of T107745, it's possible we can solve this problem without doing the entire thing, maybe before 2020 ;) especially if it's okay to require minor wikitext changes to do so.

For reference, the issue here looks like this:

The problematic wikitext:

<div style="position: relative;">
[[Bestand:BlankMapTurkeyProvinces.png|550px|Kaart bestuurlijke indeling Turkije]]

{{Afbeelding label|x=0.342|y=0.188|scale=550|text=<small>[[Ankara (provincie)|Ankara]]</small>}}
{{Afbeelding label|x=0.1|y=0.066|scale=550|text=<small>[[Kırklareli (provincie)|Kırklareli]]</small>}}
{{Afbeelding label|x=0.018|y=0.092|scale=550|text=<small>[[Edirne (provincie)|Edirne]]</small>}}
{{Afbeelding label|x=0.822|y=0.256|scale=550|text=<small>[[Muş (provincie)|Muş]]</small>}}
{{Afbeelding label|x=0.928|y=0.284|scale=550|text=<small>[[Van (provincie)|Van]]</small>}}
{{Afbeelding label|x=0.948|y=0.348|scale=550|text=<small>[[Hakkâri (provincie)|Hakkâri]]</small>}}

The white space is caused by "slugs", which exist to allow users to insert paragraphs between things. In this case, VE inserts a slug between each of these label templates, which is technically correct but rather unhelpful. (I'll also note that the individual label templates are not easily editable.)

I spoke to @AdHuikeshoven at the Wikimedia-Hackathon-2017, and suggested that instead of the opening <div style="position: relative;"> and closing </div>, they use a pair of templates that insert this. This would probably be an improvement for wikitext editors (who will see the Dutch equivalent of {{label begin}}/{{label end}} instead of fairly complicated English-language HTML syntax), and it will allow VisualEditor to handle this in a nicer manner, since it'll cause the entire set of templates to be treated as a single "transclusion" with a dialog to edit it. This is similar to how we handle table begin/row/end templates, as in e.g. this article:,_Belgium.

(Normally we discourage such begin/end templates, since the transclusion interface is not great for editing large amounts of text, but in this case it even this would be an improvement over the current behavior.)