Page MenuHomePhabricator

Service: Add new mobile-html-sections-lead route
Closed, ResolvedPublic

Description

In addition for the HTML route, add another route which simplifies changes for the apps by having the same JSON structure but have all the DOM transformations done on the service. (Basically a scaled down version of mobileview).

The idea is that we can use the same route for both the lead section (whatever we need to display above the fold) on the final page, and for the enhanced link previews. At least for now we put all the things we need for either one together into the same response. We may decide later to split it out.

/{domain}/v1
-- /page
   -- /mobile-html-sections/{title}           # for saved pages in regular app
   -- /mobile-html-sections-lead/{title}      # for enh. link preview and beginning of actual content in regular app
   -- /mobile-html-sections-remaining/{title} # for remainder of actual content in regular app

What we need for lead:

  • id (pageid)
  • revision
  • lastmodified (maybe, could also go to the end)
  • title
  • description
  • lead image
  • lead section
  • (full) toc

Later we'll also add for enhanced link previews:

  • first infobox, as JSON, all rows, as a table, tr, td T108346
  • text extracts T108347

Can come later:

  • link to pronunciation, example: [[Obama]]
  • link full spoken version, example: [[Obama]]
  • geocoordinates

Event Timeline

bearND raised the priority of this task from to Needs Triage.
bearND updated the task description. (Show Details)
bearND moved this task to Next Sprint on the Wikipedia-Android-App-Backlog board.
bearND added a subscriber: bearND.
bearND renamed this task from Service: Add route for old payload structure and just DOM transformations to Service: Add new json/.../lead route.Jul 3 2015, 6:09 PM
bearND updated the task description. (Show Details)
bearND renamed this task from Service: Add new json/.../lead route to Service: Add new mobile-html-sections-lead route.Aug 3 2015, 3:25 PM
bearND updated the task description. (Show Details)

Change 230042 had a related patch set uploaded (by BearND):
Split up page object into lead and remaining objects

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

Change 230042 merged by Mobrovac:
Split up page object into lead and remaining objects

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