Page MenuHomePhabricator

Getting rid of direct API calls from within jQuery.wikibase.***view widgets
Closed, ResolvedPublic

Description

Currently jQuery.wikibase's .claimview, .statementview, .claimlistview and .referenceview are handling API calls directly to save the data model object they are representing.

Each of those widgets is constructing a new wb.AbstractedRepoApi() instance and calling the API action for handling its data model object.

Depending on the actual implementation, this had the potential to significantly increasing the widgets testability, reusability and simplicity by redefining the widget's responsibility to solely act as a view serving the interface for editing a model (or "view model" following the example of jQuery.wikibase.snakview).
The way how to actually do this had to be carefully considered and discussed.


Version: unspecified
Severity: minor
Whiteboard: u=dev c=frontend p=0

Details

Reference
bz56246

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:12 AM
bzimport set Reference to bz56246.
bzimport added a subscriber: Unknown Object (MLST).

Change 166018 had a related patch set uploaded by Adrian Lang:
Introduce SiteLinksChanger

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

Change 166018 merged by Thiemo Mättig (WMDE):
Introduce SiteLinksChanger

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