Page MenuHomePhabricator

[Subtask] Lazy loading references does not work on reference sections with subsections
Closed, ResolvedPublic

Description

A section can have multiple elements in it.
http://reading-web-staging.wmflabs.org/wiki/Referendum?mobileaction=beta
Expected: Click reference section and view the lazy loaded references section
Actual: The section fails to load.

Related Objects

StatusSubtypeAssignedTask
OpenReleaseNone
OpenNone
OpenNone
OpenNone
OpenFeatureNone
OpenNone
Resolveddr0ptp4kt
Duplicate Jhernandez
Duplicatedr0ptp4kt
DeclinedNone
ResolvedJdlrobson
DeclinedNone
DuplicateNone
ResolvedJdlrobson
Resolvedphuedx
Resolved Jhernandez
ResolvedJdlrobson

Event Timeline

Doh.
Looks like we forgot that a reference section can have subheadings.
So in the example in the description the API returns two sections when all we actually want is the overall section.
This is a pain.
I propose:

  • we enrich mf-lazy-references-placeholder with the section id (if we can) so the id is easy to lookup.
  • A click to references would then show the spinner, replace all the mf-lazy-references-placeholder's and then hide the spinner.

Change 296355 had a related patch set uploaded (by Jdlrobson):
Load all reference lists inside a reference section

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

I've found a fix and added a test but have kept them separate in case we want to refactor the test.

This is blocked on @bmansurov following up my comment.

Ah, I should have provided more info. Please see the patch for the link to a test page and screenshots.

I've tested it too, didn't work for me. Posted source and gif on patch.

MBinder_WMF renamed this task from Lazy loading references does not work on reference sections with subsections to [Subtask] Lazy loading references does not work on reference sections with subsections.Jun 29 2016, 5:36 PM
MBinder_WMF subscribed.

Removing "Uplanned-Sprint-Work" since this is a subtask of a previously-planned task in the sprint.

I've merged the fix patch, but the follow-up tests patch needs work. Moving to signoff to verify the feature works.

Please don't resolve until the unit tests patch is merged.

If signed off, resolve T135539 (parent task) and move T137822 (deployment task, parent of parent) forward (ping somebody on a comment for example)

Although @Jhernandez merged this, it failed to merge due to a jsdoc error (fixed) @bmansurov found an issue on my task however which I've also fixed.

Change 296355 merged by jenkins-bot:
Load all reference lists inside a reference section

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