Page MenuHomePhabricator

Nearby isn't a WatchstarPageList. Nearby has a WatchstarPageList.
Closed, ResolvedPublic5 Estimated Story Points

Description

NOTE: Refactoring WatchstarPageList is out of scope for this task. Try to limit yourself to just the Nearby component

Nearby is currently a WatchstarPageList. However at times it also looks like this:

A single MessageBox (error)

Screen Shot 2019-03-06 at 5.04.53 PM.png (97×369 px, 13 KB)

A welcome screen

Screen Shot 2019-03-06 at 5.04.33 PM.png (352×356 px, 27 KB)

A WatchstarPageList

Screen Shot 2019-03-06 at 5.08.27 PM.png (630×685 px, 165 KB)

Acceptance criteria

  • Nearby no longer extends WatchstarPageList - either use a factory function using a plain View or make
  • The welcome screen can be rendered outside Nearby.
  • promisedView pattern is being used to display Nearby results

QA steps

Test this on https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Nearby#/coord/37.7889528,-122.4034687 and without results https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Nearby

On Special:Nearby test the following scenarios

  1. Confirm clicking "show nearby articles" shows nearby articles
  2. Ensure Special:Nearby has loaded first. Then drop your WiFi. Click the "show nearby articles" button and confirm an error message is shown
  3. Log in and show nearby articles and confirm a watchstar is displayed (note on staging clicking watchstar will not work, we will need to confim this on beta cluster)

QA Results

ACStatusDetails
1T217814#5183122
2T217814#5183122
3T217814#5183122

Event Timeline

Jdlrobson set the point value for this task to 8.
ovasileva subscribed.

Unsure if we're splitting this task up so moving back to needs analysis

phuedx subscribed.

@Jdlrobson: T217814#5062730 doesn't have a lot of context (e.g. it may've been a comment written in haste during a meeting). Can you advise whether this task should be split up or reestimated?

Message received. I think the general consensus is we want to work on smaller more contained changes than large changes, so will need time to work this out.

Change 501445 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Nearby is a dumb component

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

Jdlrobson removed the point value for this task.Apr 4 2019, 11:18 PM

I tried to break this down today by exploring the steps I would need to do this, but couldn't find a way. That said, I felt the task was quite straightforward. I think XL exaggerates the work involved here to get rid of the level of inheritance as this component doesn't really seem to be using inheritance for any good reason.

Hopefully this patch demonstrates that.

ovasileva set the point value for this task to 5.Apr 16 2019, 4:51 PM

Change 506129 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Remove the loading overlay usage in Nearby

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

Change 501445 abandoned by Jdlrobson:
Remove the Nearby component and use WatchstarPageList

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

Change 506129 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Remove the Nearby component and use WatchstarPageList

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

Edtadros subscribed.

Test Result

Status:
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):QA steps
Test this on https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Nearby#/coord/37.7889528,-122.4034687 and without results https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:Nearby

On Special:Nearby test the following scenarios

✅ AC1: Confirm clicking "show nearby articles" shows nearby articles
With Results:
With Huntington Beach, CA set as location

T217814_1a.png (2×1 px, 566 KB)

Without Results:
With Kansas City set as location (geolocation override from devtools)

T217814_1b.png (2×1 px, 182 KB)

✅ AC2: Drop your WiFi and click the button and confirm an error message is shown
With Results:

T217814-2a.png (2×1 px, 151 KB)

Without Results:

T217814-2b.png (2×1 px, 151 KB)

✅ AC3: Log in and show nearby articles and confirm a watchstar is displayed (note on staging clicking watchstar will not work, we will need to confim this on beta cluster)+:
With Results:

T217814-3aa.png (2×1 px, 155 KB)

Without Results:

T217814-3a.png (2×1 px, 173 KB)

I've made steps for 2 clearer.
For 3 you'll need to create a page located near you on the beta cluster (this will be helpful for future):

  • Find a geolocation near you
  • Create a new article on the beta cluster with wikitext substituting 50 and 14 with your location or something near your location (you don't want to share your house!):
{{Coord|50.0|N|14.4|W|display=title|name=random location}}
  • go make a coffee (might take a few minutes for it to propagate)

@Jdlrobson Thanks for the hints. I enjoyed my coffee. I also discovered after I added the wikitext that I can override geolocation through devtools. Devtools is the gift that keeps on giving.

nray removed nray as the assignee of this task.
nray updated the task description. (Show Details)
nray subscribed.