Page MenuHomePhabricator

Structured data heading is level-1 instead of level-2, because it's a slot and that's how MediaWiki represents them; let's over-ride this
Closed, ResolvedPublic

Description

On a file page (or diff page of file page), like this one, the “structured data” heading is a level-1 heading (<h1> in HTML, = heading = in Wikitext) instead of a level-2 one (<h2> / == heading ==). Since all the other headings below this one are level-2 (summary, licensing, file history, etc.), this gives the impression that they all belong to the “structured data” section, which is not the case.

Related Objects

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
OpenNone
DuplicateNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedCparle
OpenNone
ResolvedPDrouin-WMF
ResolvedCparle
ResolvedCparle

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 17 2018, 9:48 PM

Correct, but the announcement only said to use the Multimedia tag :/

Ramsey-WMF triaged this task as Normal priority.Dec 17 2018, 10:38 PM
Ramsey-WMF edited projects, added SDC Engineering; removed StructuredDataOnCommons.
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.

There's an implicit H1 for the wikitext block that we've screwed up by moving our content above. In designs for the future we'll split this all up with tabs, but not sure what @Ramsey-WMF wants done right now, if anything?

We will indeed split this up into tabs, but the captions will *probably* still be in that spot. Let's see if we get more input on this one before we make a decision.

Cparle added a subscriber: Cparle.Jan 9 2019, 4:45 PM

Fix for this is pretty simple - line 237 of includes/Revision/RevisionRenderer.php

Fix for this is pretty simple - line 237 of includes/Revision/RevisionRenderer.php

No, that doesn't fix it, that proposes making things worse by hijacking generic code for our purposes. The slots are intentionally separated by H1s, with the main slot represented implicitly by the title H1, but our moving things around confuses things.

Cparle added a comment.EditedJan 9 2019, 6:08 PM

Ah! I had assumed that the generic h1 in RevisionRenderer was arbitrary, hadn't understood about the page h1's implied covering of the main slot

Yeah, eventually PageHandler will let anyone do arbitrary things and there'll be a proper system for us to integrate with, but right now it's just our bespoke code.

For the sake of visual consistency, if a structured data section has to be in a tab with other content, then all the headers, wether about structured data or not, should all be at same size. All in h1 or all in h2, no matter for me.

For the sake of visual consistency, if a structured data section has to be in a tab with other content, then all the headers, wether about structured data or not, should all be at same size. All in h1 or all in h2, no matter for me.

As I understand it, the tabs (which will replace the H1s) are "File information" (captions and the wikitext block) and "Structured data" (for all the statements and the EXIF-extracted data). Possibly we could look at having other tabs for the file history (currently shown as if it's part of the content block) and the file usage information (ditto)? Of course, all of that is subject to change based on feedback.

Jdforrester-WMF renamed this task from Structured data heading is level-1 instead of level-2 to Structured data heading is level-1 instead of level-2, because it's a slot and that's how MediaWiki represents them; let's over-ride this.Jan 18 2019, 9:07 PM

Will the caption be in the structured data tab or in the file info tab?

revi awarded a token.Jan 20 2019, 4:25 AM

This is fixed for sites with statements (Depicts) live. Leaving to Ramsey to decide how to represent that in Phabricator. :-)

fixed on test-commons

Ramsey-WMF closed this task as Resolved.Apr 23 2019, 11:48 PM

With the layout changes that came with tabs, this is no longer an issue anywhere. Closed!