Page MenuHomePhabricator

[Share Highlights] Handle language-specific Wikipedia logos
Open, MediumPublic2 Estimated Story Points

Description

The quote card's designs contain a Wikipedia logo icon that should be specific to the target project's language.
For instance, here is the white version:

Screenshot 2026-03-10 at 19.03.16.png (1×878 px, 145 KB)

See also T418602: [DESIGN] Share highlights and article share on Minerva and Figma spec.

Acceptance criteria

  • for the experiment's sake, we could narrow to Arabic, Chinese, French, Indonesian, Vietnamese, and English

[] Codex icons don't seem to have logos, so we need to host SVG icons in ReaderExperiments

    • we found we can reuse the existing wordmark SVG from $wgLogos; in this case we pull it directly from the MobileFrontend HTML
  • figure out how to load appropriate icons depending on the Wikipedia language chapter
    • done -- pulling the currently configured wordmark, which already gives us a localized SVG URL, a localized alt text, and a width/height
  • take into account LTR and RTL behavior
    • Existing flipping seems to account for the left/right positioning of the wordmark image correctly in testing with Arabic

Event Timeline

HSwan-WMF set the point value for this task to 2.Mar 12 2026, 4:48 PM

@JScherer-WMF note we're currently blocked on a design question: Jon and I aren't certain whether the wordmark is supposed to use whatever the currently configured mobile header wordmark is on the MediaWiki site configuration -- eg that right now it SHOULD include the "Wikipedia 25" logo -- but also means none of our local development/test sites will show the "WikipediA" wordmark unless we do some local configuration, but the implementation is simply "reuse this existing element's URL") ... or whether it's meant to hardcode the standard wordmark SVGs (in which case it's copy 6 files and hardcode the links based on site language).

Need a decision from design to proceed.

Change #1260835 had a related patch set uploaded (by Bvibber; author: Bvibber):

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: Use the live Wikipedia wordmark in the quote share

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

As noted above we unblocked on design decision to go ahead and use the live wordmark, which keeps things nice and simple. Using CSS filters to invert( 1 ) the brightness for dark-mode and Wikipedia-style output, and saturate( 0 ) it to force the Wikipedia 25 images to grayscale. Opacity is applied on the img element, and alt text and sizes are copied from the live original. Seems to work well.

Note some followup for using this while in dark mode -- there are a few bits in the styles that need to be fixed so the "light" output produces correct output in "dark mode", as well as fixing the background in the images for both light and dark mode. But that's outside of scope so I haven't touched thoes :D

Change #1260835 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: Use the live Wikipedia wordmark in the quote share

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

Ok I think this is fine per the version of the spec implemented -- as we separate out the 'page' vs quote' share mode implementations we'll want to treat them separately per updated design plans. Fine to keep in QA for now; should be live on beta.

Example testing on beta:

image.png (1×2 px, 344 KB)

this shows the configured mobile beta logo, which would on the live wikis be the live, localized logo wordmark SVG.