As part of moving the Mobile Content Service to use Parsoid instead of action=mobileview[1] I've ran into several missing features which make it significantly harder for the Mobile Content Service to use Parsoid, while providing the same functionality as before[2]:
(1) Parsoid does not follow redirects. Automatic redirects (caused by page moves) will be (somewhat) handled by RB infrastructure[3] soon, this does not yet cover manual redirects. Even then it sounds like it would result in a 301 which the service would have to deal with. Manually (Community-) added redirects would have to be dealt differently by parsing the Parsoid payload. <link rel="mw:PageProp/redirect" href="..."/>
While we could overcome the redirect issues by following those redirects I think this should be a Parsoid feature.
(2) <img> doesn't have srcset attributes with higher-res thumbnails. So, image widening in the Android app wouldn't be feasible. While there is talk about Parsoid potentially addressing this in the future I don't know the timeline for this and don't see a good workaround for this from the service side.
(3) No direct access to the spokenWikipedia audio files (from the SpokenWikipedia templates). A more general version of this is: No direct access to transcoded audio / video files. [4] is the task in question. This task is delayed in favor of adding <section> tags.
Theoretically the service could work around this by making another MW API call. I just have not found it and I don't know how this is done for action=mobileview. If anyone has a solution that actually works please let me know. Exposing the spoken version of articles is one of our quarterly goals.[5][6]
I think we should postpone the move to Parsoid until we have at least a solution for issues #2 and #3. Subsequently, I've -2'd my patch[2] to move the service to Parsoid.
Thanks, Bernd
[1] https://phabricator.wikimedia.org/T108777 [2] https://gerrit.wikimedia.org/r/#/c/246100/ [3] https://github.com/wikimedia/restbase/pull/365 [4] https://phabricator.wikimedia.org/T64270 [5] https://phabricator.wikimedia.org/tag/mobile-app-goals/ [6] https://phabricator.wikimedia.org/T114525