Commit graph

14 commits

Author SHA1 Message Date
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
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
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
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
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
Jakob Warkotsch 8c6676f939 Create module for Revision type.
This pulls out some of the code around revisions into a decoupled and
tested module.

Change-Id: Ib2a4f96f0e0b9a96ec85d300d97cd52dcaffe89e
2016-04-28 12:38:24 +02:00
Jakob Warkotsch 23b5b2f112 Initial commit.
This turns the prototype code of the Revision Slider into a MediaWiki
extension.
With this extension enabled the slider should appear on diff pages
already but it won't actually show diffs when adjusting the slider
pointers.

Things that changed so far in the prototype JS code:
- pulled out the rainbow function and made it use Math.floor instead of
 the ~~ binary operator
- pulled out the API request that fetches the revisions into its own
 module
- cleaned up and documented some parts of the code

The code is still very much WIP and JSCS still has a couple of
complaints.

Bug: T132576
Change-Id: I2e22365f3b93a76d5b8d3997242b5fed996c6d78
2016-04-19 16:35:37 +02:00