Page MenuHomePhabricator

[BUG] Perpetual loading spinner appears if user accesses Randomizer whilst offline
Closed, ResolvedPublic

Authored By
RHo
Dec 13 2017, 5:34 PM
Referenced Files
F11995094: Screen Shot 2017-12-22 at 8.42.59 AM.png
Dec 22 2017, 4:46 PM
F11993663: Screenshot_1513955302.png
Dec 22 2017, 3:09 PM
F11993669: Screenshot_1513955287.png
Dec 22 2017, 3:09 PM
F11951767: image.png
Dec 20 2017, 12:55 PM
F11951760: image.png
Dec 20 2017, 12:55 PM
F11829425: image.png
Dec 14 2017, 4:45 PM
F11829416: image.png
Dec 14 2017, 4:45 PM
F11829431: Random interaction flow 02.png
Dec 14 2017, 4:45 PM

Description

If the Randomizer screen is opened via the app shortcut whilst a user is offline, or if a user loses connectivity whilst in the Random screen, a perpetual spinner is shown when trying to load an article.

Steps to reproduce

  1. Go offline
  2. Tap on the app shortcut to open random in the app
Expected

a) If there are cached articles that can be shown in the Randomizer view:
Randomizer loads with the available offline articles - this will be fixed as part of T182694

b) If there are no more cached articles that can be shown in the Randomizer view:
User is shown a message on the Randomizer screen advising that there is no internet connection, with an action to retry

Actual

User is taken to the Randomizer screen which shows a perpetual loading spinner

Occurring on

Pixel (8.0.0)
Wikipedia v2.7.221-alpha-2017-12-12

Event Timeline

Change 398267 had a related patch set uploaded (by Sharvaniharan; owner: Sharvaniharan):
[apps/android/wikipedia@master] Randomizer offline behavior - Remove perpetual spinner

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

@RHo the errorView looks like this : https://youtu.be/0qrnCVT1OxQ . fyi..When the device comes back online, we are still able to see the error view for a couple times on back swipe/click.

I kind of think it would be better if the spinner and the ErrorView are inside the card, instead of floating disembodied on the blue surface.

hi @Sharvaniharan - agree with @Dbrant that the spinner and error message should be inside the card.
I.e. Expected error state in Light & Dark modes:

Random interaction flow 02.png (1×720 px, 83 KB)
Random interaction flow 06 - previous.png (1×720 px, 85 KB)

Also noticed that even initially entering the Randomizer view (with connectivity) in your demo, the spinner is showing up outside of the card and appears to be an animated gif on white background, instead of the expected loader:

Expected on load spinner in Light mode:
image.png (1×876 px, 110 KB)
Expected in dark mode:
image.png (1×872 px, 144 KB)
Actual (from video)
image.png (1×1 px, 275 KB)

Change 398267 merged by jenkins-bot:
[apps/android/wikipedia@master] Randomizer offline behavior - Remove perpetual spinner

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

hi @Sharvaniharan - please just center the message in the card and then it will be OK for QA.
Expected:

image.png (766×720 px, 33 KB)

Actual:

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

@RHo The Error view is an independent view that is getting used through out the app, and the misalignment is in that view and not on the randomizer view. We must nevertheless fix it, I have opened this and kept it in ready-for-dev on g board for now. I will try to fix it by end of day today, if possible, after my other planned tasks are over. If it gets fixed then i will unblock this ticket and move it to QA. Unless you feel we can move this to QA for now, and once the error view is fixed, the expectation is that this and all other places where it is displayed will be fixed. Let me know how to move on this.

hi @Sharvaniharan - i just took a look at the ticket T183555 filed to fix the error view. Can you clarify which screens it is misaligned? As far as I can see, the error view is aligned correctly in the other places where it is shown (eg 'Other languages', Search) and it is only in this Randomizer offline card that I have seen it be misaligned...

Eg. Appearing as expected in Other Languages:
Screenshot_1513955302.png (2×1 px, 53 KB)
In Search
Screenshot_1513955287.png (2×1 px, 58 KB)

Please fix the alignment on this ticket (error message alignment in Randomizer) before moving this ticket on.

@RHo we can take the same image that you have posted as an example... it actually is not vertically centered, it is off by around 32+ pixels.. however, the background being the same as the parent, makes it feel centered. Here is a colored errorview screenshot, you can see that the errorview is actually centered in the screen, but the views inside are off.

Screen Shot 2017-12-22 at 8.42.59 AM.png (1×768 px, 398 KB)

Ah fair enough @Sharvaniharan - in that case can this be placed in waiting until the other ticket is resolved?