As a temporary measure (maybe even long term measure) we should use the existing mobileview API instead of the Cite API for the purposes of lazy loading references.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Allow lazy loading references via mobileview API | mediawiki/extensions/MobileFrontend | master | +458 -244 |
Event Timeline
Change 275724 had a related patch set uploaded (by Jdlrobson):
Lazy load references via mobileview API
A few problems I've noticed while attempting this approach:
- I'm not sure if it's an issue that only I am encountering but when I try to add revisionId support to the mobile view API (which would be needed) I'm sometimes getting different output in the API to the page view itself. Possible race condition?
- The HTML is not ideal for the client - for example . The client would have to do additional parsing to make sense of it and there could be multiple references lists across various sections. We could explore it as a short term solution but it's hacky like a lot of the things we end up doing.
@Jdlrobson I think that this work should be blocked by T130551.
I mayn't have explained my objections to your patch well enough. I'd like to schedule a 30 minute design review meeting so that we can talk through my notes and any notes that you've made on the mobile.references module before moving forward /cc @bmansurov @Jhernandez @jhobs
If the point of this exercise is to demonstrate the value of lazily loading references, then we can provision a temporary labs instance, and test the performance of 275724 as best we can without merging it. We should, of course, be cognisant that a labs instance is Not Production™ in our reporting.
I've addressed Sam's comments and pulled out the CiteGateway work as I'm concerned that complicates what we need unnecessarily.
The work remaining is mostly the controller work. Could someone take ownership of this from me? I really need to focus on reporting out quarterly goals.
@bmansurov, @Jdlrobson: I'll be sure to update T130551 with notes about my reviews as it's brief and there's some implicit assumptions that I should've made clear (and certainly came out during code review).
https://gerrit.wikimedia.org/r/#/c/275724/ is +1ed by Baha now.
@phuedx @jhobs @Jhernandez can you please take a pass on this and help us get this to a +2?
Change 275724 merged by jenkins-bot:
Allow lazy loading references via mobileview API
Here is a test URL: http://reading-web-staging.wmflabs.org/wiki/Ref?mobileaction=beta
@Jdlrobson, do you know how to get the ref tag working on the staging environment?
When I log in I get redirected to http://wmflabs.org/wiki/Main_Page so I cannot edit but that page is missing a references tag.
There seems to be something wrong with the staging environment so I don't fully trust this... and I can't ssh into it to fix it.
But visiting http://reading-web-staging.wmflabs.org/wiki/Ref?mobileaction=beta&useformat=mobile causes a request to http://reading-web-staging.wmflabs.org/w/api.php?action=mobileview&format=json&page=Ref§ions=references&prop=text&revision=1521
which returns an empty list. Did we configure it correctly?
I've re-provisioned reading-web-staging-2 and updated the "Setting up a staging environment" page.