Page MenuHomePhabricator

Separate out logo handling into square image logos and long text/wordmark banner logos
Closed, ResolvedPublic

Description

Basically, we seem to have three sorts of logo layout:

  • Long banner/wordmark, in which it's either just the text logo, or an image plus the text logo (Minerva, BlueSky, CologneBlue, Timeless header/on mobile)
  • Square logo with text/wordmark underneath (MonoBook, Vector)
  • Square logo one place, text/banner/wordmark elsewhere in interface (Timeless desktop - text in header, square in sidebar, GreyStuff - banner/text in header, square logo in footer, or at least that was the idea...)

By splitting the logo into two distinct images, a square image logo if applicable and a long text/wordmark version, we could thus minimise the number of uploads required for branding different types of skins while consistently supporting all of them:

  • Assemble the MonoBook/Vector logos by placing a 135-150px square logo image above a 135-150px centered/text wordmark
  • Allow skins to use only text/wordmark or logo image in different places as appropriate

For backwards compatibility:

  • Fall back to $wgLogo etc if none of the new stuff is specified (what Timeless currently does for the square sidebar logo)
  • Fall back to styled text message containing by default (sitetitle) or whatever if no wordmark image is specified (Minerva uses (mobile-frontend-footer-sitename) and Timeless uses (timeless-sitetitle) custom messages as wrappers currently, but we likely do want to standardise this as well)

Developer notes

We'll introduce a wgLogos array which will replace wgLogo and wgLogoHD.

QA steps

ASAP

Using an old device (IE7 on browserstack suggested)

On Thursday, February 27:

  • Open Wikipedia, Commons, and Wikidata (in any language) from a modern browser. Confirm there is no changes to the logos.
  • Open Wikipedia, Commons, and Wikidata (in any language) from IE 8. Take a screenshot of the logo (we are expecting it to look broken)

Sign off notes

  • Setup a task for a config change to replace MinervaCustomLogos with wgLogos
  • Setup a task to make a configuration change to merge MinervaCustomLogos, wgLogo and wgLogoHD

QA Results

Details

ProjectBranchLines +/-Subject
mediawiki/coreREL1_35+21 -10
mediawiki/coremaster+21 -10
mediawiki/skins/MinervaNeuemaster+2 -108
operations/mediawiki-configmaster+7 -1
operations/mediawiki-configmaster+3 K -1 K
mediawiki/coremaster+7 -0
mediawiki/skins/MinervaNeuemaster+1 -1
mediawiki/skins/MinervaNeuemaster+146 -23
mediawiki/coremaster+0 -0
operations/mediawiki-configmaster+3 -1
mediawiki/extensions/ContentTranslationmaster+6 -15
mediawiki/coremaster+3 -2
mediawiki/skins/MinervaNeuemaster+1 -1
mediawiki/skins/Vectormaster+3 -99
mediawiki/extensions/WikimediaIncubatormaster+9 -4
mediawiki/coremaster+1 -1
mediawiki/coremaster+3 -1
mediawiki/coremaster+1 -1
operations/mediawiki-configmaster+3 -0
operations/mediawiki-configmaster+4 -1
mediawiki/coremaster+203 -42
operations/mediawiki-configmaster+12 -2
operations/mediawiki-configmaster+11 -7
mediawiki/coremaster+59 -1
mediawiki/coremaster+0 -0
mediawiki/skins/Vectormaster+4 -101
mediawiki/coremaster+123 -83
Show related patches Customize query in gerrit

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Krinkle added a subscriber: Tgr.Feb 13 2020, 11:19 PM

Side note, wfDeprecated is used wrong here:

  • the third argument is for specifying the extension/library, using it for an extra message like here just adds to the confusion. If it's important (IMO not) put it in the first parameter.
  • by default caller offset is two, which is appropriate for deprecating a function (the deprecation warning tells which function called the function that calls wfDeprecated). Since it's not ResourceLoaderSkinModule::getAvailableLogos itself that's being deprecated, that's confusing here and a caller offset of 1 should be used.

Linting issue is now fixed. In future if I'm ever away please feel free to fix such linting issues rather than block on me returning.

Thanks for the suggestion on the test I tried incorporated it (PS7) but it didn't work sadly so I've reverted back to temporarily disabling it (PS8)

Change 572308 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] Correctly use wfDeprecated function signature for wgLogoHD

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

Change 572322 by @Jdforrester-WMF and @Tgr

[mediawiki/core@master] Follow-up 37a69a2f: ResourceLoaderSkinModule: Fix wfDeprecated() syntax

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

Change 572308 abandoned by Thiemo Kreuz (WMDE):
Correctly use wfDeprecated function signature for wgLogoHD

Reason:
Obsolete via Iadeec95.

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

☝️ @Jdlrobson I've left a question about the deprecation notice for wgMinervaCustomLogos not being shown in one scenario.

Change 551670 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Deprecate wgMinervaCustomLogos in favor of $wgLogos

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

Change 573419 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Mobile logo should fall back to PNG if no SVG support

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

Is there a patch for ContentTranslation? Otherwise this'll emit a bunch of hard deprecation warnings in production.

Change 573419 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Mobile logo should fall back to PNG if no SVG support

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

@Jdlrobson Which are the browsers you have in mind here. IE 6-8 shouldn't be our concern here and Android < 3 is also neglible. Falling back to text seems more reasonable here than caring for PNG automation implementation and maintenance.

Is there a patch for ContentTranslation? Otherwise this'll emit a bunch of hard deprecation warnings in production.

Oh geez i completely missed that ContentTranslation was using this in that way.

https://gerrit.wikimedia.org/g/mediawiki/extensions/ContentTranslation/+/881f4279ab78f95ee34553a75817ae7764baf08f/specials/ContentTranslationSpecialPage.php

My read of the code is that this won't lead to deprecation warnings in production as we are still defining the value in config and ContentTranslation is reading directly from config and catching exceptions not using the Minerva function. We will need to fix that for compatibility however ASAP before we can clean up the config.

Yeah, sorry, was told about that by Krinkle whilst looking at writing config patches myself; see https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/572998

Change 572984 had a related patch set uploaded (by Krinkle; owner: Jforrester):
[mediawiki/extensions/WikimediaIncubator@master] Read from (and write to!) wgLogos, not the deprecated wgLogo

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

Change 572984 merged by jenkins-bot:
[mediawiki/extensions/WikimediaIncubator@master] Read from (and write to!) wgLogos, not the deprecated wgLogo

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

Change 573762 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/ContentTranslation@master] Use wgLogos['wordmark'], not the removed wgMinervaCustomLogos

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

Change 573767 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/skins/MinervaNeue@master] Follow-up 51a34809: Don't hard-deprecate something still set in config, you'll break prod

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

Change 573768 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/skins/MinervaNeue@master] Hard-deprecate $wgMinervaCustomLogos being set

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

Change 573769 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/skins/MinervaNeue@master] Drop support for $wgMinervaCustomLogos being set

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

Change 573816 had a related patch set uploaded (by Niedzielski; owner: Stephen Niedzielski):
[mediawiki/core@master] [doc] [PHP] fix wfDeprecated() description

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

Mentioned in SAL (#wikimedia-operations) [2020-02-21T13:38:15Z] <reedy@deploy1001> Synchronized php-1.35.0-wmf.20/includes/resourceloader/ResourceLoaderSkinModule.php: T245778 T245182 T232140 (duration: 01m 00s)

Jdlrobson reassigned this task from Jdlrobson to ovasileva.Feb 21 2020, 6:19 PM

@ovasileva important question that needs answer before Tuesday: currently when the new changes roll out we will be dropping support for showing the logo on older devices eg. Android 2, IE6-8. If we want to retain that support I need you to move this into needs more work with a comment. If this is fine you can resolve (or arrange a later QA of logos everywhere).

This change is done. There is some config cleanup to do but that will be done separately outside this ticket.

Change 573767 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Follow-up 51a34809: Don't hard-deprecate something still set in config, you'll break prod

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

Change 573816 merged by jenkins-bot:
[mediawiki/core@master] [doc] [PHP] fix wfDeprecated() description

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

@ovasileva important question that needs answer before Tuesday: currently when the new changes roll out we will be dropping support for showing the logo on older devices eg. Android 2, IE6-8. If we want to retain that support I need you to move this into needs more work with a comment. If this is fine you can resolve (or arrange a later QA of logos everywhere).

This change is done. There is some config cleanup to do but that will be done separately outside this ticket.

This is fine. Let's go to QA to capture a screenshot of what they would look like in these browsers, in case this comes up later.

ovasileva updated the task description. (Show Details)Feb 24 2020, 9:15 AM

Change 573762 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Use wgLogos['wordmark'], not the removed wgMinervaCustomLogos

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

Jdlrobson updated the task description. (Show Details)Feb 24 2020, 6:11 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)Feb 24 2020, 6:13 PM

Change 574525 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update you-should-let-a-logo reminder to point to $wgLogos, not $wgLogo

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

Change 573419 abandoned by Jdlrobson:
Mobile logo should fall back to PNG if no SVG support

Reason:
After discussion with Olga and Volker we have decided to no longer support these browsers. Those browsers will see a broken image (img tag pointing to unsupported SVG file)

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

Change 574525 merged by jenkins-bot:
[mediawiki/core@master] Update you-should-set-a-logo reminder to point to $wgLogos, not $wgLogo

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

ovasileva removed ovasileva as the assignee of this task.Feb 25 2020, 6:06 PM

Change 570379 merged by jenkins-bot:
[operations/mediawiki-config@master] Merge $wgLogo and $wgLogoHD into $wgLogos

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

Mentioned in SAL (#wikimedia-operations) [2020-02-27T00:13:15Z] <jforrester@deploy1001> Synchronized wmf-config/CommonSettings.php: T232140: Stop setting wgLogoHD from wgLogos (duration: 01m 05s)

Mentioned in SAL (#wikimedia-operations) [2020-02-27T00:15:12Z] <jforrester@deploy1001> Synchronized wmf-config/InitialiseSettings.php: T232140: Merge definition of wgLogos and wgLogo (duration: 01m 04s)

Change 573768 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Hard-deprecate $wgMinervaCustomLogos being set

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

Change 575293 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] installer: Write to wgLogos, not wgLogo

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

I note that Setup.php and SkinModule still depend on wgLogo by default for transmitting the default logo path. Fixing this is a prerequisite to deprecating wgLogo and (later) removing the consuming code.

Codesearch: Config::get for "Logo".

It looks like GrowthExperiments/ConfirmEmailHooks.php is still using wgLogo.

Edtadros reassigned this task from Edtadros to ovasileva.Mar 2 2020, 6:49 AM
Edtadros added a subscriber: Edtadros.

Test Result

Status: ✅ PASS
OS: macOS Catalina
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX
Virtual Device: Various Browserstack browsers and Windows OS

Test Artifact(s):

QA steps

Note: I lost the images I had taken previously and on 2/28. The images are from 3/1

✅ AC1: Confirm a logo shows on https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page


❓AC2: Confirm a logo shows on https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page
Looks like just text.

❓AC3: Using an old device (IE7 on browserstack suggested)
Take a screenshot of the broken logo on https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page and attach to this ticket
Looks like just text. Additionally the page, or for that matter any Wikipedia page prod or beta don't show up on browserstack IE7 and IE6, this might be a Windows XP issue because I get the same on IE8 on Win7, but not Win8.

IE11IE10IE9IE8IE7 & IE6

On Thursday, February 27 (see note):

✅ AC4: Open Wikipedia, Commons, and Wikidata (in any language) from a modern browser. Confirm there is no changes to the logos.

ENWIKIENWIKI-mobCommonsCommons-mobWikidataWikidata

✅ AC5: Open Wikipedia, Commons, and Wikidata (in any language) from IE 8. Take a screenshot of the logo (we are expecting it to look broken)

ENWIKIENWIKI-mobCommonsCommons-mobWikidataWikidata
Edtadros updated the task description. (Show Details)Mar 2 2020, 6:50 AM

@ovasileva I have some question marks on some of the acceptance criteria. This could be due to when the images were taken. Everything looks as expected in production.

Thanks @Edtadros! @Jdlrobson - do you know what might have happened to the wordmark on the beta cluster?

ovasileva removed ovasileva as the assignee of this task.Mar 2 2020, 6:19 PM

Change 576157 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Restore beta cluster logo on mobile

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

The beta cluster logo issue will not impact production. I'll work with @Jdforrester-WMF fix it but it doesn't need to block signing this off.

ovasileva closed this task as Resolved.Mar 3 2020, 9:14 AM
ovasileva claimed this task.

Sounds good, thanks for looking into it @Jdlrobson. Resolving.

Change 576157 abandoned by Jdlrobson:
Restore beta cluster logo on mobile

Reason:
no longer necessary - logo is back. Thanks James!

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

Change 573769 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Drop support for $wgMinervaCustomLogos being set

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

Krinkle reopened this task as Open.EditedMar 15 2020, 10:31 PM

@Jdlrobson There are still two unresolved issues:

  • The default in Setup.php fills in the old deprecated setting, whereas it should (instead, or also) be filing in the new one. Otherwise, the branch in SkinModule for wgLogo can never be deprecated.
  • The installer generates LocalSettings.php files with assignments for the deprecated setting. (work in progress at https://gerrit.wikimedia.org/r/575293)
Jdlrobson closed this task as Resolved.Mar 16 2020, 2:08 PM

@Krinkle my understanding was that we were going to keep wgLogo as an easy configuration option and not actually deprecate it ever.

Either way let's create a new task for any future work so as not to cause confusion about what's remaining.

Change 575293 merged by jenkins-bot:
[mediawiki/core@master] installer: Write to wgLogos, not wgLogo

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

Change 616982 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@REL1_35] installer: Write to wgLogos, not wgLogo

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

Change 616982 merged by jenkins-bot:
[mediawiki/core@REL1_35] installer: Write to wgLogos, not wgLogo

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