MMV has several undeclared dependencies on core classes which are
ubiquitous enough to be loaded anyway... or not. Apparently
something changed recently in ResourceLoader or the test setup,
and one of the missing dependencies started to cause test errors
(which I can't reproduce locally).
Change-Id: Ifabf682eeff2cf77495cd084ee1386c9b3d02354
Because we're that cool of a startup apparently
Also because organization and easy code manipulation.
Change-Id: I81ca302b6848f83034f7efed2443757bb045c4f1
Interface code is its own class which does not depend on the main
interface class it can be unit tested (and eventually moved into its
own file to make browsing the code easier). IMO we should aim to
eventually break up the interface into similar classes (with a simple
init/empty/set interface + custom events where it makes sense).
Also, sneak-introducing LESS!
API usage could be more effective (globalusage is a separate API call;
it needn't be), but we will have to rewrite that part soon anyway, so
it should pass for now.
Bug: 60087
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/44
Change-Id: Ibe5c323cdeab4a378316925f0c3efb3dc7ef5997
When the multimedia panel is closed, the chevron
points upwards, otherwise it points downwards
Pressing the up and down arrows on the keyboard
opens and closes the metadata panel
Change-Id: I7dd31f3cc3d90f9342845faea2c6cfea3b40e232
This sorta has a few other miscellaneous fixes in it, but it works!
There are maybe still funky behaviours left. Test it?
Also refactor some bits, so we aren't accessing mw.mediaViewer in the
interface code.
Change-Id: I69db8e7b4ff5f994ba706fd4965688f3c26859f4
This is a big change, but should change nothing except the sizes of some
files and where they all are.
There are no more ext.multimediaViewer strings ANYWHERE, so let's keep
it that way. :)
Change-Id: Ic0892f5894700938bfa01f3f9bc8e5ab8276eb72
* Move description and caption to both be in the bottom left
* Make empty description grey and italic
* Fix problem where description was sometimes appended twice
* Move description UI stuff into a separate file, and make it more MVCy
* Tests for description UI stuff
* General framework, to an extent, for UI classes
Change-Id: Ibc8c576cd8a41c2e3cf7e13f1b9e093384fb4655
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/120
Image information and repo information are now both stored somewhere
else entirely, so we don't need to keep accessing weird API return
values to sort things out. fetchImageInfo now uses those classes to
an extent, and we now cache thumbnail URLs for different sizes.
Change-Id: Ife8293c86683ea914b1a5a60000584b501d92e55
'No description available' message has been added when description for the
given file is not available.
Bug: 56446
Change-Id: Ie239e5cd0d1b645ed149ea1ecc80197b0e84bc34
These are just smoke tests. I will add more in coming versions of this change.
Consolidated various cases in one tests. Added tests to validate for legit clicks.
Based on Idfbec829399ff6969cd01be3c13a8ed7a66a1fef
Change-Id: I366c7af9a5cf43361d8293183c9da117bc5d4971
Simple now, only really aliases the classes, but we'll use them to replace
the hooking infrastructure in the near future.
Change-Id: I963a4887a717c9bb064e30fa5fb86bbccb7186a1
Add moment.js ( http://momentjs.com/ ) as a ResourceLoader module
and use it to parse and format date strings. Moment.js seems to be
the least bad option right now; eventually it should be replaced
by i18n functionality in core Javascript modules.
Change-Id: I332655778be3d694781b83fa5dea1e59770d8866
Keep modules in separate dirs, move images to their module dirs, and fix
up the module declarations so they still work.
Also moved viewer.svg into the root.
Bug: 56421
Change-Id: Ia84ddfd3b91c784c42d9ba243c5cfd46354f139f
Multiply target dimensions by $.devicePixelRatio() when fetching
image for the viewer lightbox.
Bug: 55477
Change-Id: I5d64d21ecc563486a6f7d4709cebc129ef77f930
Needed to use $.createSpinner instead of hacking in the image directly,
else bits.wikimedia.org won't work as expected. Will test on beta.
Change-Id: I0eba356f7910fd6a3173ed66c601fd42264ff336
Little bit hacky, maybe, but it's working nicely and it's a very useful
tool for the lightbox.
Selection, it turns out, is really really difficult.
Bug: 56141
Change-Id: Ifd3e2f771010190c9f401fd4219342aff48f4be8
Strips out complex formatting, which should be useful later on as well.
Depends on:
* core
:* I77303d8e535fc1c42e14cfb853814e5c434a81ec
* CommonsMetadata
:* I5e6bc45f9751641e16426231dabcc8277b86fee0
Change-Id: Id835fd8133b9762e7bec10783f4fa4b983177aed
Link to the user page of the uploader.
Fetches the gender from the API - falls back to "unknown" especially in
cases of cross-domain requests.
Change-Id: I38940782dc5d2d56c8aea608b1fe72e04f397c00