Page MenuHomePhabricator

Expose /page/mobile-html endpoint via RESTBase
Closed, ResolvedPublic

Description

Expose the new /page/mobile-html endpoint via RESTBase. This is the endpoint we expect the apps to use instead of mobile-sections in the future.

Event Timeline

bearND created this task.Jul 12 2018, 11:42 PM
Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptJul 12 2018, 11:42 PM
mobrovac edited projects, added Services (doing); removed Services.Jul 13 2018, 6:37 AM
mobrovac added a subscriber: mobrovac.

Since we already have /page/html/, adding /page/content-html/ is at the very least confusing: HTML constitutes content by definition. I would guess that the most appropriate name for this would be /page/reading-optimised-html/ but that's an awkward end point path. /page/reading-html/ and /page/optimised-html/ could be alternatives, but I'm not very happy with them as they are tautologies to a certain degree (HTML is here for reading it etc).

mobrovac triaged this task as Normal priority.Jul 13 2018, 6:37 AM

Is this html optimized for mobile reading use-cases? If so, why not /page/mobile-html? Or even /page/html/Bla?mobule=true?

Yeah, reading+mobile optimized, so mobile-html or ?mobile=true could work.

Hmm, I thought we wanted to avoid the name mobile. How about something with read in the name?

I'd avoid read-html as it is redundant in the same way that content-html is. Wrt mobile, if the intention for it is to be used in mobile web and native apps, then +1. AFAIK, the long-term plan is to slim down the Parsoid HTML further to use it for desktop reading use-cases. If that is true, then mobile can go. If there are alternative plans (as in, having PCS deliver the HTML used for desktop too), then we probably want to get away from mobile here.

The Parsoid output as it is right now is for editing. But ok, I guess mobile could work, too.
How about /page/mobile/html/{title}?
/page/html/{title}?mobile=true is another option but might be confused with plain Parsoid.
/page/mobile-html/{title} would be my third option.

If everybody is OK with it, I think we should go with /page/mobile-html/{title} as it keeps the consistency with the current Page API hierarchy.

I'd encourage anything that makes it clear this is a mobile-optimised payload (given we strip quite a lot of the reading content).

Ok, going to rename things from content-html to mobile-html.

Change 446855 had a related patch set uploaded (by BearND; owner: BearND):
[mediawiki/services/mobileapps@master] Rename html routes

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

Change 446855 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Rename html routes

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

Mholloway added a subscriber: Mholloway.

Deployed today in MCS. Moved to the signoff column and then back again because there's still a RB PR that needs merging and deploying.

https://github.com/wikimedia/restbase/pull/1024

Mentioned in SAL (#wikimedia-operations) [2018-07-26T14:52:47Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@5c9bf79]: Expose the mobile-html end point - T199491

bearND renamed this task from Expose /page/content-html endpoint via RESTBase to Expose /page/mobile-html endpoint via RESTBase.Jul 26 2018, 3:10 PM
bearND updated the task description. (Show Details)

Mentioned in SAL (#wikimedia-operations) [2018-07-26T15:30:24Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@5c9bf79]: Expose the mobile-html end point - T199491 (duration: 37m 37s)

Mentioned in SAL (#wikimedia-operations) [2018-07-26T15:31:22Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@5c9bf79]: Expose the mobile-html end point - T199491

Mentioned in SAL (#wikimedia-operations) [2018-07-26T15:46:17Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@5c9bf79]: Expose the mobile-html end point - T199491 (duration: 14m 56s)

Mentioned in SAL (#wikimedia-operations) [2018-07-26T15:46:32Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@5c9bf79]: Expose the mobile-html end point - T199491

Mentioned in SAL (#wikimedia-operations) [2018-07-26T15:47:36Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@5c9bf79]: Expose the mobile-html end point - T199491 (duration: 01m 04s)

Mentioned in SAL (#wikimedia-operations) [2018-07-26T17:27:19Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@5ce3a68]: Fix the failing mobile-html test - T199491

Mentioned in SAL (#wikimedia-operations) [2018-07-26T17:46:54Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@5ce3a68]: Fix the failing mobile-html test - T199491 (duration: 19m 36s)

Mentioned in SAL (#wikimedia-operations) [2018-07-26T17:47:54Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@5ce3a68]: Fix the failing mobile-html test, take #2 - T199491

Mentioned in SAL (#wikimedia-operations) [2018-07-26T17:54:10Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@5ce3a68]: Fix the failing mobile-html test, take #2 - T199491 (duration: 06m 16s)

mobrovac closed this task as Resolved.Jul 26 2018, 5:59 PM
mobrovac edited projects, added Services (done); removed Patch-For-Review, Services (doing).

The public API is now exposed. Resolving.