.'s in a metric name can essentially be thought of
as directories.
When building graphs from this data an * can be used to
match everything in a directory, for example:
MediaWiki.RevisionSlider.event.*
As these 2 events held another . in their name they
would ont be matched by the abov wild card, so instead use
a _ so that they will!
Change-Id: I1dce9253eb9d4ccb99516683897564e14bb9a577
- The first case is when the slider is collapsed and the auto
expand is switched on, the slider expands and now the toggle
switches.
- The second case is when the slider is loaded expanded, the toggle
now loads in the correct direction
Bug: T150846
Change-Id: I75610308c9f169fb926953a12dc5108e0fba23bf
Introducing a new class that draws lines between the pointers
and the related diff columns. Lines are redrawn when pointers
were moved. A colored border is added to the diff columns and
readded when the diff changes.
Bug: T149175
Change-Id: Iadf779368c58da7779c769bda8e9bd3fc5afcffa
This also fixes the "border-overlapping-issue" when hovering
the pin button in Chrome.
Bug: T145726
Bug: T145519
Change-Id: I6d3788ca5f54937f84c6a7f0fcc456ddf4b665d7
Introducing the Settings class handling settings for all users.
Use hidden user prefs for logged-in users and localStorage or
cookies for anonymous users.
Bug: T145494
Change-Id: I8676873c87d5656c55365706f1ccefa604caae4d
Drag-resizing a window results in hundreds of events being fired,
so limit this to one event every 250ms.
Change-Id: Ie3ace9001cd840a5d790cd269c4ae3c77649079a
Where we know the number contains only numerals, just cast
straight to a number using '+' operator. When getting computed
css from jQuery, use more suitable position methods instead.
Change-Id: Ia58b41a4522a1ef5a1516852821573c47e8dc9c9
Computed CSS ($.css) is relatively slow, and directionality
should never change, so just compute it once.
Change-Id: I6519fa7f54599c498e22a348dfaedd940c860955
Adding position data-attribute to the pointer elements and always
apply the same value as for the revision bars they are pointing to.
This will allow us to reduce the complexity of browsertests.
Bug: T146276
Change-Id: I6e6db55204b0c45fe94a5173e297a67a7ed38d00
Also add a note to the console about WikEdDiff
& RevisionSlider interaction and the required code
change.
As the code change uses the wikipage.diff hook the code
change will actually have no effect until this patch
is deployed, which includes the removal of the hack
for WikEdDiff.
Bug: T142636
Change-Id: Ie88021abb2325cc6259cf2fb041fbdca4ae9ca89
Depends-On: Ie488021f5d0e314a8ad6c8d1f1f3d936c427d719
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
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
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
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
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
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
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
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
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
* 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
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
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
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
User langauge setting could be overriden by adding uselang parameter
to the URL. Extension should use its value if present when fetching
the localized diff page.
Bug: T141760
Change-Id: I2539bc7bf523870f55f67bc94000c28644528172
This fixes two bugs:
- when more older revisions are loaded and inserted at the "beginning"
of revision list, the slider position in the top history state
should be adjusted. Otherwise when going back in browser history
wrong "window" of the slider is displayed.
This bug has been introduced in Ib3f4a6ac57ff17008f9d8784c4716bd294443096
- when clicking revision bars the history state should contain
the position of the changed after the clicking instead of the
position prior to the event. Otherwise when going back and forward,
the latter does not change the pointer positions (two top history
states before going back store the same pointer positions).
Change-Id: I2305a731a5e43ea15ad8468eb3dc4a5eea12b182
Extension should not enforce English order with number being followed
by unit "bytes" in messages related to byte size.
This also splits a message into two messages: one for page size value,
and other for change size. The latter size is signed and value to be
shown is colour-coded HTML element so it is a bit more complicated
case than the page size.
Bug: T141507
Change-Id: I96992eafd4cd8a5aed3fcd5944129bcd83139a16
This changes the previous behaviour of fetching always up to
500 most recent revisions.
Now the extensions fetches N revisions including the newer
revision selected to diff as the most recent revision.
N is number of revisions that would fit in the current
window when rendered as bars.
When user is close to either "end" of the slider, extensions
fetches another batch of up to N older or newer revisions,
as long as user does not reach the oldest or the newest
revision of the page.
Among others, this removes the limitations of the previous
approach: showing only 500 revisions, and failing to show
anything when any of selected revisions was older than
500 recent revisions.
This change also simplifies usage of Api class.
Bug: T135005
Change-Id: Ib3f4a6ac57ff17008f9d8784c4716bd294443096