Commit graph

201 commits

Author SHA1 Message Date
addshore 22556fcf16 Close HelpDialouge when clicking away from it
Bug: T145525
Change-Id: Ia21d5163f561ede4f327eec3a4aaf7c34d103094
2016-09-15 12:01:08 +02:00
jenkins-bot 9aabbb4ae4 Merge "Fix position from top of tuitorial" 2016-09-13 16:07:20 +00:00
addshore 42917b1821 Fix position from top of tuitorial
Bug: T145526
Change-Id: Id7d344c946dd0e66d1ed2fd639ebbb1edf06b913
2016-09-13 15:56:49 +00:00
addshore c8cd4c5fb4 Only show pin button to logged in users
When the extension is used without the BetaFeatures
extension it is possible to use while not logged in.

Anon users can not have a user preference set.
Thus anon users should not be shown the pin icon.

It may be an idea to add a cookie for anon users
later down the line.

Change-Id: Iafeacf6ae9e24b3134f1c180d390cfad4245719a
2016-09-12 12:45:35 +02:00
jenkins-bot f068f9b684 Merge "Revert "Do not nest mw-content-text element when reloading a diff"" 2016-09-07 07:58:45 +00:00
Addshore b6906e70f1 Revert "Do not nest mw-content-text element when reloading a diff"
This reverts commit a6c5c5a81c.

Change-Id: Iba8e287e200ece043fe6e0ebed960b5d9e522236
2016-09-07 07:15:28 +00:00
jenkins-bot 90455594e6 Merge "Temporarily trigger revslider.diffreload to re-add Thanks JS code" 2016-09-06 16:42:32 +00:00
jenkins-bot d1148c49c5 Merge "Fix position of pointers in RTL mode" 2016-09-06 16:42:31 +00:00
jenkins-bot 86f62f85c5 Merge "Do not nest mw-content-text element when reloading a diff" 2016-09-06 16:42:31 +00:00
Leszek Manicki 08afa590de Fix position of pointers in RTL mode
Apparently after some recent changes, pointers in RTL UI were a bit off

Change-Id: Idae3b043d1d596c36b59b784b0a24fd0b9da76d3
2016-09-06 18:03:11 +02:00
Leszek Manicki a6c5c5a81c Do not nest mw-content-text element when reloading a diff
Bug: T144391
Change-Id: I1ac8c5f31a5e0c34913ba37676f5b3a89aa4db35
2016-09-06 18:01:12 +02:00
Leszek Manicki 9581a55ba2 Temporarily trigger revslider.diffreload to re-add Thanks JS code
In order to properly fix problems reported in T142636, core hook
triggered on diff change (on diff page) will be added in
I5aad7cc10a0db869d7c25d41f7db056885dad69b.
When that change is merged, Thanks extension will be listening
to this hook and not to RevisionSlider-specific revslider.diffreload.

This adds temporary code fixing RevisionSlider's and Thanks' interaction
before hook introduced in I5aad7cc10a0db869d7c25d41f7db056885dad69b is
available. After it gets merged, the code added here should be replaced
by firing the new core hook.

Change-Id: I5dd6c592165ed30244ac8bff37bb6e4949c8bc4a
2016-09-06 18:00:02 +02:00
Leszek Manicki effe850b57 Add temporary code to re-add WikEdDiff gadget after reloading a diff
Bug: T143199
Change-Id: If839acfc86bc3640b91d37211b56bd62df2f210d
2016-09-06 17:52:58 +02:00
Leszek Manicki 8e7fe2434d Add eslint, to be used instead of jscs and/or jshint
First I jumped on replacing both jscs and jshint with eslint but
it might be premature decision. Although linting with eslint
is possible (like in there is wikimedia config for eslint)
it is still not clear should it

But in case the change happens we will be ready.

Apart from config stuff this changes few bits spotted by eslint:
improves some indentation, removes weird spaces, completes some
doc blocks, changes IIFE forms in tests. These changes do not
seem controversial.

Change-Id: I9f8bf0f5745da8e662685f4cd879ea4baa609c01
2016-09-05 09:47:11 +02:00
jenkins-bot ea9c83aa80 Merge "Close tooltips when clicking somewhere outside of them" 2016-09-01 12:42:16 +00:00
jenkins-bot 50313505fd Merge "Avoid having multiple revision tooltips at once" 2016-09-01 12:38:50 +00:00
WMDE-Fisch 9be2aa5a56 Close tooltips when clicking somewhere outside of them
Added the revisions to the exception to avoid tooltips beeing
closed and opened again when clicking on a revision-bar to
load it.

Bug: T143090
Change-Id: Ib8011a52c469ad715e97c1c42e7489c5b31aa4a8
2016-09-01 13:25:24 +02:00
WMDE-Fisch 2277651f44 Avoid having multiple revision tooltips at once
When rendering several RevisionListView items e.g. by loading and adding
more revisions each one had its own 'currentTooltip' so the elements
where not exclusive. This patch fixes that by looking for the class
objects when closing tooltips or changing wrapper highlighting.

Tooltip timeouts are still per-list but that should not affect the
behavior with multiple lists.

Bug: T143090
Change-Id: I23c61547e1a925da1c0b7e7a475ad61e6ed1b1b6
2016-09-01 13:18:12 +02:00
jenkins-bot 3dcfec7f5e Merge "Update URL in print footer when reloading a diff" 2016-09-01 09:57:38 +00:00
WMDE-Fisch a0cb76f747 Improve tooltip handling
Reordering of stuff and splitting conditions seems to fix some of wiredness.
Mouseenter and Mouseleave are the better events in these cases.

Change-Id: I66d71b1d4f394199949475dc42ca085169e0584f
2016-09-01 07:40:49 +00:00
Leszek Manicki f10e137897 Update URL in print footer when reloading a diff
Print version of the page contains a "Retrieved from" link
referring to a particular revision. URL should be adjusted when
revisions are switched in the slider

Change-Id: Icca3c452ae6926a997b22d3bf9632591fbc0b58d
2016-08-31 15:54:09 +02:00
jenkins-bot ddf94dd141 Merge "Do not include Revision Slider in the printable version of the page" 2016-08-31 12:17:16 +00:00
jenkins-bot 3f6815858c Merge "Add button to have revision slider expanded automatically" 2016-08-31 08:27:02 +00:00
Leszek Manicki 6502728184 Add button to have revision slider expanded automatically
This adds a button which allows a user to make revision slider
automatically expand on each diff page (disabled by default).
User's choice is stored as a hidden user preference.

This is a bit hacky as it squeezes a button on top
of another button (100% wide expand/collapse button).
This also adjusts styles of ToggleButtonWidget so
the button looks more like a frameless button, although
it is created as a framed one (to have inverted behaviour
when button is in its "on" state).

The button only gets visible when Resource Loader finishes
loading JS and CSS to avoid button jumping around the top
of slider window before "right" styles are applied.

Bug: T142196
Change-Id: Id561485344cba9b136666fe31b086151467de19e
2016-08-30 13:57:12 +02:00
Leszek Manicki 6c8c275690 Do not include Revision Slider in the printable version of the page
Change-Id: I477e80b82a74ac02e48759fc912200350cfc1824
2016-08-29 08:23:00 +00:00
Leszek Manicki a64dc43963 Reload category links when reloading the diff after revisions change
Bug: T143843
Bug: T143204
Change-Id: I6871ef106729e598329647d2726bef4755c45299
2016-08-25 14:01:42 +02:00
jenkins-bot 805b92dd1a Merge "Use moment.js's localized date and time format" 2016-08-23 10:19:07 +00:00
jenkins-bot 3c1c284de5 Merge "Highlight revision bar when hovering revision wrapper." 2016-08-21 11:04:45 +00:00
jenkins-bot 923d9608e2 Merge "Expand draggable/clickable pointer area." 2016-08-21 11:01:23 +00:00
jenkins-bot 01cf07fc12 Merge "Remove transition on revision wrapper hover." 2016-08-21 10:58:14 +00:00
Jakob Warkotsch 188c5d58c8 Remove transition on revision wrapper hover.
Bug: T143116
Change-Id: I85dbb9e9c46a022d701dc956051304090daa44fc
2016-08-19 16:18:17 +02:00
Jakob Warkotsch c5687cde9a Highlight revision bar when hovering revision wrapper.
Bug: T143115
Change-Id: I4e4d749e4d1b9644db66a476731a052c450caa3c
2016-08-19 14:57:11 +02:00
Jakob Warkotsch 19d98c55df Remove 1px height from pointer container.
Bug: T143113
Change-Id: Id9eee9451cc2437adbf3c3e109b26bec028134ca
2016-08-19 14:44:05 +02:00
Jakob Warkotsch 2625c6f1aa Expand draggable/clickable pointer area.
Bug: T143091
Change-Id: I43d8635542e489d816aea0b8ab3366207f27546c
2016-08-19 14:15:06 +02:00
Jakob Warkotsch a88c05c1f6 Reload side panel when loading a new diff.
Bug: T143204
Change-Id: I1034c756f094c9a3b12cfdd65c94f036fc0e4eee
2016-08-18 15:00:55 +02:00
Leszek Manicki d2a4c63107 Expand slider if there are space for more revision at the beginning
After resizing a window there might be more space at the beginning
of the slider "axis" than there are revisions loaded so far. In such
case the slider should be expanded, so more revisions are loaded
to fill the whole available space.

Change-Id: Ied8abe294967328112afb1fe4d14b2e29ed2c092
2016-08-17 14:35:01 +02:00
jenkins-bot d353e0db32 Merge "Reload the page menu when loading a new revision." 2016-08-17 11:36:05 +00:00
Jakob Warkotsch 567ebde9fa Reload the page menu when loading a new revision.
This avoids opening the edit page for the wrong revision when clicking
"Edit".

Bug: T143151
Change-Id: Iac2954449689c290c5f81a1a3a8505197d93dc14
2016-08-17 12:31:26 +02:00
Jakob Warkotsch 4d6233f842 Resize revision slider when resizing the browser window.
Bug: T139101
Change-Id: I57c7d9e553f02c2e8eaa76ee729f85ec4ae2ec3b
2016-08-16 16:08:44 +02:00
Ed Sanders 6c9e3e36a6 Fix loading state of diff page
* The jQuery for appending the 'darkness' mask was broken (not nesting)
* Use a more semantic name
* Simplify styling to just set opacity to 50%.
* Remove browser compatibility hacks as all MediaWiki's JS
  supported browsers also support CSS opacity.

Change-Id: Id893a75bb90a4e6e2e8a26ebc3863de565d8a4ee
2016-08-15 11:20:34 -07:00
Ed Sanders 6997f135db Abort pending requests
Ensure all requests are abortable promises, and abort if
a new, conflicting request is made.

Change-Id: Ie05142f6da8cba6dde4f73c1b22960b726af4764
2016-08-15 11:19:15 -07:00
Leszek Manicki 90d652adef Use moment.js's localized date and time format
Localized format of date containing month name, day, year and time
is used instead of format enforcing the order of time and date,
and use of short month name.

Bug: T141167
Change-Id: I39b2844e777beb986cefb3097d52d481bb038a63
2016-08-11 11:40:30 +00:00
Ed Sanders f6a44f43fe Convert the few instances of IDs to classes
Makes for more modular code.

Change-Id: Ic71d7421aea548e5b4a9c4841cd4af49a3d385a5
2016-08-10 15:32:12 -07:00
Leszek Manicki e243ca2746 Do not load RevisionSlider initially, add a button to show/hide it
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.

This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.

API calls are only made once RevisionSlider has been expanded.

This is re-submit of b0f229d75f
that was reverted in I26427faaa00b38c2aa1377a66224c9062dcca302.

Bug: T141871
Change-Id: I879de5774b2cce7b908e73cbbe869fd48d6afa23
2016-08-10 16:26:54 +02:00
WMDE-Fisch c5690ba763 Revert "Do not load RevisionSlider initially, add button to load it"
This reverts commit b0f229d75f.

Change-Id: I26427faaa00b38c2aa1377a66224c9062dcca302
2016-08-09 16:34:53 +00:00
Leszek Manicki b0f229d75f Do not load RevisionSlider initially, add button to load it
Instead of loading RevisionSlider only add a little button
to expand RevisionSlider on top of the diff page.

This makes RevisionSlider only steal a bit of space over the
diff, and only inserts quite a big slider to users that want
to have it visible for the particular diff.

API calls are only made once RevisionSlider has been expanded.

Bug: T141871
Change-Id: Ib312f6225b85b9ebdf4ac5d16e254a57d5cf6411
2016-08-09 14:54:59 +02:00
Leszek Manicki 796a971118 Make backward/forward arrows OO.ui.ButtonWidgets
Bug: T142206
Change-Id: I25c98e32c74235a2b70ac1d02c221f1898ba9958
2016-08-08 16:17:35 +00:00
Leszek Manicki 77095bfa65 Use OOjs Popup Widgets instead of tipsy
Bug: T141983
Change-Id: I4b4ea427f82b15625537d859623461eceb1eb52b
2016-08-08 18:11:23 +02:00
Leszek Manicki 0af4fe35d5 Make the "show help" button a OOjs ButtonWidget
This also adjusts position of the help icon so it better fits
the available space.

Bug: T139150
Change-Id: Iec7ec31a83a1a847cd68a994ecac12acf960d699
2016-08-08 13:14:31 +00:00
jenkins-bot 7010b98d7f Merge "Include a number in messages showing a number with a unit" 2016-08-03 10:03:39 +00:00