Page MenuHomePhabricator

harmonize UI for sitelink boxes’ collapse/expand
Open, MediumPublic

Description

Issue:
Sitelinks are in boxes that can be collapsed and expanded:

Screenshot from 2017-02-14 15-06-44.png (177×392 px, 9 KB)

The links should look like other expand/collapse links, maybe similar to the language term box (T157573)

We may want to make the headline clickable.

So we could have:

Screenshot from 2017-02-14 15-20-53.png (227×1 px, 3 KB)

or the less boxy

Screenshot from 2017-02-14 15-21-01.png (171×1 px, 3 KB)

Event Timeline

Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.

Let's go with the first version.

Update: It seems that somebody independently took care of this issue. There is some improvement but it is still an issue as the "[collapse]" is visible in the first place and just later gets replaced by an arrow.

@Lydia_Pintscher Do you know who implemented this and/or is there another ticket that we can comment on?

The current UI was implemented via https://gerrit.wikimedia.org/r/252430 and https://gerrit.wikimedia.org/r/256711, tracked in T87757: [Story] Add icons to text in toolbars.

There is an unintentional "flash of unstyled content" (FOUC) happening because the relevant CSS (currently in the file jquery.wikibase.toolbaritem.css) is loaded to late, via JavaScript instead of in the pages head. To solve this specific problem we can simply move the styles to one of the MediaWiki-ResourceLoader modules that are currently loaded in the head (via ParserOutput::addModuleStyles in EntityParserOutputGenerator::addModules). I would argue the styles belong to jquery.wikibase.sitelinkgroupview.css, because the sitelinkgroupview template is where the "mw-collapsible" class is added. I will upload a tiny patch for this.

A more defined design as shown in the images above must still be implemented, and I think this here is the right ticket for this.

Change 392628 had a related patch set uploaded (by Thiemo Mättig (WMDE); owner: Thiemo Mättig (WMDE)):
[mediawiki/extensions/Wikibase@master] Fix flash of unstyled content (FOUC) on sitelinkgroupview

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

Change 392628 abandoned by Thiemo Kreuz (WMDE):
Fix flash of unstyled content (FOUC) on sitelinkgroupview

Reason:
Indeed. I don't remember why I resubmitted this as a new patch, instead of improving this existing one.

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

@Jan_Dittrich, I think this ticket was created based on an actual bug, which caused a misunderstanding. There was a bug that caused the collapse/expand button to be shown as plain text "[Expand]" and "[Collapse]" on diff pages and old revisions. This bug is now fixed via https://gerrit.wikimedia.org/r/400684. The collapse/expand button now always looks like it always was intended to look like:

image.png (64×387 px, 6 KB)

image.png (93×382 px, 7 KB)

Is this close enough to what was proposed above? Can this ticket be closed?