Page MenuHomePhabricator

Add support for retrieving a page's content model using action=mobileview
Closed, ResolvedPublic

Description

Clients may want to handle pages with different content models in a different manner, so it should be possible to retrieve a page's content model via mobileview.

Event Timeline

Deskana raised the priority of this task from to Needs Triage.
Deskana updated the task description. (Show Details)
Deskana added a project: MobileFrontend.
Deskana subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Marking as lowest because it's a thing for handling 0.00001% edge cases.

Florian subscribed.

Just to be clear: You want to return the contentmodel for each request to mobileview or just, if it is requested? Wouldn't it be possible to use query + prop info[1] for that?

[1] http://www.mediawiki.org/w/api.php?action=query&prop=info&format=json&titles=MediaWiki

Just to be clear: You want to return the contentmodel for each request to mobileview or just, if it is requested?

Either's fine, but it probably makes sense to only include it if it's specifically requested.

e.g. https://en.wikipedia.org/w/api.php?action=mobileview&page=Lichtheimia%20corymbifera&prop=displaytitle|languagecount

You could add a "contentmodel" prop, just like displaytitle and languagecount.

Wouldn't it be possible to use query + prop info[1] for that?

Yes. I requested this for T68320, where running an extra network roundtrip would result in slowdown of editing workflow and extra data usage for the 0.0001% chance that someone wants to edit a non-wikitext page. That tradeoff isn't acceptable from a performance standpoint. But, having this included in the original request to retrieve the content of the page solves that problem.

Change 206651 had a related patch set uploaded (by Florianschmidtwelzow):
Add contentmodel prop to mobileview Api module

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

Change 206651 merged by jenkins-bot:
Add contentmodel prop to mobileview Api module

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