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)
    image.png (77×354 px, 6 KB)
  • Square logo with text/wordmark underneath (MonoBook, Vector)
    image.png (268×246 px, 17 KB)
  • 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...)
    image.png (313×242 px, 12 KB)

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

SubjectRepoBranchLines +/-
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

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

@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.

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)

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

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 subscribed.

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

T232140-1.png (2×1 px, 777 KB)

❓AC2: Confirm a logo shows on https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page
Looks like just text.
T232140-2.png (2×1 px, 369 KB)

❓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
T232140-IE11.png (2×1 px, 1 MB)
T232140-IE10.png (2×1 px, 1 MB)
T232140-IE9.png (2×1 px, 1 MB)
T232140-IE8.png (2×1 px, 1 MB)
T232140-IE7.png (2×1 px, 734 KB)

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
T232140-en.png (2×1 px, 1 MB)
T232140-enm.png (2×1 px, 760 KB)
T232140-c.png (2×1 px, 2 MB)
T232140-cm.png (2×1 px, 1 MB)
T232140-d.png (2×1 px, 1 MB)
T232140-dm.png (2×1 px, 838 KB)

✅ 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
T232140-enIE8.png (2×1 px, 3 MB)
T232140-enmIE8.png (2×1 px, 1 MB)
T232140-cIE8.png (2×1 px, 2 MB)
T232140-cmIE8.png (2×1 px, 2 MB)
T232140-dIE8.png (2×1 px, 1 MB)
T232140-dmIE8.png (2×1 px, 1 MB)

@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?

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

@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