Page MenuHomePhabricator

Hiding output of Templates in mobile sometimes results in confusing content
Closed, ResolvedPublic

Description

The Template: Set index article page explains the template in it's template documentation by showing the output generated as a result of the template by transcluding it. This isn't an issue with the desktop site. The mobile site seems to hide the output of template transclusions and as a result the explanation seems absurd.

Screen shot (desktop version)

Screenshot_2017-05-22-20-26-04.png (800×480 px, 139 KB)

Screen shot (mobile version)

Screenshot_2017-05-22-20-25-43.png (800×480 px, 119 KB)

Note the line, Which renders like this:, in the explanation. The output of template transclusion should be found below it.

Related Objects

Event Timeline

Jdlrobson moved this task from Incoming to Needs Prioritization on the Web-Team-Backlog board.

The content is properly generated:

<table id="setindexbox" class="metadata plainlinks dmbox dmbox-setindex" style="" role="presentation"><tbody><tr><td class="mbox-image" style="padding: 2px 0 2px 0.4em;"><a href="/wiki/File:DAB_list_gray.svg" class="image view-border-box"><img alt="Disambiguation icon" src="//upload.wikimedia.org/wikipedia/commons/thumb/8/8c/DAB_list_gray.svg/30px-DAB_list_gray.svg.png" width="30" height="23" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/8/8c/DAB_list_gray.svg/45px-DAB_list_gray.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/8/8c/DAB_list_gray.svg/60px-DAB_list_gray.svg.png 2x" data-file-width="220" data-file-height="168"></a></td>
<td class="mbox-text" style="padding: 0.25em 0.4em; font-style: italic;">This <a href="/wiki/Wikipedia:Set_index_articles" title="Wikipedia:Set index articles">article</a> includes a list of related items that share the same name (or similar names).<br><span style="font-size: 88%;">If an <a class="external text" href="//en.wikipedia.org/w/index.php?title=Special:Whatlinkshere/Template:Set_index_article&amp;namespace=0">internal link</a> incorrectly led you here, you may wish to change the link to point directly to the intended article.</span></td>
</tr></tbody></table>

just the table is hidden via styles - matching selector: .content .metadata

.content .tmbox, .content .ambox, .content #coordinates, .content .navbox, .content .vertical-navbox, .content .topicon, .content .metadata {
    /* display: none !important; */
}
Jdlrobson renamed this task from Hiding output of Templates in mobile sometimes results in absurd content to Hiding output of Templates in mobile sometimes results in confusing content.May 30 2017, 4:54 PM
Jdlrobson subscribed.

.metadata is hidden by default in the mobile view where they generate clutter and negatively impact reading experience. They are collapsed into the page issues banner.

I'd suggest this is fixed on wiki either by adding a warning to the page that this template works differently on mobile or by overriding this rule on template pages.

Just to reiterate this (i've already mentioned this quite a few times). The english wikipedia interpretation of the hiding of metadata is only for article namespace. (The idea is that metadata is not part of the content, but a talk page doesn't care about a separation between 'content' and non-content, so there it's just fine).

Also pageissues collapsing only applies to ambox'es of course.

I've decided to make this local wiki change to reflect that reality.

Does this apply to other wikis?
If you submit a patch I'll happily merge

As far as I know, there is no standard definitions of the metadata class across the various languages editions.

Hmm, my change has some downsides that I did not considered.
https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=786608865#Some_sort_of_glitch_in_mobile_view

Ideally, i think we should remove the .metadata stripping from minerva altogether.. For English Wikipedia that wouldn't be a problem, we could just fix our Common.css and Mobile.css.. For other languages however.. that might take years before they catch up with us or german wikipedia...
Uncertain how to proceed, esp. as i'm not sure how disruptive it would be to stop hiding .metadata on the wiki's other than en.wp

Anyone got ideas for how to experiment ?

Fixing page issues my help address this problem.

Jdlrobson claimed this task.

This has been fixed. Mobileformatter no longer runs on template namespace.