Page MenuHomePhabricator

Empty li item in external links list
Closed, ResolvedPublic

Description

The Batman article displays with an empty li item:

Screen Shot 2017-08-09 at 9.57.44 AM.png (283×534 px, 39 KB)

In desktop this li is present but has a class:

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

Is this happening in MCS or upstream in Parsoid?

Expected:
It should either have the mw-empty-elt element class or be removed

Event Timeline

Jdlrobson renamed this task from Empty to Empty li item in external links list.Aug 17 2017, 2:08 PM
bearND subscribed.

This reminds me of T129375 but is different since this is about MCS/Parsoid output, which don't even have the mw-empty-elt class on the empty `<li>.

Since the equivalent Parsoid output[1] doesn't have the mw-empty-elt class MCS cannot have it neither.

<li id="mwCME"> </li>

[1] https://en.wikipedia.org/api/rest_v1/page/html/Batman

This reminds me of T129375 but is different since this is about MCS/Parsoid output, which don't even have the mw-empty-elt class on the empty `<li>.

Since the equivalent Parsoid output[1] doesn't have the mw-empty-elt class MCS cannot have it neither.

<li id="mwCME"> </li>

[1] https://en.wikipedia.org/api/rest_v1/page/html/Batman

Okay, Parsoid be adding that class to empty elements. That is easily fixed.

ssastry triaged this task as Medium priority.

Change 373420 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] T172896: Add mw-empty-elt class to empty li items that can't be deleted

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

Change 373420 merged by jenkins-bot:
[mediawiki/services/parsoid@master] T172896: Add mw-empty-elt class to empty li items that can't be deleted

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

Looks like this has been deployed today. I still don't see the class attribute for the <li> in the example page[1], even after a purge.

[1] https://en.wikipedia.org/api/rest_v1/page/html/Batman

Are you sure? I see <li class="mw-empty-elt" id="mwCME"> </li>

Ok, I see it now in the HTML source. To get this change visible for users there needs to be a CSS rule added somewhere.