Page MenuHomePhabricator

Lazy loaded images: Copy `usemap` attribute for image maps
Closed, ResolvedPublic3 Estimated Story Points

Description

Note: There are several lazy loaded images bugs T207929, T199351, T209183. We'll probably want to fix these 3 bugs together.

When lazy loading imagemaps lazy loader doesn't set usemap attribute, hence breaking image maps.

How to reproduce:
Go to some article that use imagemap (the image shouldn't be small image, and not in the first section - lazy loading is done only for large images) and compare the desktop and the mobile versions.

Example:

Screen Shot 2018-11-12 at 11.11.43 AM.png (395×373 px, 137 KB)

Production test URL

Acceptance criteria

  • The usemap attribute is copied across as data-usemap in the placeholder
  • The usemap attribute is copied across when JS loads the image

QA steps

Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Image_Map_test
Click the are of the image that's Australia

Expected: Can navigate to Australia page like on desktop.

QA Results - Beta

ACStatusDetails
1T209183#6349100

QA Results - Prod

ACStatusDetails
1T209183#6371571

Event Timeline

Jdlrobson renamed this task from lazy loading images breaks imagemaps to Lazy loaded images: Copy `usemap` attribute for image maps.Nov 12 2018, 7:15 PM
Jdlrobson triaged this task as Medium priority.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.
Jdlrobson set the point value for this task to 3.Nov 27 2018, 5:50 PM
Jdlrobson added subscribers: ovasileva, Jdlrobson.

@ovasileva any chance we can schedule some time for this and the other 3 bugs listed as subtasks post-AMC deploy? (T229472 tracks them)

Change 616223 had a related patch set uploaded (by Peter.ovchyn; owner: Peter.ovchyn):
[mediawiki/extensions/MobileFrontend@master] Use data-style attribute to transfer styles from original image to lazy loaded

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

Change 616223 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Copy usemap attribute from original image to lazy loaded

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Catalina
Browser: Chrome
Device: MBP
Emulated Device: iPhone 11 Pro Max

Test Artifact(s):

QA steps

Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Image_Map_test
Click the are of the image that's Australia

✅ AC1: Expected: Can navigate to Australia (Oceania) page like on desktop.

Jul-30-2020 09-27-37.gif (894×416 px, 2 MB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: hewiki
OS: macOS Catalina
Browser: Chrome
Device: MBP
Emulated Device: iPhone 11 Pro Max

Test Artifact(s):

QA steps

Visit https://he.m.wikipedia.org/wiki/%D7%90%D7%95%D7%A8%D7%A0%D7%92%D7%90%D7%95%D7%98%D7%9F#%D7%92%D7%9C%D7%A8%D7%99%D7%94?oldid=24287114
Click the are of the image that's Australia

✅ AC1: Expected: Can navigate to Australia (Oceania) page like on desktop.

ezgif.com-optimize.gif (689×320 px, 1 MB)

ovasileva updated the task description. (Show Details)