Commit graph

398 commits

Author SHA1 Message Date
WMDE-Fisch a96b079e8f Unify highlighting CSS classes
Change-Id: Iceb094075d1fb1bd4aca53c120dbc3c6ccd39eb6
2019-03-25 17:30:47 +01:00
WMDE-Fisch 55c558169b Retrieve revision list in highlighting method
This moves the retrieval of the revisions into the method setting the
highlighting. The check for undefined did not to much since the rev
var would still remain undefined.

Change-Id: I1acf540f135af4c16fb80d633b3690473ada7833
2019-03-25 17:21:03 +01:00
srish 6ee7f910b7 Add filters for tags
* Uses the existing implementation of highlighting revisions from the same user
* Shows bubble next to tags in Tooltip
* When you hover on a bubble, tag row is circled, and revisions with a specific tag gets highlighted. When hovering ends, highlighting ends. But, if there is an active filter available, all previous states are restored accordingly.
* When you click on a bubble, in addition to highlighting revisions and tag row, any previous tag or user filter is removed.

Bug: T203581
Change-Id: I824a027a7f542eb7227545870553e58ec23542bb
2019-03-25 16:57:57 +01:00
Ed Sanders 57f9876e27 build: Update eslint-config-wikimedia to 0.10.1
Change-Id: I8aeddc384d25318e8618bb617884205f1c0c1f00
2019-02-10 16:54:28 +00:00
gopavasanth cbf6d4b76c Quick CSS fix
Changed RevSlider tooltip user-row bubble height and width

Bug: T213643
Change-Id: I31278bf00730ba5993a881b695ebff2df2da7f6a
2019-01-16 17:54:33 +01:00
Thiemo Kreuz 2a2d01ffc9 Remove redundant checks for .length on jQuery objects
jQuery objects behave fine when they don't contain anything. No need
to check the .length before. This is one of the essential feature of
jQuery.

I'm also simplifying some setTimeout the same way. clearTimeout will
never fail. It will ignore numbers that never represented a timeout,
or have been cleared before. Note how the property was never set back
to -1. So this code was kind of incomplete anyway. I suggest to fix it
this way around, instead of trying to set -1.

Change-Id: Ic15812ead9d93f8eb07831aeb75577df2abdff07
2019-01-14 09:40:55 +01:00
srish ee10c6e665 Change the DOM order of pointers and rebuild styling
Initial patch for introducing keyboard shortcuts reversed the blue and yellow lines. To fix that issue, the DOM order for pointer lines were put back to the original state in https://gerrit.wikimedia.org/r/#/c/473217/. Now, this patch tries to put the tabbing order in place reversing the changes made for the fix as per discussion in https://phabricator.wikimedia.org/T162119#4753481 and style changes.

Bug: T162119
Change-Id: Ic84503de0a877095c118abddb8066aeb667bc03c
2018-12-07 13:02:39 +00:00
jenkins-bot 401c775ced Merge "Fixed Pointers and Pointer lines alignment" 2018-12-07 11:49:18 +00:00
Ed Sanders 6ea28c8cdc build: Update devDependencies
Change-Id: Ic278699f631ddc08243ceb68678c0715a19c4304
2018-12-04 18:05:18 -05:00
gopavasanth ae42b85975 Fixed Pointers and Pointer lines alignment
Bug: T210232
Change-Id: Iddb574442db4d0ea525b0806596663de79d3ec2e
2018-11-24 22:15:43 +05:30
jenkins-bot bebfbd788b Merge "Highlight revisions from the same user" 2018-11-22 14:37:31 +00:00
gopavasanth 9a7db48893 Highlight revisions from the same user
*Fixed Border Overlapping.
*Incresed 10% Darkness to the Highlited Revisions.

Bug: T136105
Change-Id: Ie7ba7631f9fe254391ad28be373de7bff4fd2ed1
2018-11-22 00:26:41 +05:30
Ed Sanders e62f46dd80 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Icf10ea6bbc09542e69c0cd583a4ee4f2f76a3f43
2018-11-16 16:33:52 +00:00
Thiemo Kreuz (WMDE) e227de5a48 Fix (accidentally?) reversed blue and yellow lines
This reverts parts of the patch I4d8db23 (T162119) that have
accidentally been done, as far as I can tell.

Note the revert in this patch here is untested and might partly break
the keyboard navigation feature introduced via T162119. However, I
strongly suggest to fix the bug T208238 first, and look back at
T162119 later, possibly via a newly created ticket.

Bug: T162119
Bug: T208238
Change-Id: I0c03e472b72ddd1414d3ca61970dba15158a8486
2018-11-13 14:43:23 +00:00
Volker E f1cea8c889 Fix icon position of arrow buttons
Also
- fix arrow width to one size of `20px` and
- make use of `.box-sizing` mixin in one occurrence.

Bug: T207905
Depends-on: I09aea78f8ebde37cf4f7de9bf0e14894c76ee722
Change-Id: Ibf4a6c8b77877a34668e91b0f5cf6c11a23e9f88
2018-10-25 09:47:20 -07:00
Volker E 618850af6e Replace 'help' by 'helpNotice' icon
A free-standing, frameless button like this is better off with an
icon like 'helpNotice', part of OOUI since v0.28.2. It is a step
back to the original help icon appearance, the new one is still
available for example to use on toolbars.

Bug: T206753
Change-Id: I3d4102de2209e94fa732c1d1962c757fb7bca331
2018-10-11 10:50:56 +00:00
jenkins-bot 7b1688a2af Merge "Highlight revisions from the same user" 2018-10-10 09:27:21 +00:00
jenkins-bot ed42723579 Merge "Add keyboard shortcuts to move between revisions" 2018-10-10 09:26:05 +00:00
srish 1675096c7b Add keyboard shortcuts to move between revisions
* Added `tabindex` on yellow and blue knobs to enable tabbing
* Used some of the logic of draggable functionality to support moving between revisions with keyboard shortcuts
* Also changed the source order of old and new pointer. Old pointer comes first in the DOM

Bug: T162119
Change-Id: I4d8db2352915c44aa11617edea5bcb0ac92ddc93
2018-10-05 17:38:40 -07:00
gopavasanth 154180ba52 Highlight revisions from the same user
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
2018-10-05 19:12:44 +05:30
Ed Sanders 351bdcfae7 build: Update linters
Change-Id: If21c9dbeba945d54c6bcf9b6e4edd586c5b411ca
2018-09-13 21:58:39 +01:00
jenkins-bot fdcf11a787 Merge "Rework and cleanup ext.RevisionSlider.DiffPage code" 2018-09-11 02:24:07 +00:00
jenkins-bot 4a50097767 Merge "Show tags data on the tooltip in Revision Slider" 2018-09-04 14:39:36 +00:00
jenkins-bot cef99ee67e Merge "Run hook with actual (non-detached) content node" 2018-09-04 09:11:17 +00:00
Thiemo Kreuz 48396b78c7 Rework and cleanup ext.RevisionSlider.DiffPage code
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
2018-09-04 10:52:16 +02:00
Bartek Łukawski a7b966162e Run hook with actual (non-detached) content node
`$.fn.replaceWith` removes content from the DOM. Therefore, the
new content object was not being passed on by the hook.

Change-Id: I885f8e789b806a9ae09de1ed31a19a3f9db8144f
2018-08-30 15:08:51 +00:00
gopavasanth e4c31f762b Replace custom 'pin' by 'pushPin' icon
Modified CSS of the pushPin

Bug: T194613
Change-Id: Ifdaa2567c67a45fd44bea7cc4718f29c4e1a58fd
2018-08-30 20:31:04 +05:30
gopavasanth 548019e16d Added keypress() to mw-revslider-toggle-button
On tapping Enter or Space the Rev-Slider Opens

Bug: T199212
Change-Id: I08ab018c3e89d25ab8d4e72963e9cbd4971f7068
2018-08-29 16:07:18 +00:00
srish 6934b90d87 Show tags data on the tooltip in Revision Slider
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
2018-08-28 23:22:12 -07:00
srish dd4310aece Replace loading bar of revision slider with three moving bubbles
Using rawElement function to generate a new html element for loading spinner.
This replaces the progress bar widget.

Bug: T161640
Change-Id: I949bce945def25de561c0ae0df971c3f609586ce
2018-08-14 09:31:16 +00:00
Thiemo Kreuz 2d5b40c40b Make use of JavaScript "in" feature instead of "undefined"
Change-Id: I914f7281101bc4873eff3574c884253775e9b4bb
2018-08-02 09:35:37 +02:00
gopavasanth c1fada0773 RevisionSlider: Fix missing pin icon
Added show() and hide() for mw-revslider-auto-expand-button in collapse and expand function.

Bug: T200263
Change-Id: Ic24a175dfe8d19853e32669f12b9f17e26730d6b
2018-07-24 18:46:22 +05:30
jenkins-bot 4a6175b641 Merge "Limit fetchUserGenderData to maximum 50 users" 2018-07-04 11:54:33 +00:00
Thiemo Kreuz 3520a606c9 Limit fetchUserGenderData to maximum 50 users
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
2018-07-04 10:44:27 +00:00
Anmol Wassan 4ab8460fde Indicator flip issue on expand/collapse
The arrow in Revision Slider flips on expand and collapse which is not according to the standard of OOUI.

Bug: T198626
Change-Id: I4205a2260e8507a09f2950566e5033bd58a74345
2018-07-04 10:41:35 +00:00
WMDE-Fisch 20edda4b82 Minor fixes around log animation time
Addressing comments in Ic9fe89c7e3f984d3390260805e2480a0f8ffd0c9

Change-Id: I9a989946f50788d8b47f40a0aa00408b7aa86cb8
2018-05-28 17:12:16 +02:00
Peter Grassberger 16163b4964 Adjust sliding animation time of pointers on short distances
animation duration now has a factor that is dependent on
the square root of the animation distance.

Bug: T161883
Change-Id: Ic9fe89c7e3f984d3390260805e2480a0f8ffd0c9
2018-05-24 18:33:11 +02:00
Ed Sanders 20b098f211 Tweaks OOUI overrides
Change-Id: I089191499b91763c4b36473726cc2701887934fc
2018-03-23 00:55:03 +00:00
Volker E 1986749ff8 Hygiene: Use “OOUI” as unified name in code comments
Bug: T182360
Change-Id: I3085c97db5b9e49ff06a9626dce74f3dc93f7cc3
2018-01-31 22:23:47 -08:00
Volker E e868a33116 Refactor RevisionSlider toggle button CSS
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
2017-11-17 12:06:06 +00:00
jenkins-bot 4c5e32e925 Merge "Replace border-color with WikimediaUI palette one" 2017-11-01 12:07:40 +00:00
jenkins-bot 54ac49ea1e Merge "Remove obsolete CSS .mw-revslider-button-active rule" 2017-11-01 10:49:47 +00:00
jenkins-bot df84c7b8a5 Merge "Use LESS nesting features" 2017-11-01 09:31:10 +00:00
Volker E d6bf659239 Replace border-color with WikimediaUI palette one
Replacing `#ccc` with WikimediaUI color palette's `#c8ccd1`.

Change-Id: Idb7f7b67c2df7a2dac61d09de46bf527713ab465
2017-10-31 20:06:41 -07:00
Volker E 4df0a58755 Remove obsolete CSS .mw-revslider-button-active rule
Removing unused CSS rule for `.mw-revslider-button-active`, which
is not in use anywhere.

Change-Id: Id1c7e8e17b03b54105266bca0418b285840de4f7
2017-10-31 18:55:21 -07:00
Ed Sanders b9f0e2adfe Use LESS nesting features
Change-Id: I6d14b0533510840fb96a56ec3bc38e0bca7a70d0
2017-10-30 21:24:22 +00:00
jenkins-bot 7ff4712b4f Merge "Use LESS color calculation for blue/yellow slider styling" 2017-10-30 12:36:57 +00:00
Ed Sanders 684c6c4b0c Use LESS color calculation for blue/yellow slider styling
Change-Id: I7220acf4b5c4a70f56cde67269c09cd3bf757f19
2017-10-27 19:54:43 +01:00
Ed Sanders bc17a6e9ab Fix collpase button margin/padding
Change-Id: Ia5f2aec089b27085f1dcc4f3e3d49b0a09e4dc26
2017-10-27 12:04:11 +01:00
Ed Sanders 28b436eb16 Cast strings to numbers
Change-Id: Iafbb0ed5197cc7e92ebfc2fb9365c1903ce9ffef
2017-10-27 10:49:01 +01:00