Page MenuHomePhabricator

Add new client side Participation manager for image list
Closed, ResolvedPublicFeature

Description

IMPORTANT: Part of a patch series, do not merge until all complete

A new constructor that is used to create a ParticipationManager object as soon as the user lands on the participate page. This manages all aspects of the participation session without reloading the page at any point.
The ParticipationManager has been linked to the new page structure in T224724: Match Participate page to mock ups.

This commit has the following limitations compared to master branch which will be fixed in the next commits in this patch series:

The ParticipationManager includes:

Properties

  • images - complete list of all images in session
  • currentImage - index of current loaded image
  • initialData - snapshot of initial data retrieved from commons
  • unsavedChanges - current unsaved changes for depicts and captions
  • countrySubcategory - updated on page load from ?country url parameter

methods and functions

All Bold are public methods

  • Next image()
  • Previous image()
  • imageChanged()
    • populateMetaData(filename)
    • populateStructuredData(filename, callback)
  • getImageFileName() - uses current index to return the filename of the image
  • saveInitialStructuredData(depictsData, captionsData)
  • updateImage(filename) - updates the src of the main image
  • getStatementHtml(item, label, description, isProminent) - returns the HTML for a single depicts statement, using newly designed snippet

Note: We will now switch to using a post request instead of default form behaviour T224505: Setup Ajax post request for sending contribution data to the server

Event Timeline

NavinoEvans updated the task description. (Show Details)
NavinoEvans changed the subtype of this task from "Task" to "Feature Request".

Change 513730 had a related patch set uploaded (by NavinoEvans; owner: NavinoEvans):
[labs/tools/Isa@master] Add new client side Participation manager for image list

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

Change 513730 merged by jenkins-bot:
[labs/tools/Isa@master] Add new client side Participation manager for image list

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

Marking as resolved.