Page MenuHomePhabricator

Outputting '<sup>β</sup>` on every page, not only on beta, as part of the logo is disadvantageous
Closed, ResolvedPublic

Description

Outputting '<sup>β</sup>` as part of logo link, seen f.e. on https://en.m.wikipedia.org/wiki/Jade_Terrapin_from_Allahabad today, is a bad idea.

  1. We shouldn't output beta-specific code in production
  2. This could negatively affect SEO, as some robots ignore CSS and it results in “Wikipedia β” in case we decide for mobile pages to be indexed.
  3. It also affects possible portability of MinervaNeue to other project

Beta should probably be output via beta-specific JS?!

Acceptance criteria

  • includes/skins/MinervaTemplate.php should not be directly accessing MobileContext
  • The beta character should not appear in the HTML for stable.

Developer notes

The beta character is defined in the template includes/skins/minerva.mustache

<sup>&beta;</sup>

The template will be passed a property "isBeta" and add this conditionally. This value will come from the value of SkinMinerva::OPTIONS_MOBILE_BETA

echo $templateParser->processTemplate( 'minerva', $templateData );

it's important not to use MobileContext directly as this goes against our attempts to separate Minerva from MobileFrontend.

QA

On beta cluster verify the beta character is not in the DOM for stable and IS in the DOM for beta.

Event Timeline

Volker_E created this task.Oct 29 2018, 4:21 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 29 2018, 4:21 AM

Agreed. Not quite sure what's going on here. We can vary HTML quite easily in beta/stable.

Jdlrobson triaged this task as Normal priority.Nov 1 2018, 11:24 PM

Change 473609 had a related patch set uploaded (by Bjornskjald; owner: Bjornskjald):
[mediawiki/skins/MinervaNeue@master] Add checking if template should output <sup>β</sup>

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

Change 473609 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Add checking if template should output <sup>β</sup>

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

phuedx claimed this task.Nov 15 2018, 3:39 PM
phuedx updated the task description. (Show Details)
phuedx updated the task description. (Show Details)
phuedx added a subscriber: Bjornskjald.

includes/skins/MinervaTemplate.php should not be directly accessing MobileContext

There's no mention of MobileContext in https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/5a2cfe3623e0fdaa0982518eb845fef24791b517/includes/skins/MinervaTemplate.php.

phuedx removed phuedx as the assignee of this task.Nov 15 2018, 3:44 PM
phuedx updated the task description. (Show Details)
phuedx added a subscriber: phuedx.
phuedx closed this task as Resolved.Nov 19 2018, 2:19 PM
phuedx claimed this task.

Being bold.