Page MenuHomePhabricator

Lazy loaded references in articles with JS for users who want to view the entire references section
Closed, ResolvedPublic3 Story Points

Description

When lazy loaded references is enabled:

  • On clicking the section heading of a reference section (note there can be more than one) a spinner is shown and the content should be loaded via the MobileView API
  • When a user has no JavaScript support and section collapsing is not supported they see the "View list of citations" link.

Related Objects

StatusAssignedTask
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DeclinedNone
OpenNone
Resolveddr0ptp4kt
DuplicateJhernandez
Duplicatedr0ptp4kt
OpenNone
ResolvedJdlrobson
DeclinedNone
DuplicateNone
ResolvedJdlrobson
Resolvedphuedx
ResolvedJhernandez
ResolvedJdlrobson
ResolvedJdlrobson

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 17 2016, 6:53 PM
Peter added a subscriber: Peter.May 17 2016, 8:48 PM
Peter added a comment.May 19 2016, 4:53 PM
This comment was removed by Peter.

I'm a little concerned with back button behaviour.
If a user toggles open the reference section, scrolls down the list and clicks a link, then clicks back do we expect them to see the references list open and themselves back at the correct link? This could be really tricky to do in a nice way without resorting to making use of localStorage :-/

Jdlrobson renamed this task from Optimise lazy loaded references for users who want to view the entire references section to Lazy loaded references in articles with JS for users who want to view the entire references section.May 20 2016, 6:23 PM
Jhernandez triaged this task as High priority.May 25 2016, 4:35 PM
Jdlrobson updated the task description. (Show Details)May 31 2016, 4:22 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)May 31 2016, 4:24 PM
Jdlrobson set the point value for this task to 3.May 31 2016, 4:32 PM
Jdlrobson removed the point value for this task.

We'll come back to this at the kick off meeting. The team was estimating between 2-5.

Following up from our conversation, I initially thought it would be a 5 pointer, but looking at the codebase and the API response I think it can be a 3 pointer. The reason is that besides making references show up when the user clicks on a heading of a reference section, we need also need to load and insert these references correctly when the user clicks on any other reference. Since we'll already have loaded the data, we won't need to do so upon a section heading click.

Change 293452 had a related patch set uploaded (by Bmansurov):
Lazy-load references section's content when the section is expanded

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

bmansurov changed the task status from Open to Stalled.Jun 14 2016, 8:15 PM

I haven't heard back from my teammates about the ongoing conversation yet. Marking as stalled for now.

phuedx changed the task status from Stalled to Open.Jun 15 2016, 1:17 PM
phuedx added subscribers: jhobs, phuedx.

@bmansurov: @jhobs and I have responded.

bmansurov removed bmansurov as the assignee of this task.Jun 15 2016, 7:33 PM

I've sent an email about the cache issue. Please read it. I'm leaving the task up for grabs for now.

Jhernandez added a subscriber: Jhernandez.

Seems like jenkins jobs are failing, from what I've investigated there's problems with how the modules are defined in extension.json so it seems like they are not being properly loaded, I think.

I'm happy to take over the patch once it is in a stable state.

Thanks, @Jhernandez I've fixed up the JS errors, but browser tests are still failing. I don't think they are related to the patch. I'm assigning the task to you. Hopefully, by the time you're done with your change, the testing servers will work fine.

Not sure why the browser tests are failing though. Maybe related to the webdriver bug with FF 47. Will investigate more.

@Jdlrobson I've fixed some errors with your latest PS and +1d (WFM).

I want to give it a read later to the whole commit.

Change 293452 merged by jenkins-bot:
Lazy-load references section's content when the section is expanded

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

To test, please visit http://reading-web-staging.wmflabs.org/wiki/Refs?mobileaction=beta on a phone sized device and click on Notes or References section.

Jdlrobson updated the task description. (Show Details)

When I visit http://en.m.wikipedia.beta.wmflabs.org/wiki/Barack%20Obama?mobileaction=beta and click the "Notes and references" section the mobileview API shows a section body with the "View list of citations" link. This should never be returned by the API.... (and according to API link it doesn't. I think this is exposing some edge case. Can anyone else replicate this?

bmansurov added a comment.EditedJun 28 2016, 5:49 AM

@Jdlrobson, yes, I see the same thing. Moreover the loaded content is not wrapped in a div. That said, I don't think we should re-open this task as we're discovering bugs with the API.

Jdlrobson changed the task status from Open to Stalled.Jun 28 2016, 4:50 PM

Sign off blocked on blocking task.