* isOpening was calculated too early, so whenever the panel was
partially open and opened up fully via the forceDirection
parameter of toggle(), it was logged as the wrong direction.
(I think the only way for this to happen is via clicking on
"view terms" while the panel is partially open.)
* scrolling did not go all the way to the bottom when text was
truncated as the target position was calculated before untruncating.
* panel position was not preserved in some cases where it could have
been because the attempt to restore it happened before untruncating
the text, when the panel was not high enough.
Change-Id: I47a96d42c80e0a00d95023526ede3b5bbf18a52c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/983
Several related changes to text truncation:
* remove untruncate-on-click so untruncated text is selectable
(untruncate will happen on click to the canvas are instead,
to be implemented in a followup patch)
* simplify the truncate/untruncate logic to be wholly based on
panel open/close state, and fix a bug which made panel state
and text truncation state inconsistent when prev/next
navigating while keeping the panel open.
* remove several variations on scrolling the panel in favor of
using toggle + remove some other unused truncation-related code
* fix a minor unrelated style bug which made truncate/untruncate more
jarring than it had to be when the title was short by making the title
higher on panel open even though the text did not use the extra height
* align title ellipsis better
* make sure clicking on the truncated title works even if the click is
between lines and so misses the inline box of the <span>
Change-Id: Ie0b3afb3833102b6a9812cb7fe2df78ec5eb8396
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/983
OptionWidget constructor now accepts a 'data' config option instead of
a separate 'data' parameter.
See I7ee78b6d.
Change-Id: Ie54e9db788cbe846cd2d173498c7fe17bafc126e
Also fixes popup texts which should have been updated in the parent commit
and the panel opening mechanism which did not work when the below-the-fold
description box was display:none-d.
Change-Id: I5fc37429a7dc7a8f1517fa42375cd140d7d11674
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
* when the caption is available, use it as the image title
* otherwise, fall back to description if available
* otherwise, fall back to filename
* if both caption and description are available, show caption as
title and show description below the fold; otherwise don't show anything
below the fold.
Change-Id: I9738ca46620d7cf3b30f6e46790a37966d4b9eaf
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
Due to differences in line-height, author and license text were missaligned.
Some adjusment has been done also about icon position.
The end result can be viewed at http://i.imgur.com/x7KEjDE.png
Change-Id: Ie369d7ab6f1230b1b795ce2b63cdba1401d052dd
The right data column has been adjusted to:
* Make the position of license info consistent when moving through images.
* Make the position of the right list of data consistent when the panel is open.
That is achieved by adjusting the license position in a different way depending on
the status of the panel (open or closed).
Change-Id: Ia1a54d400e9810119d5222a9da732e099d81d9cf
With touch devices, scrolling may get negative values (e.g., when
scrolling beyond the page limits). That kind fo scroll was triggering
the aplication of the "panel-oppen" class producing unintended UI changes.
With this patchset the class is only applied when the panel is really opened.
Change-Id: I183d8c725373ab29802650b53e26fd4820dbf499
* make top of "below-the-fold" be actually above the fold
* put all above-the-fold content except title and more details button
into that area
* kep below-the-fold area in fullscreen mode when title/credit gets untruncated
* increase title length to 180 (140 before reducing font size) - works nicely on
my 1600x900 laptop
* remove old styles which were intended to make the button smaller when the
panel is close but were mostly broken anyway and only caused the button to
twitch
To avoid redoing all the size calculation logic, we cheat and use a negative
margin to pull the below-the-fold content above the fold.
Change-Id: I18d7bdb7dbbdfb8201c0d66257731febfac31263
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833
* move license and terms link from title area to attribution area
* remove some ineffective styling for elements which have already been removed
in earlier changes
Change-Id: I5bd41e337a4c8133bfa27e4c4d03162b2d6e35bb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833
- Fixes the bug where the options menu wouldn't open if media
viewer was reopened
- Adds human-readable console messages for the options actions
- Makes the tooltip a tipsy one like all the other buttons
- Fixes the tooltip copy, it was referring to "previews", which we
said we wouldn't do anymore, in favour of "Media Viewer"
Change-Id: I1590f9501cc6c406cc1f466b414062d4d6435c1b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/963
Includes some small refactoring of the bootstrap code to open
MediaViewer so it can be used in a more controller-like fashion, and
removing the .mw-mmv-filepage-menu class which was added in the parent
commit but had no effect since the module was not loaded by default.
Change-Id: I2e7405e694af96e8eca4fcc839b60306232ead01
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/719
On full-screen mode the panel appears on hover over the image.
This patchset applies the same shadow as when the panel is open to the full-screen panel.
This is done to communicate that the panel is ovelapping the image.
Change-Id: Ia76f2ace6a424bbd26d4d3d43ed213b98ec91006