Commit graph

288 commits

Author SHA1 Message Date
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
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 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