This change fixes the broken hover on bars due to overlying pointer lines.
The lines are now drawn in the background again. To better visualize the
connection to the bars, the bars now get a coloured border set.
Bug: T162456
Change-Id: Ie84ce8d36d43e5d79248c49c6d2d3eae1a7f627c
Also removed the workaround of making the offset negative since utcOffset
now does this correctly. See http://momentjs.com/guides/#/warnings/zone/
Change-Id: I0cecd525ba131a1c32a9ea60f80d269060e022b0
Adding a new class for an alternative slider view with
one slider for each pointer. The new class will be used
when the extension is installed as a beta feature.
Each pointer has now its own pointer container visualized
with a thin line. Pointers can not change places anymore
and methods doing so where overwritten in the patch.
Selected revisions are not colored atm to better distinguish
between pointers and bars. Poiner lines are now shown above
the bars. ( as from feedback in the last PM session )
Some issues with the design might remain. But since we plan
the deployment anyway next week this could be merged if reviewed.
Bug: T160410
Change-Id: If00c31e30f8a01f3525b191c70605b9c9381671d
It seems the magic done with the 4px margin and its calculations
are not really needed. Getting rid of this does not only clean
the code but is also very helpfull for the new slider logic.
Change-Id: Iae86b8024d3b56517bdc4db5e8baec69bd61afbf
The meaning of first in this context was totally unclear and not
very usefull. It turns out, that the "first" revision is always
the oldest and the last is always the newest revision.
Change-Id: I009438777908a5f4a8833f8f5cb7d3041057741c
This patch changes the way OOjs UI tooltips are constructed.
Until now we did not use the full potential of the widget.
Some strange behaviour remains and it seems we can not use
'horizontalPosition' here. Therefore the direction is passed
down to the RevisionsListView to center the tooltip manually
and margins are set for the help and arrow tooltips.
Bug: T159428
Change-Id: I0a67340da4d94f2f6b29e507f94fc695b44b71f9
Also reordered the css so arrow related stuff is now
in the same area.
Bug: T159434
Change-Id: I851e1c208394306df0d0d595dd1131af70e946f8
Depends-On: Ifa1c6cb355a0c4f5073c93e37939cfc2f6653c81
This is a quick fix for issues with OOjsUI v0.19.12 and tooltips
in the RevisionSlider. It can be reverted when OOjsUI v0.19.14 is
deployed.
The second problem discribed in the ticket is not fixed with this
patch.
Bug: T159428
Change-Id: Id7670b2b3ee2295a4da043bcbdf50b193a68e425
Since IE8 support is dropped, remove hint for incompatibility.
Hint for IE9 is kept to keep track of possible issues.
Bug: T123218
Change-Id: I0fd066dbc22f603da733dcfa339e5af3ffbde41f
OOJS-UI 0.19.0 introduced min-height and min-width for
oo-ui-buttonElement in which caused our UI elements to be mis-dimentioned.
Bug: 157800
Change-Id: I24b4d2ff6abfe02581b99b48a622972e7ef2f6b1
This now attaches the revisionslider to the
older and new links that are by default in the
diff.
This means when clicking them the revision slider
will use an ajax call to reload the diff (while moving
its own pointes) rather than reloading the whole page
Change-Id: I11fa92828140f980ca8edee27403a4e2a5f5a6a7
The current API request with uslimit=500 generates a warning in the response:
{"warnings":{"main":{"*":"Unrecognized parameter: uslimit."}}...
Change-Id: I5bb5e505f3f7b64cdf71b3ef0e2084075988aad2
The changes in the response (invalid:true instead of invalid:"" and UTF-8
encoding instead of JSON escaping) does not matter here.
Change-Id: I0b2382e373527973c8cbc75ce9213b3b6e9dafb9
When the ESC key is pressed, aborts the drag and returns the sliders to
their original positions
Bug: T140965
Depends-On: Ib0f386c6a2447740f44591be70c34cf4a83b88c4
Change-Id: I2dfc2fa03d2c7705fa2947dffa07fbce8ed3b185
With the parent of this commit (current master)
Loading the RevisionSlider JS without it expanded increases
the request size by roughly 767KB on first request and 242KB
on subsequent requests.
The large size of the first request is mainly down the to
dependancies of the slider.
This lazy loading patch means the RevisionSlider JS
only causes an increase of 184 KB per request.
If the user has the bar expand by default the main JS will
be loaded straight away (and the lazy JS will not be).
This patch also means that when only the bar is loaded the
pin button to set auto expand will not be shown.
This will be added once the RevsionSlider is loaded.
Bug: T151668
Change-Id: I054a82e9ea2aa89326464632e744497239f7adba
Tabs are hooked up to JS events which will break
if they are replaced, just switch out the oldid
in the edit link as that is all that changes.
Change-Id: Iea073f8d435a511ba91cdc0c7bdb9e8f1ec1d4ac
.'s in a metric name can essentially be thought of
as directories.
When building graphs from this data an * can be used to
match everything in a directory, for example:
MediaWiki.RevisionSlider.event.*
As these 2 events held another . in their name they
would ont be matched by the abov wild card, so instead use
a _ so that they will!
Change-Id: I1dce9253eb9d4ccb99516683897564e14bb9a577
- The first case is when the slider is collapsed and the auto
expand is switched on, the slider expands and now the toggle
switches.
- The second case is when the slider is loaded expanded, the toggle
now loads in the correct direction
Bug: T150846
Change-Id: I75610308c9f169fb926953a12dc5108e0fba23bf
Introducing a new class that draws lines between the pointers
and the related diff columns. Lines are redrawn when pointers
were moved. A colored border is added to the diff columns and
readded when the diff changes.
Bug: T149175
Change-Id: Iadf779368c58da7779c769bda8e9bd3fc5afcffa
This also fixes the "border-overlapping-issue" when hovering
the pin button in Chrome.
Bug: T145726
Bug: T145519
Change-Id: I6d3788ca5f54937f84c6a7f0fcc456ddf4b665d7
Introducing the Settings class handling settings for all users.
Use hidden user prefs for logged-in users and localStorage or
cookies for anonymous users.
Bug: T145494
Change-Id: I8676873c87d5656c55365706f1ccefa604caae4d
Drag-resizing a window results in hundreds of events being fired,
so limit this to one event every 250ms.
Change-Id: Ie3ace9001cd840a5d790cd269c4ae3c77649079a
Where we know the number contains only numerals, just cast
straight to a number using '+' operator. When getting computed
css from jQuery, use more suitable position methods instead.
Change-Id: Ia58b41a4522a1ef5a1516852821573c47e8dc9c9
Computed CSS ($.css) is relatively slow, and directionality
should never change, so just compute it once.
Change-Id: I6519fa7f54599c498e22a348dfaedd940c860955
Adding position data-attribute to the pointer elements and always
apply the same value as for the revision bars they are pointing to.
This will allow us to reduce the complexity of browsertests.
Bug: T146276
Change-Id: I6e6db55204b0c45fe94a5173e297a67a7ed38d00
Also add a note to the console about WikEdDiff
& RevisionSlider interaction and the required code
change.
As the code change uses the wikipage.diff hook the code
change will actually have no effect until this patch
is deployed, which includes the removal of the hack
for WikEdDiff.
Bug: T142636
Change-Id: Ie88021abb2325cc6259cf2fb041fbdca4ae9ca89
Depends-On: Ie488021f5d0e314a8ad6c8d1f1f3d936c427d719
When the extension is used without the BetaFeatures
extension it is possible to use while not logged in.
Anon users can not have a user preference set.
Thus anon users should not be shown the pin icon.
It may be an idea to add a cookie for anon users
later down the line.
Change-Id: Iafeacf6ae9e24b3134f1c180d390cfad4245719a
In order to properly fix problems reported in T142636, core hook
triggered on diff change (on diff page) will be added in
I5aad7cc10a0db869d7c25d41f7db056885dad69b.
When that change is merged, Thanks extension will be listening
to this hook and not to RevisionSlider-specific revslider.diffreload.
This adds temporary code fixing RevisionSlider's and Thanks' interaction
before hook introduced in I5aad7cc10a0db869d7c25d41f7db056885dad69b is
available. After it gets merged, the code added here should be replaced
by firing the new core hook.
Change-Id: I5dd6c592165ed30244ac8bff37bb6e4949c8bc4a
First I jumped on replacing both jscs and jshint with eslint but
it might be premature decision. Although linting with eslint
is possible (like in there is wikimedia config for eslint)
it is still not clear should it
But in case the change happens we will be ready.
Apart from config stuff this changes few bits spotted by eslint:
improves some indentation, removes weird spaces, completes some
doc blocks, changes IIFE forms in tests. These changes do not
seem controversial.
Change-Id: I9f8bf0f5745da8e662685f4cd879ea4baa609c01
Added the revisions to the exception to avoid tooltips beeing
closed and opened again when clicking on a revision-bar to
load it.
Bug: T143090
Change-Id: Ib8011a52c469ad715e97c1c42e7489c5b31aa4a8
When rendering several RevisionListView items e.g. by loading and adding
more revisions each one had its own 'currentTooltip' so the elements
where not exclusive. This patch fixes that by looking for the class
objects when closing tooltips or changing wrapper highlighting.
Tooltip timeouts are still per-list but that should not affect the
behavior with multiple lists.
Bug: T143090
Change-Id: I23c61547e1a925da1c0b7e7a475ad61e6ed1b1b6
Reordering of stuff and splitting conditions seems to fix some of wiredness.
Mouseenter and Mouseleave are the better events in these cases.
Change-Id: I66d71b1d4f394199949475dc42ca085169e0584f
Print version of the page contains a "Retrieved from" link
referring to a particular revision. URL should be adjusted when
revisions are switched in the slider
Change-Id: Icca3c452ae6926a997b22d3bf9632591fbc0b58d
This adds a button which allows a user to make revision slider
automatically expand on each diff page (disabled by default).
User's choice is stored as a hidden user preference.
This is a bit hacky as it squeezes a button on top
of another button (100% wide expand/collapse button).
This also adjusts styles of ToggleButtonWidget so
the button looks more like a frameless button, although
it is created as a framed one (to have inverted behaviour
when button is in its "on" state).
The button only gets visible when Resource Loader finishes
loading JS and CSS to avoid button jumping around the top
of slider window before "right" styles are applied.
Bug: T142196
Change-Id: Id561485344cba9b136666fe31b086151467de19e
After resizing a window there might be more space at the beginning
of the slider "axis" than there are revisions loaded so far. In such
case the slider should be expanded, so more revisions are loaded
to fill the whole available space.
Change-Id: Ied8abe294967328112afb1fe4d14b2e29ed2c092
* The jQuery for appending the 'darkness' mask was broken (not nesting)
* Use a more semantic name
* Simplify styling to just set opacity to 50%.
* Remove browser compatibility hacks as all MediaWiki's JS
supported browsers also support CSS opacity.
Change-Id: Id893a75bb90a4e6e2e8a26ebc3863de565d8a4ee
Localized format of date containing month name, day, year and time
is used instead of format enforcing the order of time and date,
and use of short month name.
Bug: T141167
Change-Id: I39b2844e777beb986cefb3097d52d481bb038a63
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.
This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.
API calls are only made once RevisionSlider has been expanded.
This is re-submit of b0f229d75f
that was reverted in I26427faaa00b38c2aa1377a66224c9062dcca302.
Bug: T141871
Change-Id: I879de5774b2cce7b908e73cbbe869fd48d6afa23
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.
This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.
API calls are only made once RevisionSlider has been expanded.
Bug: T141871
Change-Id: Ib312f6225b85b9ebdf4ac5d16e254a57d5cf6411