Page MenuHomePhabricator

Show collapsible sections for Statements and Sitelinks
Closed, ResolvedPublic1 Estimated Story Points

Description

A Wikidata item is basically separated into two sections, one for statements and one for sitelinks. Both sections should be collapsible on mobile view and appear in the toc on tablets.

The issues why MobileFrontend currently does not recognize our <h2> sections are the following:

  1. For MobileFrontend, <h2> headlines must be a direct descendent of the #content element
  2. The <div> containting the content of the sections must follow the <h2> directly which is not the case for the sitelinks section atm

The two options we have are either changing the DOM structure of item pages to fit MobileFrontend requirements or make MobileFrontend less restrictive about what to recognize as a headline.

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.
Bene set Security to None.

As suggested above, the best way to implement this is perhaps do both changes. There should be a "sitelinks" heading immedeately before the sitelinklistgroupview container but MobileFrontend should also allow headings which are not direct descendents of the #content element.

When implementing the Wikibase part, we must make all sitelinklistheadings from <h2>s to <h3>s. This will change there styling a bit as Vector renders <h3> quite differently.

Change 203874 had a related patch set uploaded (by Bene):
Add heading before sitelinks section

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

Change 203880 had a related patch set uploaded (by Bene):
Make all headings with class section-heading toggleable

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

Change 203880 merged by jenkins-bot:
Make all headings with class section-heading toggleable

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

Jdlrobson claimed this task.

This is not resolved yet as https://gerrit.wikimedia.org/r/#/c/203874/ is still awaiting review.

The MobileFrontend part however is finished already.

Tobi_WMDE_SW renamed this task from Show collapisble sections for Statements and Sitelinks to Show collapsible sections for Statements and Sitelinks.Jun 5 2015, 9:07 AM

As already said in https://gerrit.wikimedia.org/r/#/c/203874/6/view/resources/wikibase/wikibase.css I suggest to add an font-weight: normal to make the change and the resulting layout less offensive. For comparison:

From top to bottom:

  • Before the patch.
  • After the patch, bold.
  • After the patch, with the suggested font-weight: normal.
JanZerebecki moved this task from Doing to Done on the Wikidata-Sprint-2015-06-02 board.
JanZerebecki added a subscriber: JanZerebecki.

Per Thiemo.

Sorry, this was almost merged but is not yet.

Change 203874 merged by jenkins-bot:
Add heading before sitelinks section

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

Change 217799 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Make sitelinkgroupview.css more compatible with cached HTML

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

Change 217799 merged by jenkins-bot:
Make sitelinkgroupview.css more compatible with cached HTML

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

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

Afaik all patches are merged and this is resolved \o/