Page MenuHomePhabricator

Make page issue and hatnote classes names configurable so we are not English-Wikipedia centric
Closed, DuplicatePublic


While en.wikipedia uses the "ambox" class to flag issues, the class name is not consistent across projects, meaning most projects will not benefit from the page issue warning work and that this project is very English-Wikpedia-centric (which is bad!).

For instance, cswiki, uses the class "labelced" defined inside: and ultimately Template:Cedule

Even more problematic, these boxes look like content on mobile and are confusing

Screen Shot 2018-08-14 at 5.02.15 PM.png (628×368 px, 87 KB)


Find more examples:

With new treatment

The new treatment causes some changes to various wikis that may be unexpected but is not avoidable, due to the fact we have optimised for English Wikipedia

Works (but broken iconography)!


Screen Shot 2018-08-21 at 11.59.28 AM.png (299×682 px, 48 KB)


Screen Shot 2018-08-21 at 11.57.16 AM.png (310×692 px, 62 KB)


Screen Shot 2018-08-21 at 12.02.29 PM.png (385×688 px, 82 KB)


French Wikipedia:

Screen Shot 2018-08-21 at 11.32.06 AM.png (234×481 px, 28 KB)

CZ Wikipedia

Screen Shot 2018-08-21 at 11.36.24 AM.png (303×637 px, 45 KB)

Spanish wiki

Screen Shot 2018-08-21 at 11.39.33 AM.png (357×668 px, 44 KB)

Italian wiki
("Questa voce o sezione sugli argomenti giornalisti italiani e politici italiani non cita le fonti necessarie o quelle presenti sono insufficienti....")

Screen Shot 2018-08-21 at 11.49.43 AM.png (432×804 px, 109 KB)


Screen Shot 2018-08-21 at 11.58.36 AM.png (380×698 px, 79 KB)


Screen Shot 2018-08-21 at 12.00.49 PM.png (375×702 px, 63 KB)

No change

<same as current treatment>

Screen Shot 2018-08-21 at 11.37.47 AM.png (512×646 px, 92 KB)

Acceptance criteria

  • Make any adjustments to the code that prevent us from writing guidelines
  • Provide a set of guidelines explaining how wikis can opt into the new page issues templates

Developer notes

Allow customisation

ResourceLoaderLessVarFileModule.php provides a way to pass less variables from messages. This could be utilised to define the selectors inside resources/skins.minerva.content.styles/templates/ambox.less allowing editors to configure them, themselves. We can also pass in LESS variables from config variables if message parsing is a little too scary.

If we followed this approach the .ambox selector and .mbox-text-span, mbox-image selectors would need configuration.
The PageIssues parser also needs to be configurable via resources/skins.minerva.scripts/pageIssueParser.js

The cswiki template is actually much more mature than the enwiki template (it uses divs rather than tables), so it seems backwards to recommend cswiki adopt the enwiki templates.

Configure the ambox class

At minimum we should make ambox class configurable, identify the classes they use on all projects and make sure they all get hidden/stripped on mobile if the mobile standard classes are not used. If things are broken users are more likely to fix them if we give them instructions.

Add generic class clues so templates can opt in as they wish

We'll need to provide guidance on how projects can opt into the mobile issues treatment - e.g. which classes are needed and what they should mark up (e.g. image, severity level, issue, fix) so that our page issue parser can read them.

See also:

Event Timeline

Jdlrobson triaged this task as Medium priority.Aug 15 2018, 12:06 AM
Jdlrobson created this task.
Jdlrobson moved this task from Incoming to Needs Prioritization on the Web-Team-Backlog board.
Jdlrobson updated the task description. (Show Details)

We chatted about this. Two possible next steps (both of which require a task):

  • Retroactively feature flag the page issues feature so that we can disable it on wikis on request (probably a 5-8 pointer)
  • Engineers produce a set of guidelines explaining how template editors can update their templates to be compatible with page issues
Dvorapa renamed this task from Make page issue class names configurable so we are not English-Wikipedia centric to Make page issue and hatnote classes names configurable so we are not English-Wikipedia centric.Dec 2 2018, 7:16 PM
Dvorapa added subscribers: TheDJ, Vachovec1.