Page MenuHomePhabricator

Build images entry point for experiment on Minerva
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
ovasileva
Jul 21 2025, 3:24 PM
Referenced Files
F65717559: Screenshot 2025-08-05 at 10.29.31 AM.png
Aug 5 2025, 5:39 PM
F65717592: Screenshot 2025-08-05 at 10.38.35 AM.png
Aug 5 2025, 5:39 PM
F65686797: Screenshot 2025-07-28 at 11.22.16 AM.png
Jul 28 2025, 6:23 PM
F65667237: image.png
Jul 24 2025, 2:31 PM
F65667235: image.png
Jul 24 2025, 2:31 PM
F65667204: image.png
Jul 24 2025, 2:30 PM
F65667200: image.png
Jul 24 2025, 2:30 PM
F65588753: image.png
Jul 22 2025, 3:27 PM

Description

Background

We're ready to begin building the entry point experiment

Requirements

  • Images come from the article only (at a later point they might be sourced from across wikis)
  • Display only on pages that have 3 or more images
  • No max image limit (responsibe to device)
  • Images must be the right size, but no smart cropping (the right part of the image appears)
  • Image exclusion will be tracked in another ticket. (i.e. it's okay if non-related images appear in this first pass)

Design

Annotated Figma

A horizontally scrollable gallery above article content but below hatnotes and chrome.

image.png (1×794 px, 637 KB)

image.png (1×794 px, 634 KB)

image.png (350×1 px, 971 KB)

image.png (350×506 px, 422 KB)

image.png (601×402 px, 230 KB)

image.png (2×2 px, 1 MB)

image.png (2×2 px, 1 MB)

Notes:

  • Gallery appears above content and below hatnotes
  • Images in gallery have 2px border radius, 8px gap between them and a muted border.
  • Thumbnails are 175px x 175px
  • Gallery appears above content and below hatnotes
  • Images in gallery have 2px border radius, 8px gap between them and a muted border.
  • Landscape image centred and zoomed till height reaches 175 px
  • Portrait image centred and zoomed until width reaches 175px
  • Only includes illustrative images from the article
  • Only appears on pages with more than 3 annotations

Event Timeline

JScherer-WMF updated the task description. (Show Details)
JScherer-WMF moved this task from Incoming/Inbox to Ready on the Reader Growth Team board.
JScherer-WMF subscribed.

Added designs. Removing myself and moving to Ready.

Will this entry-point be Minerva-only or will there be a corresponding set of desktop designs?

ovasileva set the point value for this task to 5.

I say we target Minerva for the initial implementation's hook, with an eye toward using the same horizontal gallery entry point on the desktop article space or sidebar later once we settle on final desktop designs.

(Eg, just make sure the styles for the gallery aren't Minerva-specific and can be dropped into the appropriate part of the desktop skin.)

egardner updated Other Assignee, added: mfossati.

Change #1171728 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/ReaderExperiments@master] [WIP] Image Browsing: introduce basic front-end code

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

egardner changed the task status from Open to In Progress.Jul 22 2025, 11:27 PM

Will this entry-point be Minerva-only or will there be a corresponding set of desktop designs?

cc @bvibber

Good question! Thanks for raising this. I worked through the wider viewport version of this this morning. Assuming we have a minimum of 3 images on the articles where we show the gallery, this is what it would look like:

With infobox:

image.png (2×2 px, 1 MB)

No infobox:

image.png (2×2 px, 1 MB)

Notes:

    • The good news is that the content area on our wider viewport interface isn't that much wider because we "save" a column for the infobox. So I think the design works more or less as is as long as it's in line with the content area.
  • If we only have 3 images and no explore link for now, it might look a bit funny because we don't have enough images to "fill" the width of the page.
    • We might consider only showing the gallery on articles that have enough images to take up the space of the content area. So the logic looks something like
galleryWidth = numImages x (175 + margin); 
If galleryWidth <= contentWidth, 
  showGallery == false;
  • We should consider hiding the gallery when the reader has the "wide" preference enabled for width on Vector, or just accept that it'll look a bit funny.

I'll add these wide designs to the ticket description.

Another requirement idea that we encountered while implementing dark mode. We need to copy the thumbnail template's background colour logic for images that have transparent backgrounds so the images remain visible in dark mode. This came up a lot with black svg illustrations in dark mode on dark backgrounds.

Change #1172425 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/extensions/ReaderExperiments@master] [WIP] ImageBrowsing: Introduce Carousel component

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

Screenshot 2025-07-28 at 11.22.16 AM.png (2×2 px, 1 MB)
So right now I can make this content appear *above* the hatnote very easily (by just adding the div where I want the carousel to appear to the OutputPage content).

Is anyone aware of a properly-sanctioned way (MW hook or similar API) to inject an arbitrary <div> element just below the hatnote (so inside of the article content)?

Also, @JScherer-WMF in practice we're going to see the first 2 or 3 images from the Infobox twice on most pages here – once in the infobox and once in the carousel. Is this a problem?

Change #1171728 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Image Browsing: introduce basic front-end code

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

Change #1172425 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] ImageBrowsing: Introduce App, Carousel and CarouselItem components

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

@egardner - what QA would we like for this task? Is there anywhere (patchdemo, beta cluster) we can look at it as a part of signoff

Here are some screenshots of the entry point in desktop and mobile scenarios:

Screenshot 2025-08-05 at 10.38.35 AM.png (1×928 px, 1 MB)

Screenshot 2025-08-05 at 10.29.31 AM.png (2×2 px, 3 MB)

For now we are just placing the carousel at the top of the page as opposed to trying to interact with the infobox. We can spend some time refining the layout once more of the functionality is in place for the Image Browsing prototype as a whole.

Looks good, resolving!

Test wiki on Patch demo by LWatson-WMF using patch(es) linked to this task was deleted:

https://a7d75d00b0.catalyst.wmcloud.org/w/