Commit graph

65 commits

Author SHA1 Message Date
addshore a47a8fec0c Retry diff reload once if it fails
Change-Id: Icbdd230c05821dd582fcd1b8124fb6735dc95df4
2016-05-12 09:48:48 +01:00
addshore f9471bcfbc If the slider fails to load then fail nicely!
If something goes wrong with the initial api rquest the
slider would either load in a broken state or say that
it is loading forever.

Now a message will be displayed to the user as well
as the error logged to the console.

Change-Id: Id763f31432feb7bd0e9ecbbeb2dd40f7ca6acaaf
2016-05-12 09:46:39 +01:00
addshore b1f6a1df56 add events to history
This allows using browser back and forward buttons
once users have started heading between revisions.

This also updates the URL so that the page can be
reloaded at any time and the same state will be held.
(This also removes a commented out block of code that
I think was left for updating the URL)

Change-Id: I4cfe38f76eeb9e090f0a8a42e22e75cf84014d60
2016-05-12 08:36:28 +00:00
addshore 4835195da9 Add basic usage tracking
Change-Id: I4bde95492ef6483cfd4e4f3c29b1ab7eaeccbc10
2016-05-12 08:36:23 +00:00
WMDE-Fisch a6571ae7ab Add Readme with install and test instructions.
Change-Id: Ie4b59fe7ef8c716554d4e50a1baa0da2881e99bf
2016-05-11 17:44:35 +02:00
addshore 6017c396e9 Don't show arrow when slider is at either end
Change-Id: I7fdced0e959ff9692375bb0fcb879f821308189a
2016-05-11 12:25:01 +01:00
jenkins-bot 5db5218d58 Merge "Don't allow pointer clicks while timeline is sliding" 2016-05-11 10:13:20 +00:00
jenkins-bot 2bb7714212 Merge "Always show oldest version on left" 2016-05-11 10:13:18 +00:00
jenkins-bot 24e58a5af3 Merge "Always load showing at least the right pointer" 2016-05-11 10:13:16 +00:00
jenkins-bot 12ec2f422d Merge "Don't allow interaction while page loading" 2016-05-11 10:13:14 +00:00
jenkins-bot 28407bb283 Merge "Update diff view on pointer move." 2016-05-11 10:09:58 +00:00
jenkins-bot 56cc0622a7 Merge "Re add section legend as a module" 2016-05-11 10:09:56 +00:00
jenkins-bot 05a2a6ec9d Merge "Escape edit comments in tooltips" 2016-05-11 10:09:29 +00:00
jenkins-bot d819efe6c8 Merge "Load pointers on correct revisions" 2016-05-11 10:09:26 +00:00
jenkins-bot 97870b0170 Merge "Fix commented out tests" 2016-05-11 10:09:11 +00:00
jenkins-bot ce4fa21981 Merge "Create Slider module." 2016-05-11 10:09:08 +00:00
Translation updater bot 8038e8edfb Localisation updates from https://translatewiki.net.
Change-Id: I5515d953c4fe011d0876c6b019b8a7f439572b02
2016-05-10 22:29:34 +02:00
addshore 8d41f70a5b Don't allow pointer clicks while timeline is sliding
Bug: T133279
Change-Id: I46add92298ac41b06437eef59f33a0ee64c4ccf0
2016-05-10 21:04:21 +01:00
addshore bc9ae355dc Always show oldest version on left
Change-Id: Ic03e25acb751f6cb9f9e832dae71bef01622afc4
2016-05-10 20:45:09 +01:00
addshore 1dc1235a0f Always load showing at least the right pointer
Change-Id: If9544c2da6a456556b4011a6ee01c62449a0bb30
2016-05-10 20:42:11 +01:00
addshore 9975e83b9d Don't allow interaction while page loading
Change-Id: I614fe3c90c57511ba392493d683a5b6e8dc169d9
2016-05-10 20:15:11 +01:00
addshore ddc1980f7b Update diff view on pointer move.
Bug: T134384
Change-Id: I26461f8afdfc3322f125a7f3c30d7f8f1b231398
2016-05-10 19:53:31 +01:00
addshore be036e757c Re add section legend as a module
Change-Id: I6ad89e2b15435ef35cc1ebddde0f92584ffd9ecf
2016-05-10 19:11:59 +01:00
addshore 9044f120b7 Escape edit comments in tooltips
Change-Id: I436924fc2d4455c6aecff884a0eb746621fff210
2016-05-10 17:38:11 +00:00
addshore 78bf501d58 Load pointers on correct revisions
Bug: T133273
Change-Id: I2223defbb80bc44ec7508c71ac9270a1230e45bc
2016-05-10 18:34:05 +01:00
addshore cfac82978c Fix commented out tests
Change-Id: I283228cc03dcc64107720f9092a2f41483f74853
2016-05-10 18:14:10 +01:00
Jakob Warkotsch 980f2ca917 Create Slider module.
* threw out most of the things from init.js
* turned Slider + View into respective modules
* pointers should remember position (except on page load) and correctly
  slide back to their position/to the side

Some things still need testing and refactoring.

Addshore: - CS fixes and comment out current failing tests

Bug: T134395
Change-Id: I78a7095e1d9902314163b1443448f47ef0484d4e
2016-05-10 17:38:46 +01:00
Translation updater bot e5fec3d715 Localisation updates from https://translatewiki.net.
Change-Id: I456b9545fefdc22f58249e9d707bdfe5bb890013
2016-05-09 22:14:49 +02:00
addshore ee80c0450e composer.json mediawiki/mediawiki-codesniffer to 0.7.1
Change-Id: I23c9b72ba0e1d9991910356fb61e6fa65a43805a
2016-05-09 09:20:53 +01:00
addshore 9bd8eb07a8 Add BetaFeatures support
Bug: T133379
Change-Id: I793665cf41ec5624034910d7aedde689ba0854b2
2016-05-09 09:17:47 +01:00
Translation updater bot cfee0dfae9 Localisation updates from https://translatewiki.net.
Change-Id: Ib74eac7a4952f5c6bef36a57d39eb3d95bfbfb65
2016-05-07 10:57:31 +02:00
addshore 3eb7e87879 Add data-revid to all slider elements
Change-Id: I1ae5a98d40342cd581dca5a19caaae283472e2da
2016-05-06 14:59:59 +01:00
addshore a8b4bef516 Put the new and old rev ids in the dom for easy grabbing
Change-Id: Ice5ebc524cd8c028d26467860be498cfae79dec6
2016-05-06 14:44:21 +01:00
Jakob Warkotsch 54720944a0 Create Pointer module.
This creates a module for the draggable pointers for the RevisionSlider
mainly to encapsulate both the pointers' state and their HTML code.

Some animation methods such as slideToSide and slideToPosition
that are still flying around in init.js weren't added to the
module since I thought they should be part of the not yet existing
Slider module.

Change-Id: I1292bfb0bbd68f8d2de04b3b5e5f3133ec6363b8
2016-05-06 12:37:01 +00:00
addshore ed72e77693 Use Html class to make Html in onDiffViewHeader
Change-Id: I2e4f06d1700dd9c686bb8eda53408370784ef365
2016-05-06 11:37:30 +01:00
Translation updater bot a768ca1a8c Localisation updates from https://translatewiki.net.
Change-Id: I8ad4824ebdf22052734181e55099977b96eea0e4
2016-05-04 22:24:53 +02:00
addshore d9ce49d105 Add basic en description
Change-Id: Iedba41447098108b7d0cae309782500399d0a655
2016-05-04 14:04:29 +01:00
jenkins-bot 30e1138f53 Merge "Add noscript sentence to the placeholder" 2016-05-04 10:14:36 +00:00
jenkins-bot 4e073cf9e9 Merge "Also add module in onDiffViewHeader hook" 2016-05-04 10:14:33 +00:00
jenkins-bot 8140114a53 Merge "Add localizable placeholder message while loading" 2016-05-04 10:14:01 +00:00
jenkins-bot 08e608b81a Merge "Reserve space for RevSlider to load into" 2016-05-04 10:13:58 +00:00
addshore ae1c298550 Add noscript sentence to the placeholder
Change-Id: I4a8c9cb5dc49ca3d023ea91932f0317540c455a5
2016-05-03 13:47:35 +00:00
addshore 7cc46839d1 Also add module in onDiffViewHeader hook
Change-Id: I33f85d0e24092b1e5bf9577069a3c34b9ac3e7a4
2016-05-03 15:45:14 +02:00
addshore ba4015ed6b Add localizable placeholder message while loading
Change-Id: I762b03c5af8765b90afee81af750880096db6638
2016-05-03 15:35:39 +02:00
addshore 8490d0f040 Reserve space for RevSlider to load into
Bug: T133275
Change-Id: I97283cfe0798a3bacc42fcb8bc067e74ab085ff1
2016-05-03 15:27:27 +02:00
WMDE-Fisch 308d24c8c5 Added jscs checks for tests
Change-Id: Ice2d37f40105d082fd10ebc7a83bd1ef02919eb4
2016-05-03 12:07:47 +02:00
Jakob af4d8268ae Merge "Fix Hooks isRevisionPage" 2016-05-03 09:42:40 +00:00
addshore bc9373dc0f Fix Hooks isRevisionPage
As far as I can tell diff is the only thing that is needed
to show a diff page (which is where we want to show the Slider)

For example:
 - http://localhost/w/index.php?title=Foo&diff=5

Change-Id: I0c4e5ae04412a6da4034cf8c804742537aaeafdd
2016-05-03 10:35:12 +01:00
WMDE-Fisch a0f22fd88b Refactored getSection into Revision class and added tests
Change-Id: I6c6fa5194482c25aa3f2285aebfee11cd713285d
2016-05-02 15:21:40 +02:00
addshore 79cfbf8199 Update grunt npm packages
grunt 1.0.1 no longer also needs grunt-cli

Change-Id: I2b542884d265630b19408258a1f496e0338e85ec
2016-05-02 10:47:32 +01:00