Due to a jQuery bug, errors in local code (gadgets, user scripts)
can cause onready handlers to not be executed. For MMV this causes
catastrophic failure, with a black screen of death on exit.
This change makes sure that the setup code necessary for Media
Viewer to work is executed at latest when MV is invoked, even if some
onready handlers were skipped.
Opening MediaViewer via a hash-URL will still not work if the onready
handler fails, but that's hard to avoid and it is not a catastrophic
failure anymore. This change can be reverted when bug 70772 gets fixed.
Bug: 70756
Change-Id: Ida3b780791bc9dfec29303567d33e3aa4f44dd81
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/891
This works because the title doesn't exist if there's no caption and we
won't get to this logic branch if the thumbnail is an explicit |thumb|
with a caption already.
Refactored caption-fetching a bit.
Change-Id: If84c890e7b71880db640a0993f8e3d6cd59951b8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/513
Ensure that changing the preference via the quick link and
Special:Preferences is stored identically in the DB.
Change-Id: Ia37da1c6bfbb3edf0eba56f01105e4a5f3a5e4ba
mw.notify calls mw.loader.using now, which we mock out in some
tests. This change adds an exception to the mock.
Change-Id: I68d7293a4d45f904e949ea4b56ec409456624cbd
Changes document title (which is shown in history navigation)
to include the image name.
Bug: 67008
Change-Id: Id1b030f2b984571fb0877e35db2ca2ccc86f0130
Automatically reveal/hide full text as metadata panel is opened/closed.
Also makes metadata open/close a proper event.
Changes scrollTop calculation for the fully open metadatapanel so it is not
confused by the size of the panel changing.
Also rename MetadataPanel.$controlBar to $aboveFold (that field was missed
when the corresponding CSS class got renamed).
Change-Id: I7e66ca0f45c2188dab4b78508ad7f91154187de4
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/396
Reveal the full title + author + source when the user clicks one
of these, and make some related changes:
* expand the above-the-fold part of the metadata panel so they fit
* make the stripe buttons smaller and hide their text
* scroll the panel up if necessary
* modify tooltip texts when there is more text to show
Change-Id: I304297bc5e7be7b16e2fc4bde66ac19641b00029
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/396
When formatting the attribution as plain text, make sure that the
source parameter (which typically ends with an URL) is not followed
by a '.', which could break autolinking when e.g. the text is
copied into a mail.
Change-Id: I5406fe3a55bc4ef6802b32d5a3d533ce9f49b361
We should probably have a proper test image eventually, so that
we can use e.g. image dimensions to double-check the results, but
this way at least our tests won't get broken by unrelated changes
in other repos.
Change-Id: Iffffd94fde99c53da59217a5181ad0560fce314c
- rearrange DOM structure of above-fold part of the metadata panel:
- rename .mw-mmv-controls to .mw-mmv-above-fold
- the above-fold part is a single positioned div now, with height
explitcitly set
- less LESS gymnastics, above-fold height is a single variable
- add paddings to the p elements instead of the containers
- make all title elements align to baseline (except the logo which
would look horrible)
- discard some CSS which was superfluous
- overspecified sizes/positions
- some top/bottoms for staticly positioned elements
- get rid of the .mw-mmv-drag-affordance div, since a full-width bar
wouldn't really make sense on the bottom of the above-fold section
- flip the chevron and place it to the bottom of the above-fold part;
add colors etc. per spec
- fix stripe button horizontal spacing
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/706
Change-Id: Ic37b4150288055c3fae8d22919ed7b1249db1f09
Several people complained that "Learn more on Wikimedia Commons"
is not clear: it can be interpreted as a link to the Commons
main page, the text does not suggest that the link will be related
to this specific file. The new wording tries to address this.
Change-Id: Ia605cc30c4ca57598f7cebdde60061800a10b6e7