Page MenuHomePhabricator

Image Browsing: Implement loading state UI in detail view
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

We want to introduce loading indicator UI

User story

As a user with a slow connection, I want to know when the feature is loading

Requirements

Introduce loading indicator UI in the following places:

  • Detail View component – when the Detail View component is loaded a large image size is requested from the server, which may take a few seconds to load.

Design

Detail View component

Screenshot 2025-09-03 at 4.01.22 PM.png (1×1 px, 612 KB)

color should be computed average color

No Not Required items.

BDD

Feature: Loading state UI in image detail view

  Scenario: Large image load in detail view
    Given I open the detail view for an image
    When the large image is requested from the server
    Then a loading indicator is displayed with a background color based on the average color of the image
    And the indicator disappears when the image finishes loading

Test Steps

Test Case 1: Loading indicator for large image in detail view

  1. Open an image in the detail view with a throttled/slow connection (e.g., simulate in DevTools).
  2. AC1: A loading indicator is shown while the large image request is in progress.
  3. AC2: The background color of the loading state is based on the computed average color of the image.
  4. AC3: The loading indicator disappears once the image is fully loaded.

QA Results - Patchdemo

Acceptance criteria

  • Build out loading indicators according to the designs above

Notes

Details

Event Timeline

ovasileva triaged this task as High priority.

Justin wants to build design affordances for loading states where we need them but don't know where they are needed. Needs an engineer to guide Justin. Eric will reach out to Justin to help move this along.

Added designs for each of these @egardner . I think it should be ready to estimate now.

ovasileva set the point value for this task to 5.Sep 15 2025, 4:53 PM

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

[mediawiki/extensions/ReaderExperiments@master] WIP load states and optimization of detail view image

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

Current state of https://gerrit.wikimedia.org/r/1188891 implementing loading states for detail view:

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

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

[mediawiki/extensions/ReaderExperiments@master] WIP loading state for carousel placeholder

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

Latest patchrev uses the neutral color for the placeholder before the average color is available, and fixes the dark display on the icon:

chamber-music.jpg (2×2 px, 782 KB)

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

[mediawiki/extensions/ReaderExperiments@master] ImageBrowsing: add loading state for other wiki images

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

Change #1188891 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Loading states for DetailView

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

This patch has been merged, but for QA we probably need:

  1. An updated patchdemo instance
  2. Some detailed instructions for manual QA

I can add those to the task description tomorrow unless someone beats me to it.

bvibber renamed this task from Image Browsing: Implement loading state UI in various places to Image Browsing: Implement loading state UI in detail view.Sep 23 2025, 4:39 PM
bvibber updated the task description. (Show Details)

Test Result - Patchdemo

Status: ✅ PASS
Environment: Patchdemo (https://30eaa87caa.catalyst.wmcloud.org/wiki/Paris)
OS: macOS Sequoia 15.5
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Case 1: Loading indicator for large image in detail view

  1. Open an image in the detail view with a throttled/slow connection (e.g., simulate in DevTools).
  2. AC1: A loading indicator is shown while the large image request is in progress.
  3. AC2: The background color of the loading state is based on the computed average color of the image.
  4. AC3: The loading indicator disappears once the image is fully loaded.

screenshot 45.mov.gif (1×592 px, 1 MB)

screenshot 46.mov.gif (1×592 px, 1 MB)

Test Case 2: Loading indicator for images from other wikis

  1. Open an image detail view that triggers the image suggestions API to fetch images from other wikis.
  2. Throttle the network connection to simulate delay.
  3. AC4: A loading indicator is shown while the API request is in progress.
  4. AC5: The loading indicator disappears once the results are returned and rendered.

I don't believe this is implemented yes per the description

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

https://patchdemo.wmcloud.org/wikis/7a6d9a686f/w/