Per https://www.mediawiki.org/wiki/Recommendations_for_mobile_friendly_articles_on_Wikimedia_wikis#Use_supported_ambox_classes_to_clarify_severity we should provide an easy way for editors to register severities on templates and opt-into Minerva's issue code. This will allow us as part of deployment to engage community to address these problems.
Right now our code does this sort of thing:
LOW: /ambox-style|avviso-stile/, // en, it MEDIUM: /ambox-content|avviso-contenuto/, // en, it HIGH: /ambox-speedy|ambox-delete|ambox-serious|avviso-importante/ // en, en, es / ru, it // ..And everything else that doesn't match should be considered DEFAULT.
Having different classes for every language is unsustainable, in particular when used like this:
POINT_OF_VIEW: new RegExp( [ // en 'ambox-Advert', 'ambox-autobiography', 'ambox-believerpov', 'ambox-COI', 'ambox-coverage', 'ambox-criticism', 'ambox-fanpov', 'ambox-fringe-theories', 'ambox-geographical-imbalance', 'ambox-globalize', 'ambox-npov-language', 'ambox-POV', 'ambox-pseudo', 'ambox-systemic-bias', 'ambox-unbalanced', 'ambox-usgovtpov'
so I suggest we provide some opt in classes
We should aim to simplify the regexs inside pageIssuesParser.
Right now we recommend the following classes. While these provide editors a way to opt in, the classes don't really make sense for what we're using them for and it's not clear at all they are needed for mobile.
Purpose Class to use POINT_OF_VIEW ambox-POV MOVE/MERGE ambox-move Medium severity issue ambox-content High severity issue ambox-serious Low severity issue ambox-style
These recommended class should be more neutral and descriptive and look like this:
Purpose Class to use POINT_OF_VIEW mobile-issue-pov MOVE/MERGE mobile-issue-move Medium severity issue mobile-issue-severity-medium High severity issue mobile-issue-severity-high Low severity issue mobile-issue-severity-low
Acceptance criteria
- mobile-issue-pov, mobile-issue-move, mobile-issue-severity-medium, mobile-issue-severity-high and mobile-issue-severity-low are all recognised class names
QA steps
Visit https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=T206177 and make sure all the icons show as expected in all the linked pages.
Sign off step
- Update https://www.mediawiki.org/wiki/Recommendations_for_mobile_friendly_articles_on_Wikimedia_wikis#Use_supported_ambox_classes_to_clarify_severity with the new recommended class names
- Make a task to review and simplify the regex's after page issues is shipped and editors have started "standardising" on class names.
- Talk to English Wikipedia template editors about adding these class names in the appropriate places so that we can drop all the other classes in our code.
- Work with templates/editors to drop non-english wikipedia class names e.g. avviso-struttura, avviso-stile etc..