Once we're using headless doc fragments which are pre-transformed before being attached to the DOM, it should be easier to integrate lazy loading using its normal methods without us having to swap out the images for span placeholders in native code, as we did in our attempt in this spike T174711.
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Mhurd | T175320 Switch to using headless section transform and attachment | |||
Resolved | Mhurd | T175323 Integrate lazy image loading transform |
Event Timeline
Comment Actions
@JMinor I noticed you moved this to doing, but guessing you meant 'blocked' so we can give the headless transform bits some time to shake out?
Comment Actions
Per discussion at planning doing quick spike to re-evaluate integrating this with our new headless section loading code.
Comment Actions
Spike results:
Wiring up trial integration was fairly easy.
Issues:
- image taps will need to be modified (gallery not loaded)
- weird light flicker when images appear (noticed on dark mode)
- even though images are hidden and appear at correct time, loading a previously unloaded article without scrolling at all, then disconnecting the internet, then scrolling, the images all appear as they are scrolled to, which indicates they were pre-fetched and not lazily loaded... trying to debug this presently, but seeing similar behavior on the lazy loading demo on safari (whereas it seems to work as expected on chrome/firefox)
Comment Actions
@Niedzielski's gonna take a peek at the safari issue i mentioned above. Throwing this back in blocked/waiting in mean time.
Comment Actions
Testing criteria
Because we're re-wired how article images are managed, the following test cases would be good to re-run:
- 43
- 49
- 50
- 65 to 67
- 75 to 77
- 84 to 86
Test fast scrolling too:
- load an article with lots of images like enwiki > Pablo Picasso
- once it appears, scroll very quickly down the article, about half way to the bottom should be fine
- because you've scrolled very quickly, a lot of the images may have been just gray placeholder boxes as you scrolled past them
- so now scroll more slowly back up to the top of the article and ensure that the images are now showing (instead of the gray placeholder boxes)
Comment Actions
Lots of testing on this across 5.7.3 builds. Looks good on 5.7.3 (1296). Moving to signoff