mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-15 11:40:43 +00:00
abfcd2c01b
Allow RevisionSlider to work properly in both LTR and RTL contexts by making sure that when the interface language is RTL, the entire interface flips. "Backwards" and "Forwards" are reversed in RTL context, and the code and behavior should respond to that. Changes made: * Make sure the container has a direction set * Change the placement of the revision divs from absolute positioning (that requires re-calculations when the page is flipped to RTL) to divs that are display: inline-block and have no right/left setting. This means that the DOM will automatically flip its own visual order when the container is set to RTL. * Flip the calculation of positioning and the calculation of which element the pointer is on when it is dragged if the document is RTL. * Mirror all scroll animations when the page is in RTL. * Rename the scroll buttons to 'backwards' and 'forwards' for clarity, as they are flipped when the interface is RTL. * Rename pointers to 'older' and 'newer' instead of trusting their order in the DOM. Bug: T136277 Change-Id: I7c903c2e9d8ee2a0ef2eeb7b99f2251f230a794e |
||
---|---|---|
i18n | ||
modules | ||
resources | ||
tests | ||
.csslintrc | ||
.gitignore | ||
.gitreview | ||
.jscsrc | ||
.jshintignore | ||
.jshintrc | ||
composer.json | ||
extension.json | ||
Gruntfile.js | ||
package.json | ||
phpcs.xml | ||
README.md | ||
RevisionSlider.hooks.php |
RevisionSlider extension
This MediaWiki extension shows a slider allowing selecting and comparing of revisions on a diff page
Installation
Check out this extension into the extensions
folder of your MediaWiki installation and add the following line to your LocalSettings.php
:
wfLoadExtension( 'RevisionSlider' );
Tests
Before executing tests run tho following in the root directory of the extension once:
composer install
npm install
For the tests run:
composer test
node_modules/.bin/grunt test
QUnit Tests
See https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing#Run_the_tests