Page MenuHomePhabricator

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

Description

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:
https://cs.m.wikipedia.org/wiki/%C5%A0ablona:Neov%C4%9B%C5%99eno and ultimately Template:Cedule

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

Examples:

Find more examples:
https://cs.m.wikipedia.org/w/index.php?title=Speci%C3%A1ln%C3%AD:Co_odkazuje_na/%C5%A0ablona:Cedule&limit=500

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)!

Japanese

Russian

Chinese

Problematic

French Wikipedia:

CZ Wikipedia

Spanish wiki

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

Portuguese

Polish

No change

German:
<same as current treatment>

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:
https://m.mediawiki.org/wiki/Topic:Ueubfzql99uwvorl

Event Timeline

Jdlrobson triaged this task as Normal priority.Aug 15 2018, 12:06 AM
Jdlrobson created this task.
Jdlrobson moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
Jdlrobson updated the task description. (Show Details)Aug 17 2018, 3:05 PM
Jdlrobson updated the task description. (Show Details)Aug 21 2018, 6:38 PM
Jdlrobson updated the task description. (Show Details)Aug 21 2018, 7:01 PM
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
Quiddity removed a subscriber: Quiddity.Oct 4 2018, 10:37 PM
Nirmos removed a subscriber: Nirmos.Nov 28 2018, 12:22 AM
Restricted Application added a subscriber: Urbanecm. · View Herald TranscriptNov 28 2018, 12:22 AM
Dvorapa added a comment.EditedDec 2 2018, 6:42 PM

The very same issue was also discussed in T206177: Page issues: Simplify class selectors we support to provide more sustainable support for severity parsing, but provides a different solution.

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.