Page MenuHomePhabricator

Additional point added over unordered list
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Open Italian Wikipedia on the Android app;
  2. Open any article that transcludes the {{Collegamenti esterni}} template (e.g. Leonardo da Vinci);
  3. Go to the final section named "Collegamenti esterni" (i.e. "External links").

Expected results

A normal unordered list should be shown.

Actual results

Screenshot_20191018-144318.png (1×1 px, 252 KB)

The app shows an additional point at the top of the unordered list (where * {{Collegamenti esterni}} is used).
The template itself generates an unordered list, which apparently conflicts with the prepended asterisk.
Nevertheless, on the website this bug is not present.

A patch has been requested by an Italian Wikipedia user at this thread.

Environments observed

App version: 2.7.50300 (released on 2019-10-08)
Android OS versions: 7.0

Event Timeline

Charlotte removed the point value for this task.
Charlotte added a subscriber: Charlotte.

Thanks @Horcrux92 - this is one for either the Page Library or Parsoid team. Not sure which side the template issue is on.

LGoto triaged this task as Low priority.Mar 20 2020, 4:17 PM

The legacy parser output has this at the start of the list,

<li class="mw-empty-elt"></li>

which is hidden by css,

body.mw-hide-empty-elt .mw-empty-elt {
    display: none;
}

So it's probably on the app to add the equivalent css.

I noticed something unfortunate in the process of investigating this though.

https://it.wikipedia.org/api/rest_v1/page/html/Leonardo_da_Vinci

<h3 id="Di_carattere_generale">Di carattere generale</h3>
<ul id="mwDnU"><li class="mw-empty-elt" id="mwDnY"></li><span about="#mwt757" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Collegamenti esterni","href":"./Template:Collegamenti_esterni"},"params":{},"i":0}}]}' id="mwDnc">
</span><li about="#mwt757"><cite id="CITEREFTreccani.it" class="citation web" style="font-style:normal"> <a rel="mw:ExtLink" href="http://www.treccani.it/enciclopedia/leonardo-da-vinci" class="external text"><span style="font-style:italic;">Leonardo da Vinci</span></a>, su <span style="font-style:italic;">Treccani.it – Enciclopedie on line</span>, <a rel="mw:WikiLink" href="./Istituto_dell'Enciclopedia_Italiana" title="Istituto dell'Enciclopedia Italiana">Istituto dell'Enciclopedia Italiana</a>.</cite> <span class="mw-valign-text-top noprint" typeof="mw:Image/Frameless" data-mw='{"caption":"Modifica su Wikidata"}'><a href="https://www.wikidata.org/wiki/Q762#P3365"><img alt="Modifica su Wikidata" resource="./File:Blue_pencil.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/10px-Blue_pencil.svg.png" data-file-width="600" data-file-height="600" data-file-type="drawing" height="10" width="10" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/20px-Blue_pencil.svg.png 2x"/></a></span></li><span about="#mwt757">
</span><li about="#mwt757"><cite id="CITEREFEnciclopedia_Italiana" class="citation libro" style="font-style:normal"> <a rel="mw:ExtLink" href="http://www.treccani.it/enciclopedia/leonardo-da-vinci_(Enciclopedia-Italiana)/" class="external text"><span style="font-style:italic;">Leonardo da Vinci</span></a>, in <span style="font-style:italic;"><a rel="mw:WikiLink" href="./Enciclopedia_Treccani" title="Enciclopedia Treccani">Enciclopedia Italiana</a></span>, <a rel="mw:WikiLink" href="./Istituto_dell'Enciclopedia_Italiana" title="Istituto dell'Enciclopedia Italiana">Istituto dell'Enciclopedia Italiana</a>.</cite> <span class="mw-valign-text-top noprint" typeof="mw:Image/Frameless" data-mw='{"caption":"Modifica su Wikidata"}'><a href="https://www.wikidata.org/wiki/Q762#P4223"><img alt="Modifica su Wikidata" resource="./File:Blue_pencil.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/10px-Blue_pencil.svg.png" data-file-width="600" data-file-height="600" data-file-type="drawing" height="10" width="10" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/20px-Blue_pencil.svg.png 2x"/></a></span></li><span about="#mwt757">
</span>

It seems that template spans are being added inside lists. That doesn't look right @ssastry

It seems that template spans are being added inside lists. That doesn't look right @ssastry

Filed T276621 for that, since it's irrelevant to the discussion here

Adding back the Android app so they can triage the css fix.

cooltey added a subscriber: cooltey.

Looks like this is an issue in mobile-html, since it is observable in https://it.wikipedia.org/api/rest_v1/page/mobile-html/Leonardo_da_Vinci

Will move this ticket to Tracking and add Product-Infrastructure-Team-Backlog

Change 710538 had a related patch set uploaded (by Vadim Kovalenko; author: Vadim Kovalenko):

[mediawiki/services/mobileapps@master] Remove empty list item

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

Change 710538 merged by jenkins-bot:

[mediawiki/services/mobileapps@master] Remove empty list item

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

MSantos added a subscriber: MSantos.

The fix seems to be applied. Please, re-open in case I'm missing something.