Page MenuHomePhabricator

Show table of contents on all namespaces on Minerva
Closed, ResolvedPublic

Description

Mobile site is missing the table of contents on mon-main namespaces when viewed at tablet or desktop resolution.

For example, https://en.m.wikipedia.org/wiki/Mona_Lisa has a table of contents:


But a nearly identical page https://en.m.wikipedia.org/wiki/User:Editingtester/mona_lisa9 has just empty space where the TOC should be:

The element is actually present in page source, but it's empty:

(I noticed this issue during usability testing of VE with @iamjessklein, I thought it was some random thing, but since then I ran into it on my local testing wiki too.)

Event Timeline

matmarex created this task.Sep 24 2018, 5:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 24 2018, 5:11 PM

I see the bug locally with pages titled "Sections" and "Testwiki:Sections" (where "Testwiki" is the project namespace), both with the same content:

== Foo ==
<div class="box" style="background: beige">
== Squirrels ==
Whatever
== Cats ==
derp asdf asdf asdf
== Kittens ==
Whatever
== Dogs ==
hmph
</div>

== Bar ==
foo

I didn't have time to investigate yet, not sure if it's related to page titles/namespaces or something else.

I suspect it relates to namespace.

Change 462662 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/skins/MinervaNeue@master] Allow mobile TOC on pages in all namespaces

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

ovasileva triaged this task as Medium priority.Sep 25 2018, 4:00 PM
Jdlrobson added subscribers: alexhollender, ovasileva.

@alexhollender @ovasileva the above patch adds table of contents to all pages. Cool?

@Jdlrobson is this for larger screens only, or mobile as well? Also I assume we should QA such a broad change?

A patch exists that adds the table of contents to all namespaces.
I've put this patch on staging
Here's some examples of how it impacts the talk page: https://reading-web-staging.wmflabs.org/wiki/Talk:Mercia
and user page: https://reading-web-staging.wmflabs.org/wiki/User:Jdlrobson#

I just need a green light to merge the code or some feedback if there are any namespaces where table of contents does not make sense (although I should point out with this patch the table of contents behaviour would become consistent with desktop)

looks good to me

some feedback if there are any namespaces where table of contents does not make sense

to clarify: you're saying that if there are namespaces on desktop where we've chosen not to include a table of contents, that will be respected here? And since you raised the question: are there reasons specific to Minerva in your opinion that would cause us to reconsider showing the table of contents in a given namespace?

Jdlrobson added a comment.EditedSep 25 2018, 6:05 PM

to clarify: you're saying that if there are namespaces on desktop where we've chosen not to include a table of contents, that will be respected here?

I believe so. Editors can also disable table of contents via NOTOC

: are there reasons specific to Minerva in your opinion that would cause us to reconsider showing the table of contents in a given namespace

Not in my opinion.

Additional note: They will also only show on tablet and desktop mode NOT mobile

Ok great, all set from my perspective

Jdlrobson renamed this task from Mobile site is missing the table of contents on some pages to Show table of contents on all namespaces on Minerva.Sep 25 2018, 6:24 PM
Jdlrobson moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.

Change 462662 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Allow mobile TOC on pages in all namespaces

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

The table of contents now shows on other namespaces.
See https://reading-web-staging.wmflabs.org/wiki/User:Jdlrobson

alexhollender added a project: Product-QA.

@Jdlrobson reminder to add QA instructions to tasks when you move them to Design Review or QA

Ryasmeen added a comment.EditedOct 4 2018, 9:19 PM

@Jdlrobson: checked for that article on mobile site using desktop browser. The table of contents is now showing up there. However, there is no TOC on an actual mobile device (iPhone). I think the original report was also mentioning something about that:

"On an actual mobile device, you can only navigate the page by swiping to scroll and it takes forever to find anything on it."

So I am assuming that part is not being fixed by this patch?

Correct. Table of contents is not shown on mobile

Jdlrobson updated the task description. (Show Details)Oct 4 2018, 10:36 PM
Jdlrobson reassigned this task from Ryasmeen to ovasileva.Oct 5 2018, 6:13 PM
Jdlrobson added a subscriber: Ryasmeen.

@Ryasmeen Sorry, I think I was a bit confused when filing this bug report. I experienced this issue on a tablet and didn't know the phone experience is different. (It turns out that on a phone, there is no TOC, and instead all of the sections are collapsed.)

ovasileva closed this task as Resolved.Oct 8 2018, 3:40 PM

Looks good, thanks all

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptOct 8 2018, 3:40 PM