Page MenuHomePhabricator

Fix table of contents on mobile Wikidata
Closed, ResolvedPublic1 Estimated Story Points


The table of contents is shown at the bottom of each page only displaying the item's id. This TOC is obviously useless. We should decide if we want to have sections and thus also a TOC and then move the TOC to the right position and filling it with meaningfull data.

Unbenanntes_Bild.png (688×1 px, 29 KB)

Event Timeline

Bene raised the priority of this task from to Medium.
Bene updated the task description. (Show Details)
Bene added subscribers: Bene, thiemowmde, adrianheine and 6 others.

This shouldn't be rendering unless there are at least 2 sections (maybe even 3?)

@Jdlrobson We currently have two sections, "statements" and "site links". Another section called "identifiers" will follow so we will need the toc perhaps in near future.

Change 203953 had a related patch set uploaded (by Bene):
Get rid of $wgMFPageSections config

Change 203953 merged by jenkins-bot:
Get rid of $wgMFPageSections config

This can be resolved easily by adding an empty <div id="toc"></div> to the item's html. However, the toc should not show up if there are less then 3 sections (which is currently the case on item's pages) so this would still need to be fixed.

Can/should we go ahead with that then?

To summarize, we won't show a TOC right now because our site has less than 3 sections but will show one as soon as we have a third section for identifiers, right @Lydia_Pintscher?

I am wondering which way to go here. We have two options imho:

  • have the sections statements, sitelinks, identifiers
  • have the sections statements and (sitelinks+identifiers)

Including both sitelinks and identifiers in one section is going to be hard DOM wise and this mostly indicates a logical issue as well. The DOM for sitelinks is generated in SiteLinksView. We could now go ahead and also add the identifiers in there but that won't work in two ways: We don't have the information about statements in SiteLinksView but only a list of sitelinks and not all entities which have identifiers may also have sitelinks.

For these two reasons I think it is better to have three sections and separate sitelinks and identifiers. Furthermore, including two different UIs (for statements and sitelinks) in one section will also be bad considering the user-friendlyness.

Change 219953 had a related patch set uploaded (by Bene):
Insert empty toc to help MobileFrontend

Bene renamed this task from Decide how to use table of contents on mobile Wikidata to Fix table of contents on mobile Wikidata.Jun 23 2015, 9:46 PM

Change 219953 merged by jenkins-bot:
Insert empty toc to help MobileFrontend

Bene moved this task from Review to Done on the Wikidata-Sprint-2015-06-16 board.