Completed subtasks
* Added bubble in the Tootltip
* Added border on clicking or hovering the bubble
* Highlites Bubble on hover
* When Clicked or hover on the Bubble: Highlights
revisions from the same user
* Added filter revisions.
Bug: T136105
Change-Id: I64cfef395ce1812d501980067edffe210fc99227
This is a direct follow up to the change done in I885f8e7. I found the
code very hard to read after the change, and tried to rearrange it a
little bit. This is what I came up with. What the code does is entirely
untouched.
This also rearranges the replaceWith calls so the replacements are done
from top to bottom.
This patch also avoids calling mw.config.set multiple times.
Change-Id: I1cbce8e8aa030d6ba5cd7d19ab26fa363e13474b
`$.fn.replaceWith` removes content from the DOM. Therefore, the
new content object was not being passed on by the hook.
Change-Id: I885f8e789b806a9ae09de1ed31a19a3f9db8144f
Approach followed:
- Include tags as an additional parameter in rvprop field to fetch revision tags
- Use API Tags to fetch available change tags for a wiki along with their display names
- At the time of fetching revision data rebuild the revision list with tags containing display names
- Display tags one in each line on the tooltip
Bug: T180429
Change-Id: Ieba8b79ed408ff50b3f7d4bcfd7b2fa8cca83278
Using rawElement function to generate a new html element for loading spinner.
This replaces the progress bar widget.
Bug: T161640
Change-Id: I949bce945def25de561c0ae0df971c3f609586ce
Added show() and hide() for mw-revslider-auto-expand-button in collapse and expand function.
Bug: T200263
Change-Id: Ic24a175dfe8d19853e32669f12b9f17e26730d6b
The 50 is the default. The worst-case scenario here is that users
beyond this limit don't have a gender for a while, until the next call
to the same API endpoint fetches the next 50 users with an unknown
gender.
Doing multiple API calls in advance is not worth it, in my opinion.
Bug: T197858
Change-Id: I0fdcc7ea96a6a5ee3934600c6f0fdc65263276e8
The arrow in Revision Slider flips on expand and collapse which is not according to the standard of OOUI.
Bug: T198626
Change-Id: I4205a2260e8507a09f2950566e5033bd58a74345
animation duration now has a factor that is dependent on
the square root of the animation distance.
Bug: T161883
Change-Id: Ic9fe89c7e3f984d3390260805e2480a0f8ffd0c9
including:
- Using LESS for nested CSS
- Overrule `margin` of frameless OOUI `mw-revslider-toggle-button`
- Removing CSS that had no effect since some time
- Removing `!important` where not longer needed
Change-Id: I1ba01061ebafe799ca62dbb6ce5e79459612af23
This patch mainly reintroduces the option to click on bars and move
the pointers with it. To do this, 'ghost' pointers are introduced
to show what would happen when bars are clicked. The pointers moved
differ depending on where the user clicks on a bar. Pointers are
still not allowed to change positions, so in some cases booth pointers
move with one click. See the task description.
The patch also includes some renaming and also refactoring of the
click handling in general. Furthermore bar hover mechanics are handled
by the RevisionListView class now.
Moving both pointers is not possible when it would push one of them of
limits.
Bug: T172092, T173566
Change-Id: I32a8256f7667e03081324d54accdf03a17454faf
Currently, when dragging a pointer over another revision but not
releasing it until it is at the same location, the diff still reloads
This change stores the initial positions and comparing at the end.
Bug: T163425
Change-Id: I430650d12bfeb3ce4af59abe91f18cc2b861a3de
Currently, `this` is passed as the parameter for pageName, making it
seem like getUrl() can take in an object as the first parameter, when
it should be a string. This works right now because of a tertiary
operator that fetches what we need. To reduce confusion, we should
pass null instead.
Change-Id: Ieea30a4933f3e3fdeb8331c5c544bf1eb034e6b7
of it appear normal. However, the revslider-tooltips are not inside
this globalWrapper, and thus need a separate CSS rule.
Bug: T166231
Change-Id: I2115688fee75145349e062b9586713a56541afa0
Several improvments including documentation, naming and refactoring:
- bundeling of methods setting, redrawing and loading new diffs
- renamed and improved documentation around some methods in that area
- fixed some leftovers from past refactoring not using new methods
Change-Id: Idf1afcd6ce9210951d28655128a47150f6b7a2aa
Pointers can always be identified as the pointer for the "older" and
"newer" revisions. Class nameing was cleaned up and changed accordingly.
Change-Id: Id17878e780b5a405b196fdc5ec7429eeaef5bd4c
Pointers do not change roles anymore. Older and Newer pointer will
always stay the same. Removed and refactored some logic in that
regard.
Change-Id: I60cf58fb9d0728a9644ed29cac335ebbe7f3de11
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 improves screenreader support by applying some basic
rules and improving the OOjs UI usage. Things done here:
- make use of 'aria-label' attribute to label interactive buttons
- use connect method on help button to allow keyboard interaction
- give hint on help button that it opens a dialog
- communicate state of autoexpand button
- add attributes to make screenreaders understand the accordion
mechanism if the slider widget
See:
https://www.w3.org/TR/wai-aria-practices/#buttonhttps://www.w3.org/TR/wai-aria-practices/#accordion
Bug: T165489
Change-Id: I7a174e5971a751ec54d4d5115d5441f0a577c103
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
- works with the setting var to switch help text
- minified new SVGs with svgo
- adjusted new SVGs dimensions
- updated accompanying text
Bug: T162773
Change-Id: I3da66a006977fa6b1999686ba4f415e891f4ea02
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
The end border for the pointer lines can not be displayed because the
bars on the biggest revisions used all the height. This patch reduces
the max height of the bars slightly and refactores the calculating method.
Bug: T163436
Change-Id: Idfa6bdb9f85221063e13f3ec16b22fcfbe6cbd9c
The latest OOjs UI update seem to fix tooltip center positioning.
Margins added manually are removed now.
Change-Id: I883a5026002fae6fbda230b407303a4f2b82914d
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
This change fixes the broken hover on bars due to overlying pointer lines.
The lines are now drawn in the background again. To better visualize the
connection to the bars, the bars now get a coloured border set.
Bug: T162456
Change-Id: Ie84ce8d36d43e5d79248c49c6d2d3eae1a7f627c
Also removed the workaround of making the offset negative since utcOffset
now does this correctly. See http://momentjs.com/guides/#/warnings/zone/
Change-Id: I0cecd525ba131a1c32a9ea60f80d269060e022b0
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