Page MenuHomePhabricator

[Bug] Upload page shows a neverending loading spinner when viewport cannot be scrolled.
Closed, ResolvedPublic3 Story Points

Description

Steps to reproduce

  1. Create an account and login
  2. Upload one image
  3. Visit your uploads page in mobileview

Expected results

The image is displayed

Actual results

The image is displayed with a loading spinner that persists indefinitely

Environments observed

Browser Version:

  • Chromium v64.0.3282.167 (Official Build) Built on Ubuntu , running on Ubuntu 17.10 (64-bit)

Notes

It seems that when the number of uploaded medias is nonzero and may be fetched in a single request, the loading spinner never disappears.

Works: https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Uploads/jdlrobson
Fails: https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Uploads/Wik781

Environments observed

OS Version:

  • Ubuntu v17.10

Device Model:

  • Desktop

Device Language:

  • English (beta cluster)

Developer notes

This appears to be viewport specific and happens when the viewport cannot be scrolled. If you minimise your window the spinner disappears. This is thus a problem for the InfiniteScroll module.

The InfiniteScroll module should fire an event straight away as it cannot rely on scrolling.

Probably fire _onScroll when constructing it https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/mobile.infiniteScroll/InfiniteScroll.js#L59

AC

  • Infinite scrolling works well on short pages like the uploads page with just one image
  • Infinite scrolling keeps working fine on long pages
  • Other uses of infinite scrolling are unaffected by the fix (resources/mobile.watchlist/WatchList.js, resources/mobile.gallery/PhotoList.js, resources/mobile.categories.overlays/CategoryOverlay.js)

Testing criteria

On a mobile browser and desktop browser test the following:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 26 2018, 11:40 PM
Jdlrobson renamed this task from [Bug] Upload page shows a neverending loading spinner when number of uploads is small to [Bug] Upload page shows a neverending loading spinner when viewport cannot be scrolled..Feb 27 2018, 8:22 PM
Jdlrobson updated the task description. (Show Details)
ovasileva triaged this task as Normal priority.Feb 28 2018, 12:52 PM
Jhernandez updated the task description. (Show Details)Feb 28 2018, 5:28 PM
ovasileva set the point value for this task to 3.Feb 28 2018, 5:28 PM
ovasileva moved this task from Triaged but Future to Upcoming on the Readers-Web-Backlog board.
ovasileva added a subscriber: ovasileva.
Jhernandez updated the task description. (Show Details)Feb 28 2018, 5:30 PM
Jhernandez removed the point value for this task.
Jdlrobson set the point value for this task to 3.Feb 28 2018, 5:40 PM
Jdrewniak moved this task from To Do to Doing on the Readers-Web-Kanbanana-Board-Old board.

I had a look into this yesterday and couldn't make sense of whether the fix belongs in uploads or InfiniteScroll. The spinner belongs to the upload page so I figure it belongs there. Good luck!

@Jdlrobson yeah the spinner is being generated by PhotoList.js#44, and the infinitescroller is also being enabled/disabled there, so that's where I'm focusing my efforts. I do wonder though, if this behaviour could be moved to the infinitescroller...

should the infinite scroller (and by extension, this special page) also work on desktop?
(it doesn't btw).

Change 420350 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/MobileFrontend@master] Improve infinite-scroll behaviour on Special:Uploads

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

Change 420350 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Improve infinite-scroll behaviour on Special:Uploads

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

Jdlrobson reassigned this task from Jdrewniak to ABorbaWMF.Mar 20 2018, 9:15 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Jdrewniak.
ovasileva closed this task as Resolved.Mar 22 2018, 5:24 PM

Looks good - resolving.