The detection touched in this patch addresses slightly different
kinds of RTL handling in browsers. The detection how things are
handled seems to be broken in the mentioned Chrome V8 versions.
The workaround takes care of that issue. With Chrome V8 6.0 this
should be fixed and the workaround can be removed.
P.S.: Credits to Leszek for the idea what's actually going on.
Bug: T168299
Change-Id: I068c2fb6ba60189004c0ec6661fcd346af16126c
This patch fixes issues with the RevisonSlider assuming that the higher
revision id belongs to the newer revision. Min/Max methods to decide what
the diff and what the oldid is are removed and the usage of methods is
adjusted accordingly.
Also the test for switchover pointers is removed since this will not work
with the patch.
Bug: T164455
Change-Id: If5d9cbb8ebd872aee376d249942e6881c8edb984
Previously, pressing ESC aborted the dragging of the slider, but this
was broken by I64cca7a7547310bee64ad95f500b722c362bbb45, which refactored
uses of a variable that was previously a closure into two separate functions.
Bug: T140965
Change-Id: I6b7bc383128d8c7d99da469706bff881f1329cd9
This will make the pointers work on touch devices. The events responsible
for the touch drag and move are converted to mouse actions that will
trigger the draggable.
When using Chrome on touch devices and zooming the offset of elements
calculated by jQuery is wrong. There is a workaround that seems to work
and also seems to not break behavior with normal browsers and on other
devices. Since this only seems to be a problem in Chrome the fix will
only applied to Chrome browsers to avoid performance los on others.
Also introduced a script file for static utility methods.
Bug: T164249
Change-Id: I245f77eb836afded249f3b5ebb7129dab08d0017
This change enables tooltips when hovering the slider lines. To avoid
interference of these events when dragging a variable is set to keep
track of the dragging state.
Bug: T162602
Change-Id: I45c1b73ca470d7b8fcf8b95e15187864e35e907f
Adding a new class for an alternative slider view with
one slider for each pointer. The new class will be used
when the extension is installed as a beta feature.
Each pointer has now its own pointer container visualized
with a thin line. Pointers can not change places anymore
and methods doing so where overwritten in the patch.
Selected revisions are not colored atm to better distinguish
between pointers and bars. Poiner lines are now shown above
the bars. ( as from feedback in the last PM session )
Some issues with the design might remain. But since we plan
the deployment anyway next week this could be merged if reviewed.
Bug: T160410
Change-Id: If00c31e30f8a01f3525b191c70605b9c9381671d
The meaning of first in this context was totally unclear and not
very usefull. It turns out, that the "first" revision is always
the oldest and the last is always the newest revision.
Change-Id: I009438777908a5f4a8833f8f5cb7d3041057741c
This patch changes the way OOjs UI tooltips are constructed.
Until now we did not use the full potential of the widget.
Some strange behaviour remains and it seems we can not use
'horizontalPosition' here. Therefore the direction is passed
down to the RevisionsListView to center the tooltip manually
and margins are set for the help and arrow tooltips.
Bug: T159428
Change-Id: I0a67340da4d94f2f6b29e507f94fc695b44b71f9
This now attaches the revisionslider to the
older and new links that are by default in the
diff.
This means when clicking them the revision slider
will use an ajax call to reload the diff (while moving
its own pointes) rather than reloading the whole page
Change-Id: I11fa92828140f980ca8edee27403a4e2a5f5a6a7
When the ESC key is pressed, aborts the drag and returns the sliders to
their original positions
Bug: T140965
Depends-On: Ib0f386c6a2447740f44591be70c34cf4a83b88c4
Change-Id: I2dfc2fa03d2c7705fa2947dffa07fbce8ed3b185
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
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
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
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
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