Page MenuHomePhabricator

Share Highlights: add loading state
Closed, ResolvedPublic5 Estimated Story Points

Description

Implement the loading state for the share dialog (Figma spec). Before the image and text populate the quote card, show a loading state to indicate that data is loading.

Acceptance Criteria

Recommended approach based on today's discussion:

  • Text loading state: For page-level share (no text selection is present), let's add a simple "pending state" for text content that we don't have at the moment the dialog opens. Use unicode black space characters (solid box) to create the maximum number of lines of text (we truncate via line-clamp) until the real text is available
    • Licensing info (which comes from an API call) should also get the black bar placeholder treatment
  • Image loading state: use whatever low-resolution page image we already have and replace with the high-res one behind the scenes. If necessary we may need to add a spinner on top, but let's see how noticeable the low-res image is. Fancy blur effect could help if the pixellation is noticeable
  • Button loading state: use a spinner until the downloadeable/sharable image is ready

Event Timeline

It would replace the button in that loading state

image.png (1×722 px, 481 KB)

A couple of points / questions about this task:

  • Are we using the page summaries endpoint for page-level (no quote selected) text? Per @Jdlrobson we should not rely on Extension:TextExtract
  • Do we just need a loading state for the image generation (before it can be shared/downloaded) or for the entire text/image content of the dialog? We don't currently have a "skeleton UI" loading component FWIW.
egardner updated the task description. (Show Details)
egardner set the point value for this task to 5.Apr 15 2026, 4:58 PM

Change #1276412 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Show existing thumbnail while loading higher res version

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

Change #1276691 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Add placeholder text while extract loads

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

Change #1278566 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] 1-line attribution & preserve space ahead of time

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

Change #1280447 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Disable interactions until load is complete

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

Change #1276691 abandoned by Matthias Mullie:

[mediawiki/extensions/ReaderExperiments@master] Add placeholder text while extract loads

Reason:

Rolled into https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ReaderExperiments/+/1278566

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

Change #1276412 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Show existing thumbnail while loading higher res version

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

Merged patch c68694c376fe7abdcf515f79b586056d9b7683f2 appears to have broken the wordmark and CC icons

image.png (1×1 px, 790 KB)

It doesn't do any CORS setup so can't load images from Commons, meaning it's unusable until it's fixed. I've reverted this commit in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ReaderExperiments/+/1283946

Change #1284586 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Show existing thumbnail while loading higher res version

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

Change #1284586 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Show existing thumbnail while loading higher res version

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

Change #1278566 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] 1-line attribution & text placeholders

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

Change #1280447 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Disable interactions until load is complete

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

Change #1286456 had a related patch set uploaded (by Jdlrobson; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@wmf/1.47.0-wmf.2] Disable interactions until load is complete

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

Change #1286456 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@wmf/1.47.0-wmf.2] Disable interactions until load is complete

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

Mentioned in SAL (#wikimedia-operations) [2026-05-12T21:43:56Z] <jdlrobson@deploy1003> Started scap sync-world: Backport for [[gerrit:1286456|Disable interactions until load is complete (T422968 T424787)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-12T22:01:30Z] <jdlrobson@deploy1003> jdlrobson: Backport for [[gerrit:1286456|Disable interactions until load is complete (T422968 T424787)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-12T22:17:58Z] <jdlrobson@deploy1003> Finished scap sync-world: Backport for [[gerrit:1286456|Disable interactions until load is complete (T422968 T424787)]] (duration: 34m 01s)

Loading state looks good!