Page MenuHomePhabricator

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

Description

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.

Event Timeline

Bene created this task.Apr 13 2015, 12:24 PM
Bene raised the priority of this task from to Normal.
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?)

Bene added a comment.Apr 13 2015, 6:44 PM

@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

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

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

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

Is this resolved now @Bene ?

Bene claimed this task.May 12 2015, 11:36 AM

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?

Bene set Security to None.

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?

Bene edited a custom field.Jun 16 2015, 7:46 PM

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)
Bene added a comment.Jun 17 2015, 11:04 AM

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.

Ok. That makes sense.

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

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

Bene moved this task from Doing to Review on the Wikidata-Sprint-2015-06-16 board.Jun 22 2015, 7:28 PM
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

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

Bene closed this task as Resolved.Jun 26 2015, 2:31 PM
Bene moved this task from Review to Done on the Wikidata-Sprint-2015-06-16 board.