Commit graph

13 commits

Author SHA1 Message Date
James D. Forrester 85f91f394e build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass
Change-Id: I7c0fabc93834d19198caea8f5dd1834e9e473d0a
2015-08-19 11:21:01 -07:00
James D. Forrester 945242a55a build: Enable jscs jsDoc rule 'checkAnnotations' and make pass
Change-Id: I76abb1eb1f3e1a2e8a4c03f577a080f4889b3a6d
2015-08-19 11:09:34 -07:00
James D. Forrester f5c6f61163 build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass
Change-Id: I846d36c15e1b1f810d2ef7fd422f8412790bcb0f
2015-08-19 10:33:02 -07:00
Roan Kattouw 6d22fd1aa7 Follow-up 8250c8ad54: unbreak ApiResponseCache
.set() should not overwrite existing deferreds; instead,
it should resolve the existing deferred if it's pending.
This is necessary because .set() is used by processResult().
Without this, passing .get() a title that no information
is known for results in a promise that is never resolved,
because the associated deferred is overwritten as soon
as the API response arrives.

Still make .set() a no-op if data has already been set,
by checking if the deferred is pending. For .resolve() this
doesn't matter, but for modifying this.cacheValues it does.

Bug: T107212
Change-Id: I70e8c5450f23062db214ccc5c585624d41de6509
2015-07-28 15:10:21 -07:00
Ed Sanders 8250c8ad54 Separate 'isMissing' micro cache from full link data cache
Bug: T106819
Change-Id: I72f52d63968aa1ac842b2aa503150cf114f9d711
2015-07-24 16:17:35 +01:00
Ed Sanders ffd904022b Remove unless, and almost-useless closures in response cache
Change-Id: Ie02caefe3d8c43b6b1e6b523fb07042f5ae6db37
2015-04-30 17:26:05 +00:00
Ed Sanders c32cccd90b Make static methods static in linkCache
Also switch out logic duplicated in MWLinkTargetInputWidget with
LinkCache#processpage.

Change-Id: Ie6f3599d4ea5cc9057cf4403f003da00f18cdebe
2015-04-30 17:00:45 +01:00
James D. Forrester 65112a7e10 Show different icons for different result types
* Disambiguation
* Redirect
* Not found
* Page exists

Bug: T93694
Change-Id: Ic4a60c95e37de372e8d0c12878dece67a2662343
2015-04-29 17:51:34 +01:00
James D. Forrester 916eba05a5 Replace abstract functions that just throw with null
Per Timo, this avoids us having pointless code that is never
executed, and the replacement notification to the user (that
ve.blah.UnicornAnnotation.foo is null and not a method) is
sufficiently clear that the issue lies in the lack of existence
of the ve.blah.UnicornAnnotation#foo method.

Only ones in this repo appear to be in ve.init.mw.ApiResponseCache.

Bug: T54482
Change-Id: If44b8d63b8e7b2a5c289fe7278ad54e722b185fa
2015-04-09 23:20:07 +00:00
jenkins-bot 557e0e28ad Remove use of ve.indexOf and ve.getObjectKeys
Change-Id: Icbaa729209605fca8018e4bcbbe29c9ded64e7f2
2015-03-10 17:28:00 +01:00
Alex Monk 944e7d7a86 ImageInfoCache: Don't try to access imageinfo result if it's not set
Bug: T90916
Change-Id: Iebd393b0cff8016cc8917b86ca277eddf7810d4e
2015-02-28 01:25:12 +00:00
James D. Forrester bed038b509 build: Bump devDependencies to latest
Updates:
* grunt-contrib-csslint  0.3.1  ->  0.4.0
* grunt-contrib-jslint   0.10.0 -> 0.11.0
* grunt-jscs             0.8.1  ->  1.2.0

For jscs, leaving requireSpacesInsideArrayBrackets to avoid headaches for now.

Change-Id: I62d34444edbba65c8bd22d2fa5e50e16cabb0042
2015-02-02 14:30:39 -08:00
Alex Monk 7876cc957a Combine imageinfo requests
By generalising LinkCache into ApiBatchQueue to request them all centrally

Bug: T75822
Change-Id: I097311ec2487bb1ae9f5d927c2c13c274ba716f9
2015-01-30 17:20:04 -08:00