Commit graph

125 commits

Author SHA1 Message Date
Ed Sanders a5f36af0f3 Prefix all classes and IDs with mw-revslider
Bug: T139105
Change-Id: Ia92396ec4f8acea39398173c81842d66257dc519
2016-07-01 11:27:23 +01:00
Ed Sanders 7b463c52eb Replace csslint with stylelint and make a pass
Change-Id: I7f3d1cd867399fa23b087daa89970ebe305c46d9
2016-06-30 21:21:28 +01:00
Jakob f2f24b1b11 Merge "Add more QUnit tests for public methods" 2016-06-30 15:08:15 +00:00
WMDE-Fisch f7ae734b99 Add more QUnit tests for public methods
Added tests for DiffPage, HelpDialog and RevisionListView.
Slightly refactored RevisionListView to improve testability.

Bug:T137964
Change-Id: I07dc8059d5a90bdd6623fd7748d36ba212763e15
2016-06-30 17:01:10 +02:00
WMDE-leszek 200f3e1ddd Merge "Start browser tests (Initial test for beta feature switch)" 2016-06-30 14:01:29 +00:00
addshore d7caa6c1f3 Start browser tests (Initial test for beta feature switch)
This adds 1 simple browser test to make sure that the placeholder
for the revision slider loads when the beta feature is enabled and
does not load when it is disabled

More tests will follow.

Bug: T133278
Change-Id: I5be9014b6c5ac03128c034fd866141e89fd7a0ed
2016-06-30 14:46:37 +01:00
WMDE-leszek 2964b673d5 Merge "Show a tooltip for the questionmark that opens the help text." 2016-06-30 13:11:46 +00:00
Jakob Warkotsch 80aafa27d9 Show a tooltip for the questionmark that opens the help text.
Bug: T138945
Change-Id: I6c3235bdf228d051c7039f188ff62d1137377bca
2016-06-30 15:07:18 +02:00
Leszek Manicki 946c7656f3 Make username in the toolip a link, another approach
This makes Mediawiki render the link. Unfortunately, it is
not rendering redlinks for not exisiting pages.

Also updates qqq.json i18n file which was missing in
Ifb2f33febbdf0f7c9584941b71596abb47fb8088

Bug: T138944
Change-Id: If336984362358193a6c43144ace2f818dbe0633d
2016-06-30 14:27:16 +02:00
Leszek Manicki 22dc00571f Make username in the tooltip a link
Bug: T138944
Change-Id: Ifb2f33febbdf0f7c9584941b71596abb47fb8088
2016-06-30 13:17:07 +02:00
Leszek Manicki 8e5189422a Highlight revision "wrapper" when mouse inside a tooltip
Bug: T138946
Change-Id: I93da2bc2fad36dc2927fe4123f91cab470cb3553
2016-06-30 11:52:57 +02:00
WMDE-Fisch 64c84fd573 Add own message for minor edit
Change-Id: I644d200c05e9d3cad6ef14aa48757e8d58e919f0
2016-06-28 13:48:25 +02:00
WMDE-Fisch a2d4b2cbc8 Use username for username label
After changing this several times to address concerns related to
GENDER, decided to use the mediawiki standard here also used
in the core code. For translators a hint was added that GENDER
is not supported here so an appropriate translation should be
chosen by them.

Bug: T136367
Change-Id: Icc2a8e6fc08761367c4ab6bb2a446262f8aa86e6
2016-06-25 16:12:44 +02:00
WMDE-leszek 33cf55a6f4 Merge "Bold tooltip labels and color-coded change size" 2016-06-25 14:07:55 +00:00
jenkins-bot 8bfed7caf1 Merge "Make a symbol on the "Show help" button translatable" 2016-06-25 11:40:18 +00:00
WMDE-Fisch 1d436fcfea Bold tooltip labels and color-coded change size
Also introduced language specific number formating. Therefore removed the
'bytes' message. Plural form will be computed in the size messages directly.

Comment label and value were split so the parsed comment can be used
plain without parsing the html again.

Bug: T137183
Change-Id: I12f30cb518e3cc5210528d5b22737dde868a0325
2016-06-24 17:51:36 +02:00
Leszek Manicki cd12add2cb Make a symbol on the "Show help" button translatable
Change-Id: I60ae368f59203f63fb352ec861db5d75d488f8fa
2016-06-24 15:55:03 +02:00
Jakob Warkotsch ec9caea004 Make revision tooltips hoverable.
Bug: T138392
Change-Id: Ic43345839cf8d04486141d24074a4d735c9c5c1f
2016-06-24 15:13:20 +02:00
Leszek Manicki 94405e7f6d Add a simple JSDuck config file
Running jsduck command generates API documentation to docs directory.

Change-Id: I1f9acbaf7868ebf48a56d20d6906cbcf23ef9748
2016-06-22 14:40:27 +02:00
jenkins-bot da0ee1560c Merge "Enhance code documentation." 2016-06-21 11:30:37 +00:00
Jakob Warkotsch 11ceffab2f Enhance code documentation.
Bug: T137965
Change-Id: Ice393838545f1545ee085ecdcddfa35f60b32ecd
2016-06-21 13:25:50 +02:00
jenkins-bot d4ea6b838f Merge "Add button to reopen the help dialog." 2016-06-17 11:23:56 +00:00
Jakob Warkotsch 079f5607c9 Add button to reopen the help dialog.
Bug: T137086
Change-Id: Ifef5c8451a53bf43b10418ace8e6651801480bb2
2016-06-17 13:11:38 +02:00
Leszek Manicki 202e76e78b Add a link to Meta page describing a community wish
Link is added to the first "slide" of the help dialogue.

Change-Id: I6abf375951b11331fe1d67993e7d06a2bb0c8f51
2016-06-17 10:59:48 +02:00
Leszek Manicki 3b9c3e73ad Escape HTML message in the "help slideshow"
Change-Id: I6854da2d8c6d7176956394f4f4733d0c2529d295
2016-06-17 10:55:42 +02:00
Jakob Warkotsch 5f6b3c8556 Show a help dialog.
- slide show dialog using OOJS UI
 - setting a user option to only show it once
 - translatable content
 - images of the slides

Bug: T136830
Change-Id: Ia820aecb20aa6b239f1a64dd328683639baf399e
2016-06-16 18:05:10 +02:00
Moriel Schottlender abfcd2c01b RTLize RevisionSlider's behavior
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
2016-06-08 13:26:43 +00:00
Jakob Warkotsch 183abd6286 Merge "Use a gender-neutral label for user." 2016-06-07 08:54:13 +00:00
Jakob Warkotsch 78a691ca06 Use a gender-neutral label for user.
Gender-specific labels here would be to expensive.

Bug: T136367
Change-Id: Id66790cd5c921ae536cbc5bede71f61d0e55a043
2016-06-06 15:51:29 +02:00
Moriel Schottlender 7b75c1ebf2 Use momentjs to display internationalized timestamps
MediaWiki uses the momentJS module to display standard timestamps;
this means you can avoid calculating the user offset, but also, it
means that all timestamps are internationalized and translated, and
use the standard view that MW uses in its interfaces.

We can store the user's offset in a RevisionSlider variable so we can
refer to it in timestamp construction, as well as manipulate it in
tests without touching any global user options that may affect other
tests.

Bug: T136825
Change-Id: I67d9859b8f33ab8a217128822e246e7ab67f6511
2016-06-03 13:20:35 +00:00
WMDE-Fisch 05ea211e8b Fire event for wikipage.content hook
Bug: T136827
Change-Id: If3e92716c4db71b9aeae3fb624c17174cf909b7d
2016-06-03 11:52:49 +02:00
Jakob 9ec481052a Merge "Add resize cursor to pointers" 2016-06-03 09:14:47 +00:00
WMDE-Fisch 1a7fe36941 Add resize cursor to pointers
Also prevent cursor flickering when dragging.

Bug: T136099
Bug: T136833
Change-Id: Ie04c5ad9669c1e839b34bc8f649cc9264f70b666
2016-06-03 11:12:49 +02:00
WMDE-Fisch 1a8a4312de Move dependencies to extension.json
Also removed unused dependency.

Bug: T135198
Change-Id: I1ee53ec9d7e123bdca84701b9557aeeeade815ff
2016-06-02 18:16:23 +02:00
jenkins-bot 04df38c25f Merge "Use parsed comment instead of custom parsing" 2016-06-02 15:46:02 +00:00
Brian Wolff 39d8d9229a Make files not executable
I know it doesn't matter, but it was kind of bothering me.

Change-Id: Iae9f8b17a3fb5ced362dc2da95e67e20db8af5a5
2016-06-02 13:48:09 +00:00
WMDE-Fisch f8446590cb Use parsed comment instead of custom parsing
Bug: T135740
Change-Id: I49757b5bcf2c47f459538bd4383325882a15336f
2016-06-02 13:47:41 +00:00
Jakob 19c50267e7 Merge "Dont push state to history in cases where not possible" 2016-06-02 12:10:27 +00:00
Jakob 3482b4a968 Merge "Add change size to tooltip" 2016-06-02 12:01:12 +00:00
WMDE-leszek 0956cf51e9 Merge "Do not center tooltip text" 2016-06-02 10:16:29 +00:00
WMDE-Fisch f6854e0bd4 Do not center tooltip text
Bug: T135740
Change-Id: I6c3b825b27736f693260bc3a6447b6328449e0d6
2016-06-02 12:14:01 +02:00
addshore 7d996ec788 Dont push state to history in cases where not possible
This fixes some issues with older versions of IE

Bug: T136714
Change-Id: I20d35e16ff4b31c2f719cc72c80ca7c57d5b528e
2016-06-02 12:02:39 +02:00
WMDE-Fisch da43204662 Add change size to tooltip
Bug: T135740

Change-Id: I50833c5b65c821eb885b261a15de2088cd15da6d
2016-06-01 17:05:09 +02:00
Leszek Manicki c14fa78bc0 Remove unused parameters when creating Pointer objects
Change-Id: I2bc5337d2a48fb5dd6b81d6c95584f79974d7e9f
2016-06-01 16:49:26 +02:00
Leszek Manicki b86194eacb Fix updating revision bar styles when going back/forward in history
This left unchanged in I164538bbaf44d46a4c66659f56e07ec7225d7fa9

Change-Id: Ied950472458a61efbfae5850d070f7047a222879
2016-06-01 16:45:15 +02:00
Leszek Manicki f9d9a4a4b7 When JavaScript disabled do not show RevisionSlider
As suggested in a comment in T135198, do not show anything above the
diff when JavaScript disabled instead of always putting a message
there.

Change-Id: I1c66fa4a9fa6e90f8318de3a4f656d629000d9ca
2016-05-31 19:49:08 +00:00
Leszek Manicki 225f48ac52 Do not fail when name of the user performing the revision is not available
For example when user name is not visible due to RevisionDelete the script
crashed. This makes it check if there is a user name defined and not try
to show it if there is none.

Bug: T135198
Change-Id: I43ce0e49e13ad6262cc60fd938c486ea3e328e64
2016-05-31 19:48:53 +00:00
Leszek Manicki a2774984c4 Make JavaScript code and CSS follow the style guide.
Changes include:
 - not passing in HTML attributes when creating tag elements,
 - creating HTML elements instead of appending hand-crafted HTML,
 - single append() calls instead of multiple consecutie appends,
 - not using raw HTML messages when not needed,
 - prefixing all CSS classes and IDs with "mw-" to avoid potential
   name conflicts.

Change-Id: I164538bbaf44d46a4c66659f56e07ec7225d7fa9
2016-05-31 14:57:14 +02:00
jenkins-bot 72e059034a Merge "Fix opacity on load in IE & Edge" 2016-05-31 10:38:56 +00:00
addshore e0aa879b99 Fix opacity on load in IE & Edge
Divs can not be directly inside <table>
elements, and apparently IE11 and Edge will thus
put these elements somewhere else / throw them away
/ do different things to other browsers.

Thus add the div to a row!

Bug: T134983
Change-Id: I1ad38298fc0d4ec7e6f45cb77ac0100900df9bd1
2016-05-30 12:24:42 +01:00