Commit graph

398 commits

Author SHA1 Message Date
jenkins-bot 04d0720b20 Merge "Fix bar hover with pointer lines" 2017-04-11 14:10:07 +00:00
WMDE-Fisch 2af7e96221 Fix bar hover with pointer lines
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
2017-04-10 14:56:33 +02:00
WMDE-Fisch 3da53f85b6 Highlight and clickability improvements
Bug: T162580
Change-Id: I8b16ff8b4a9f2da9b13f057d310aaba93a6823b6
2017-04-10 10:33:30 +02:00
WMDE-Fisch e6d28dc19d Use a new config var to activate the alternate SliderView
Change-Id: I7e2dd04c333d3b8daf9f009898f8f80b4e7aad3d
2017-04-07 11:58:19 +02:00
jenkins-bot 961cb87256 Merge "Show tooltips when dragging the sliders" 2017-04-06 13:31:34 +00:00
jenkins-bot a6e9e530ba Merge "Factored out drag action from draggable" 2017-04-06 13:31:33 +00:00
jenkins-bot a67b2f09ab Merge "Remove dark hover effect on bars" 2017-04-06 13:31:32 +00:00
jenkins-bot af571e7d0b Merge "Add hover and grab styles when using new slider pointers" 2017-04-06 13:31:31 +00:00
jenkins-bot f6dd02815c Merge "Introduce alternate SliderView" 2017-04-06 12:43:49 +00:00
WMDE-Fisch 747ae35a94 Show tooltips when dragging the sliders
Change-Id: Ic784681519f1de26af707abde71137b34c90e7f9
2017-04-06 14:26:45 +02:00
jenkins-bot f46e959c26 Merge "Factor out setting of cursor pointers" 2017-04-06 12:08:08 +00:00
jenkins-bot 444d57c425 Merge "Fade out pointer lines while dragging / pointer animations" 2017-04-06 12:04:15 +00:00
WMDE-Fisch 177d6a1bd1 Factored out drag action from draggable
As preperation for tooltip and hover color changes while dragging in
the new SliderView.

Change-Id: I679fc1b6fb5f69d27f6dee0aafd168493dc33957
2017-04-06 13:47:59 +02:00
WMDE-Fisch 99d7da0ce1 Remove dark hover effect on bars
Bug: T162260
Change-Id: I99fceaf6f27737d48a61e1db9a07ab44fef8040e
2017-04-06 13:00:52 +02:00
WMDE-Fisch 015a622b3a Add hover and grab styles when using new slider pointers
Bug: T162258
Change-Id: I9adbd4714c1c44f7cdce62c3b8c4b9c24bf0b80e
2017-04-06 12:45:19 +02:00
Tobias Gritschacher a3ee2a0bb1 Replace deprecated method zone() with utcOffset()
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
2017-04-06 11:55:04 +02:00
WMDE-Fisch c52c657516 Introduce alternate SliderView
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
2017-04-06 07:29:19 +00:00
WMDE-Fisch 040dd9c945 Factor out setting of cursor pointers
Change-Id: Idb66dcd1daeff48dcce3a39be32eae7c8e17acc8
2017-04-06 07:29:12 +00:00
WMDE-Fisch f978f8690c Fade out pointer lines while dragging / pointer animations
Bug: T162259
Change-Id: I54d6a9bc33b93c0785b2a808b4d1482789d91317
2017-04-06 07:29:02 +00:00
WMDE-Fisch 218b85d0bb Remove 4px pointer margins
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
2017-04-05 09:42:49 +00:00
WMDE-Fisch a72b31b280 Renamed container offset variable
Change-Id: I6fc2d51f5a591dcf4898abb1ae010a433131a0d9
2017-04-03 11:05:51 +02:00
jenkins-bot 16d9e74760 Merge "Move arrow button logic to own class" 2017-03-27 22:45:37 +00:00
jenkins-bot 7abac9b03e Merge "Move helper button logic to own class" 2017-03-27 22:44:09 +00:00
WMDE-Fisch b0227f24b4 Renamed firstVisibleRevision to oldestVisibleRevison
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
2017-03-27 21:04:31 +02:00
WMDE-Fisch 97c85abdf2 Move arrow button logic to own class
Change-Id: I56e52d8b11f8557d759dc495512d9754e8f441f6
2017-03-27 18:56:59 +00:00
WMDE-Fisch 7e277fbd9d Move helper button logic to own class
Change-Id: I8fdfeb3344974b3cee7ce07bcf2ceea9308fffe6
2017-03-27 18:56:34 +00:00
jenkins-bot 5abd483832 Merge "Factor out relative pointer index" 2017-03-24 14:43:25 +00:00
jenkins-bot abcd2158cd Merge "Factor out draggable options" 2017-03-24 11:00:00 +00:00
Ed Sanders b00f11ebd2 Update wgRevisionId when changed by slider
Bug: T161257
Change-Id: I1ede31dc9ce67fdc596f117f48ce4bfdde54c2cc
2017-03-23 21:48:11 +00:00
WMDE-Fisch 277d714ec3 Factor out relative pointer index
Change-Id: If0843bea19089c1a91228a0c01f8ac65e44f7f3f
2017-03-23 17:54:12 +01:00
WMDE-Fisch c2510ab082 Factor out draggable options
Change-Id: I64cca7a7547310bee64ad95f500b722c362bbb45
2017-03-23 17:42:49 +01:00
WMDE-Fisch c01d07bc1f Add documentation for new methods
Also some minor refactoring in the pointer method.

Change-Id: I986036277d2b6e65cbed9f39c81f9f03ad0e9e3c
2017-03-23 12:46:24 +01:00
WMDE-Fisch 981e9d4a7e Bundle slider construction
Change-Id: I7202755ee49d1cb42d68f997750170defdc3304c
2017-03-22 18:56:11 +01:00
WMDE-Fisch 394f812d9b Extract pointer rendering
Change-Id: I9e0200faf477c2c9476574059c46d1f8b003537b
2017-03-22 13:32:17 +00:00
WMDE-Fisch 06bb204fac Extract pointer and revisions container rendering
Change-Id: I2f65a173c2020a5a0ed276d064f0a45104982497
2017-03-22 13:32:10 +00:00
WMDE-Fisch 9c80fda6f8 Extract rendering of arrows
Change-Id: Ie639cca4bfcd3fe3f8b81556d900dbcdc3232f83
2017-03-22 13:32:02 +00:00
WMDE-Fisch e611e40833 Extract rendering of help button
Change-Id: I1db2a87c70ffce126478533836ea0ab4e21e3a08
2017-03-22 13:27:48 +00:00
WMDE-Fisch 89b1f8a4da Rename CSS classes for help text
The is now consistent with other CSS naming and MW rules.

Change-Id: I4bcffe2d22692d1784ebb53c49f49c94f412486f
2017-03-16 15:53:39 +01:00
WMDE-Fisch aa7daf4758 Rename $rev to $revisionContainer in ListView
Meanings are more clear now.

Change-Id: I3ff9fd0df4748c68ab363a47bda84ec8d1464fc4
2017-03-06 10:14:03 +01:00
jenkins-bot 7f851a48ca Merge "Refactor usage of OOjs UI tooltips" 2017-03-04 17:21:37 +00:00
jenkins-bot ab79b6c0f4 Merge "Fix arrow css for OOjs UI v0.19.4" 2017-03-04 17:17:11 +00:00
WMDE-Fisch fbac5c69a4 Refactor usage of OOjs UI tooltips
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
2017-03-03 14:31:07 +00:00
WMDE-Fisch 2ee4d4415b Fix arrow css for OOjs UI v0.19.4
Also reordered the css so arrow related stuff is now
in the same area.

Bug: T159434
Change-Id: I851e1c208394306df0d0d595dd1131af70e946f8
Depends-On: Ifa1c6cb355a0c4f5073c93e37939cfc2f6653c81
2017-03-03 14:30:57 +00:00
WMDE-Fisch c5b214fab9 Quick fix for misplaced tooltips on RTL wikis
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
2017-03-03 09:02:20 +00:00
WMDE-Fisch 89345e9e8c Drop IE8 hint
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
2017-02-22 14:00:13 +01:00
James D. Forrester 8f34233c69 build: Bump stylelint and make pass
grunt-stylelint              0.6.0  →   0.7.0
 stylelint-config-wikimedia   0.3.0  →   0.4.1

Change-Id: Id87b8df04d415e1f1058a4042a31408236402037
2017-02-17 16:22:57 -08:00
Tobias Gritschacher ccab029670 Don't set min-height and min-width for oo-ui buttons
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
2017-02-10 15:32:48 +01:00
addshore ce4bc18569 Attach to Newer / Older edit links
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
2017-02-03 15:06:20 +00:00
jenkins-bot 3f688ebf27 Merge "Remove WikEdDiff logging code" 2017-02-02 16:54:52 +00:00
addshore 4225951117 Remove WikEdDiff logging code
Change-Id: I898234d72f496d0ce7299f18c121faf2fe174645
2017-02-02 16:26:09 +00:00
jenkins-bot 26dfdce687 Merge "Introduce ESC key detection during dragging RevisionSlider" 2017-01-30 13:32:53 +00:00
Fomafix 5176e2f7fa Remove unrecognized parameter uslimit from API request
The current API request with uslimit=500 generates a warning in the response:

{"warnings":{"main":{"*":"Unrecognized parameter: uslimit."}}...

Change-Id: I5bb5e505f3f7b64cdf71b3ef0e2084075988aad2
2017-01-28 13:34:30 +01:00
Fomafix 8100318ad9 Use formatversion=2 for API request
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
2017-01-28 12:39:47 +01:00
pppery b169f6237a Introduce ESC key detection during dragging RevisionSlider
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
2017-01-23 09:51:52 +00:00
Andrew-WMDE 37ea49b326 All connector-lines should be contained within the RevisionSlider
Bug: T151450
Change-Id: I317a2fc81a85d20cf07b1e45d5501cadaaa0b727
2017-01-13 12:18:22 +01:00
jenkins-bot ac383df079 Merge "Fix pin-button vertical alignment" 2016-11-30 13:10:10 +00:00
addshore 2cf768f7b7 Lazy load most of the JS
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
2016-11-30 11:59:16 +01:00
WMDE-Fisch ee82977c1c Fix pin-button vertical alignment
Changes in https://gerrit.wikimedia.org/r/#/c/322114 did mess with
the vertical alignment of the pin-button.

Change-Id: Ie8906e69bc4c37772d0f2d36a87c099a7ad12776
2016-11-30 11:28:09 +01:00
Ed Sanders e9eabd00ef Don't replace all tabs on update
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
2016-11-23 13:25:32 +00:00
addshore 4ff95b9ece Fix HelpDialog.js creates a window without a static name
Bug: T151448
Change-Id: I55fa256b837b88d93755f0d20dac897f55b03fcc
2016-11-23 12:04:50 +00:00
addshore 17caad54ca Use mw.Map#get instead of mw.Map#values
Change-Id: Ifbc7f3e40190f678d6d9dad41fc161334b9b12c2
2016-11-23 00:31:53 +00:00
Ed Sanders e2e34bfd95 Fix line height in help dialog
Change-Id: I6827bc57d3372eaa6080bf7aaa351fdcf8b2d38e
2016-11-22 16:04:02 +00:00
jenkins-bot 6105fa89b8 Merge "Adjust colors to color palette" 2016-11-22 11:05:18 +00:00
WMDE-Fisch 119c66fbc4 Adjust colors to color palette
Some colors are not changed due to comments by the
UX/UI-Team.

Bug: T151193
Change-Id: I2e34b42de8633b4846a4675dabbcf48110c4ab22
2016-11-21 12:55:13 +00:00
WMDE-Fisch 6944439491 Fix word-break CSS
Change-Id: I56e783db4a68e93cb22867d3dfa5e8edd185eb5e
2016-11-21 10:56:48 +01:00
Ed Sanders 1c3ef546ad eslint: Remove old jshint/jscs refs, fix exceptions
Change-Id: I56b9f037405d0f93f82dc81dad1cc1b111be338e
2016-11-19 13:37:20 +00:00
jenkins-bot c3643df69e Merge "Fix padding for toggle button element" 2016-11-17 16:20:06 +00:00
addshore 1e8bfa62fb Fix padding for toggle button element
Bug: T150845
Change-Id: I64b9aa3b547c119410067a98df8dd2574f41e0b7
2016-11-17 15:43:26 +00:00
addshore ccc6905a05 Fix / Change autoexpand metric name
.'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
2016-11-17 11:02:26 +00:00
addshore fc213c8880 Flip toggle button in 2 missing cases
- 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
2016-11-17 10:59:40 +00:00
WMDE-Fisch f17850d6e6 Clean up logging in code
Change-Id: Iad9f6846f9a80e7c6e82d930f643a92c8f42cab6
2016-11-16 15:42:04 +01:00
James D. Forrester 3269f791f5 build: Bump eslint-config-wikimedia to v0.3.0 and make pass
Change-Id: I774e05c4393eca8b4719f335a124efcb3d2a6dd5
2016-11-15 16:48:38 -08:00
WMDE-Fisch a8a129d627 Move lines into container
Bug: T149175
Change-Id: I4e231ff450661eaeaabae0fd2883914bb62101dc
2016-11-08 15:45:59 +01:00
WMDE-Fisch df9d94ca60 Draw lines between pointers and related columns
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
2016-11-08 13:46:14 +01:00
jenkins-bot bf9cde5d66 Merge "Remove negative margin" 2016-11-03 12:23:40 +00:00
WMDE-Fisch 6f8e23f7d9 Remove negative margin
The top pointer hovers a few pixel over the slider line. Thats
not intended.

Change-Id: I5424ea72ccf2828d638c1fc4e9e2e345ba7bf94e
2016-11-03 13:00:40 +01:00
Tobias Gritschacher 1bef050429 Add margin to pin button
This also fixes the "border-overlapping-issue" when hovering
the pin button in Chrome.

Bug: T145726
Bug: T145519
Change-Id: I6d3788ca5f54937f84c6a7f0fcc456ddf4b665d7
2016-11-02 14:16:02 +01:00
WMDE-Fisch 300c552334 Store settings for anonymous users
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
2016-10-24 16:46:42 +02:00
addshore 1e1c2f5943 Don't nest mw-content-text element when reloading diff
Bug: T144391
Change-Id: I5763c6c4288bfcfef03df0cd949715d21430c9af
2016-10-24 09:53:08 +01:00
Ed Sanders 62c5b4cff9 Prevent selecting the same revision twice
Bug: T141254
Change-Id: Ic51605dca1484ce66ce9764a2291c8a947f9d376
2016-10-14 10:25:10 -07:00
Ed Sanders 79c0305b09 Throttle the window resize event handler
Drag-resizing a window results in hundreds of events being fired,
so limit this to one event every 250ms.

Change-Id: Ie3ace9001cd840a5d790cd269c4ae3c77649079a
2016-10-14 08:25:35 +00:00
jenkins-bot 64f6724128 Merge "Avoid parseInt" 2016-10-14 08:25:30 +00:00
jenkins-bot ef111d2342 Merge "Compute and cache directionality once" 2016-10-14 08:25:29 +00:00
Ed Sanders a020b238e9 Avoid parseInt
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
2016-10-13 11:58:55 -07:00
WMDE-Fisch 8fef5ac005 Fix order when executing pointer update
This should always happen before updating the diff.

Change-Id: Icf6b52c3495e42e188bfa5d5307f91d0558cc7a4
2016-10-13 16:51:11 +02:00
Ed Sanders d728cda396 Compute and cache directionality once
Computed CSS ($.css) is relatively slow, and directionality
should never change, so just compute it once.

Change-Id: I6519fa7f54599c498e22a348dfaedd940c860955
2016-10-12 21:07:28 -07:00
Tobias Gritschacher da8f7fb064 Update pointer position attributes immediately
Update attributes right after setting position and
don't wait until revisions are refreshed.

Change-Id: Ic32a554d6939806ce95d4e7b441ee08965b81940
2016-10-12 15:31:38 +02:00
Tobias Gritschacher 70ea8fafda Always apply data-pos attribute to pointers as well
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
2016-10-10 14:52:45 +00:00
Tobias Gritschacher 4872d31669 Add fixed padding for scrollbar
This is not very nice but the simplest I was able to come up with.

Bug: T144267
Change-Id: I959c8e6e7aa053f372455b1ec4ed5768a02d8b5d
2016-09-28 14:27:51 +02:00
jenkins-bot 82a7af9be5 Merge "Fix pin button style" 2016-09-26 08:20:06 +00:00
addshore 5c9b9f7eb4 Fix pin button style
Bug: T145519
Change-Id: I1fdc0ec32b223732d59640a6462758c59b99ebac
2016-09-20 12:35:30 +02:00
Ed Sanders a97c4d1c0e Use word-break to avoid horizontal scrollbars inside popups
Bug: T144267
Change-Id: If946b2a71dfede4cf33a513b3fad974517d4359f
2016-09-19 17:36:10 -07:00
jenkins-bot a79bccf2ea Merge "Close HelpDialouge when clicking away from it" 2016-09-15 10:14:33 +00:00
addshore 22556fcf16 Close HelpDialouge when clicking away from it
Bug: T145525
Change-Id: Ia21d5163f561ede4f327eec3a4aaf7c34d103094
2016-09-15 12:01:08 +02:00
jenkins-bot dec6b85652 Merge "Fire wikipage.diff instead of revslider.diffreload" 2016-09-15 09:04:54 +00:00
jenkins-bot cce4ff706c Merge "Expand Revision Slider when user activates pin button" 2016-09-14 09:18:42 +00:00
jenkins-bot 9aabbb4ae4 Merge "Fix position from top of tuitorial" 2016-09-13 16:07:20 +00:00
addshore 42917b1821 Fix position from top of tuitorial
Bug: T145526
Change-Id: Id7d344c946dd0e66d1ed2fd639ebbb1edf06b913
2016-09-13 15:56:49 +00:00
Tobi Gritschacher a3244e1805 Expand Revision Slider when user activates pin button
Bug: T145068
Change-Id: I26bd6d3cbd2e0da6e3d537431a45ef8193906c40
2016-09-13 16:05:01 +02:00
addshore 5fbe86fc0f Fire wikipage.diff instead of revslider.diffreload
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
2016-09-13 10:37:51 +02:00
addshore c8cd4c5fb4 Only show pin button to logged in users
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
2016-09-12 12:45:35 +02:00
jenkins-bot f068f9b684 Merge "Revert "Do not nest mw-content-text element when reloading a diff"" 2016-09-07 07:58:45 +00:00
Addshore b6906e70f1 Revert "Do not nest mw-content-text element when reloading a diff"
This reverts commit a6c5c5a81c.

Change-Id: Iba8e287e200ece043fe6e0ebed960b5d9e522236
2016-09-07 07:15:28 +00:00
jenkins-bot 90455594e6 Merge "Temporarily trigger revslider.diffreload to re-add Thanks JS code" 2016-09-06 16:42:32 +00:00
jenkins-bot d1148c49c5 Merge "Fix position of pointers in RTL mode" 2016-09-06 16:42:31 +00:00
jenkins-bot 86f62f85c5 Merge "Do not nest mw-content-text element when reloading a diff" 2016-09-06 16:42:31 +00:00
Leszek Manicki 08afa590de Fix position of pointers in RTL mode
Apparently after some recent changes, pointers in RTL UI were a bit off

Change-Id: Idae3b043d1d596c36b59b784b0a24fd0b9da76d3
2016-09-06 18:03:11 +02:00
Leszek Manicki a6c5c5a81c Do not nest mw-content-text element when reloading a diff
Bug: T144391
Change-Id: I1ac8c5f31a5e0c34913ba37676f5b3a89aa4db35
2016-09-06 18:01:12 +02:00
Leszek Manicki 9581a55ba2 Temporarily trigger revslider.diffreload to re-add Thanks JS code
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
2016-09-06 18:00:02 +02:00
Leszek Manicki effe850b57 Add temporary code to re-add WikEdDiff gadget after reloading a diff
Bug: T143199
Change-Id: If839acfc86bc3640b91d37211b56bd62df2f210d
2016-09-06 17:52:58 +02:00
Leszek Manicki 8e7fe2434d Add eslint, to be used instead of jscs and/or jshint
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
2016-09-05 09:47:11 +02:00
jenkins-bot ea9c83aa80 Merge "Close tooltips when clicking somewhere outside of them" 2016-09-01 12:42:16 +00:00
jenkins-bot 50313505fd Merge "Avoid having multiple revision tooltips at once" 2016-09-01 12:38:50 +00:00
WMDE-Fisch 9be2aa5a56 Close tooltips when clicking somewhere outside of them
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
2016-09-01 13:25:24 +02:00
WMDE-Fisch 2277651f44 Avoid having multiple revision tooltips at once
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
2016-09-01 13:18:12 +02:00
jenkins-bot 3dcfec7f5e Merge "Update URL in print footer when reloading a diff" 2016-09-01 09:57:38 +00:00
WMDE-Fisch a0cb76f747 Improve tooltip handling
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
2016-09-01 07:40:49 +00:00
Leszek Manicki f10e137897 Update URL in print footer when reloading a diff
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
2016-08-31 15:54:09 +02:00
jenkins-bot ddf94dd141 Merge "Do not include Revision Slider in the printable version of the page" 2016-08-31 12:17:16 +00:00
jenkins-bot 3f6815858c Merge "Add button to have revision slider expanded automatically" 2016-08-31 08:27:02 +00:00
Leszek Manicki 6502728184 Add button to have revision slider expanded automatically
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
2016-08-30 13:57:12 +02:00
Leszek Manicki 6c8c275690 Do not include Revision Slider in the printable version of the page
Change-Id: I477e80b82a74ac02e48759fc912200350cfc1824
2016-08-29 08:23:00 +00:00
Leszek Manicki a64dc43963 Reload category links when reloading the diff after revisions change
Bug: T143843
Bug: T143204
Change-Id: I6871ef106729e598329647d2726bef4755c45299
2016-08-25 14:01:42 +02:00
jenkins-bot 805b92dd1a Merge "Use moment.js's localized date and time format" 2016-08-23 10:19:07 +00:00
jenkins-bot 3c1c284de5 Merge "Highlight revision bar when hovering revision wrapper." 2016-08-21 11:04:45 +00:00
jenkins-bot 923d9608e2 Merge "Expand draggable/clickable pointer area." 2016-08-21 11:01:23 +00:00
jenkins-bot 01cf07fc12 Merge "Remove transition on revision wrapper hover." 2016-08-21 10:58:14 +00:00
Jakob Warkotsch 188c5d58c8 Remove transition on revision wrapper hover.
Bug: T143116
Change-Id: I85dbb9e9c46a022d701dc956051304090daa44fc
2016-08-19 16:18:17 +02:00
Jakob Warkotsch c5687cde9a Highlight revision bar when hovering revision wrapper.
Bug: T143115
Change-Id: I4e4d749e4d1b9644db66a476731a052c450caa3c
2016-08-19 14:57:11 +02:00
Jakob Warkotsch 19d98c55df Remove 1px height from pointer container.
Bug: T143113
Change-Id: Id9eee9451cc2437adbf3c3e109b26bec028134ca
2016-08-19 14:44:05 +02:00
Jakob Warkotsch 2625c6f1aa Expand draggable/clickable pointer area.
Bug: T143091
Change-Id: I43d8635542e489d816aea0b8ab3366207f27546c
2016-08-19 14:15:06 +02:00
Jakob Warkotsch a88c05c1f6 Reload side panel when loading a new diff.
Bug: T143204
Change-Id: I1034c756f094c9a3b12cfdd65c94f036fc0e4eee
2016-08-18 15:00:55 +02:00
Leszek Manicki d2a4c63107 Expand slider if there are space for more revision at the beginning
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
2016-08-17 14:35:01 +02:00
jenkins-bot d353e0db32 Merge "Reload the page menu when loading a new revision." 2016-08-17 11:36:05 +00:00
Jakob Warkotsch 567ebde9fa Reload the page menu when loading a new revision.
This avoids opening the edit page for the wrong revision when clicking
"Edit".

Bug: T143151
Change-Id: Iac2954449689c290c5f81a1a3a8505197d93dc14
2016-08-17 12:31:26 +02:00
Jakob Warkotsch 4d6233f842 Resize revision slider when resizing the browser window.
Bug: T139101
Change-Id: I57c7d9e553f02c2e8eaa76ee729f85ec4ae2ec3b
2016-08-16 16:08:44 +02:00
Ed Sanders 6c9e3e36a6 Fix loading state of diff page
* 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
2016-08-15 11:20:34 -07:00
Ed Sanders 6997f135db Abort pending requests
Ensure all requests are abortable promises, and abort if
a new, conflicting request is made.

Change-Id: Ie05142f6da8cba6dde4f73c1b22960b726af4764
2016-08-15 11:19:15 -07:00
Leszek Manicki 90d652adef Use moment.js's localized date and time format
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
2016-08-11 11:40:30 +00:00
Ed Sanders f6a44f43fe Convert the few instances of IDs to classes
Makes for more modular code.

Change-Id: Ic71d7421aea548e5b4a9c4841cd4af49a3d385a5
2016-08-10 15:32:12 -07:00
Leszek Manicki e243ca2746 Do not load RevisionSlider initially, add a button to show/hide it
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
2016-08-10 16:26:54 +02:00
WMDE-Fisch c5690ba763 Revert "Do not load RevisionSlider initially, add button to load it"
This reverts commit b0f229d75f.

Change-Id: I26427faaa00b38c2aa1377a66224c9062dcca302
2016-08-09 16:34:53 +00:00
Leszek Manicki b0f229d75f Do not load RevisionSlider initially, add button to load it
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
2016-08-09 14:54:59 +02:00
Leszek Manicki 796a971118 Make backward/forward arrows OO.ui.ButtonWidgets
Bug: T142206
Change-Id: I25c98e32c74235a2b70ac1d02c221f1898ba9958
2016-08-08 16:17:35 +00:00
Leszek Manicki 77095bfa65 Use OOjs Popup Widgets instead of tipsy
Bug: T141983
Change-Id: I4b4ea427f82b15625537d859623461eceb1eb52b
2016-08-08 18:11:23 +02:00
Leszek Manicki 0af4fe35d5 Make the "show help" button a OOjs ButtonWidget
This also adjusts position of the help icon so it better fits
the available space.

Bug: T139150
Change-Id: Iec7ec31a83a1a847cd68a994ecac12acf960d699
2016-08-08 13:14:31 +00:00
jenkins-bot 7010b98d7f Merge "Include a number in messages showing a number with a unit" 2016-08-03 10:03:39 +00:00
WMDE-Fisch fefe746b07 Reduce help text font-size
Bug: T139100
Change-Id: Ie4401b1a49026606109d90160001d327472f1bff
2016-08-02 14:12:57 +00:00
jenkins-bot 7ce0442fa0 Merge "Track the load times of RevisionSlider" 2016-08-02 12:08:31 +00:00
addshore fd61e41db8 Track the load times of RevisionSlider
Change-Id: Ibeaac111802af80d2910c1892d233b7835069148
2016-08-02 13:02:57 +01:00