Page MenuHomePhabricator

Show collapsible sections for Statements and Sitelinks
Closed, ResolvedPublic1 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 created this task.Apr 13 2015, 2:12 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.
Bene updated the task description. (Show Details)Apr 13 2015, 2:17 PM
Bene set Security to None.
Bene added a comment.Apr 13 2015, 5:57 PM

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.

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

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 closed this task as Resolved.May 12 2015, 11:16 AM
Jdlrobson claimed this task.
Bene reopened this task as Open.May 12 2015, 11:33 AM

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

The MobileFrontend part however is finished already.

Bene claimed this task.May 12 2015, 11:34 AM
Tobi_WMDE_SW edited a custom field.Jun 2 2015, 5:04 PM
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.

Sounds good to me.

JanZerebecki closed this task as Resolved.Jun 11 2015, 9:55 AM
JanZerebecki moved this task from Doing to Done on the Wikidata-Sprint-2015-06-02 board.
JanZerebecki added a subscriber: JanZerebecki.

Per Thiemo.

thiemowmde reopened this task as Open.Jun 11 2015, 10:22 AM

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 closed this task as Resolved.Jun 12 2015, 10:02 AM
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/