Page MenuHomePhabricator

Limit use of $.Deferred to Gateway based classes
Closed, ResolvedPublic

Description

We have a tendency to create $.Deferred rather than returning the results of things which already return $.Deferred. We should also prepare for ES6 by getting our usage of promises consistent (e.g. resolving with single parameters). The Nearby page uses a geolocation gateway that hasn't been abstracted as a gateway.

For cases where we need to resolve something without doing an already async event (e.g. ajax call) we will use a base class Gateway - that has 3 methods - resolve and reject and Deferred

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 30 2018, 6:13 PM

Change 373963 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Add Gateway class to control use of $.Deferred

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

Change 373963 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Add Gateway class to control use of $.Deferred

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

Change 373963 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Limit $.Deferred usage to util method

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

Jdlrobson closed this task as Resolved.Mar 2 2018, 9:22 PM
Jdlrobson claimed this task.