Page MenuHomePhabricator

[Share Highlights] Add article title in quote share
Closed, ResolvedPublic3 Estimated Story Points

Description

If the user selects text, then display the W wordmark and the article title in the branding container.

Design spec.

Make sure to doublecheck whether the singular W wordmark is not i18n'ed. If it is: chat with @JScherer-WMF to figure out how to move forward.

Acceptance criteria

  • display the W wordmark instead of Wikipedia's one
  • display the article title
  • truncate the title before it touches CC-BY-SA wordmarks

Event Timeline

matthiasmullie updated the task description. (Show Details)
matthiasmullie set the point value for this task to 3.
matthiasmullie added a subscriber: JScherer-WMF.

Change #1277707 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Share Highlight: add article title and W logo to card

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

This change displays the Wikipedia W logo and article title in the card when text is selected. The Wikipedia logo and article title elements are found in the __branding div container.

  • Adds the Wikipedia W logo as a local SVG file
  • Display the W logo next to the article title
  • Vertically aligns the inline SVGs to the article title text

Before:

  • There's no logo or article title for the share text card.

Screenshot 2026-04-28 at 1.58.08 PM.png (82×538 px, 8 KB)

  • The article-level card uses the Wikipedia wordmark queried from the page and displays it in the card.
Screenshot 2026-04-27 at 11.38.59 AM.png (548×810 px, 100 KB)
Screenshot 2026-04-27 at 11.38.36 AM.png (304×774 px, 53 KB)

After:

  • Display the W logo and article title in the card when text is selected. The 22x16 SVG was exported from the Figma spec.

Screenshot 2026-04-27 at 3.20.07 PM.png (136×764 px, 14 KB)

  • The article -level Wikipedia wordmark logo is unchanged.

Change #1277707 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Share Highlight: add article title and Wikipedia W logo to card

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

Notes for QA

  • Test both the article-level share and the selected text share user flow.
  • Bug found: article title is bold for both share entries, but should only be bold for article-level share. T424787: Share Highlight: article title should not be bold within card when text is selected
  • Beta sometimes renders no article-level text (eg. Cat) or renders with unexpected text (eg. Spain). Out of scope for this task, which focuses on the branding. Hoping this is just a beta issue, and we can recheck in production.

Expected behavior

  • When text is selected and displayed in the card, the Wikipedia W logo and article title are displayed in the card.
  • The W logo, article title, and attribution icons are the same color (font color and SVG path fill color). If it's a card with an image, then the relevant elements are var(--dominant-color-contrasting) color, while text-only cards are #000 color.
  • The article-level share is unchanged and renders the Wikipedia wordmark. Note that the article title is not present in the article-level card.

Example articles for testing

Article with images on beta:

Article with no image on beta:

Thank you, @lwatson for QA Notes!

Checked on enwiki beta - no issues are found.

  • no lead image, long article title, dark mode

Screenshot 2026-05-01 at 5.34.57 PM.png (626×523 px, 32 KB)

  • a lead image is present; dark mode

Screenshot 2026-05-01 at 5.09.46 PM.png (920×527 px, 454 KB)

  • examples from QA Notes
Articles with imagesCat
Screenshot 2026-05-01 at 5.46.33 PM.png (910×500 px, 388 KB)
Cuba- dark mode
Screenshot 2026-05-01 at 5.49.25 PM.png (915×521 px, 54 KB)
No imageSpain - dark mode
Screenshot 2026-05-01 at 5.37.24 PM.png (642×529 px, 53 KB)
Car
Screenshot 2026-05-01 at 5.42.04 PM.png (615×507 px, 35 KB)
KSarabia-WMF subscribed.

LGTM. Signing off.