Commit graph

1592 commits

Author SHA1 Message Date
jenkins-bot 23b2f811a2 Merge "Don't trigger hover or tooltips from a tooltip" 2023-09-04 09:35:43 +00:00
jenkins-bot 77792dfc12 Merge "Close popup when clicking enter" 2023-08-31 13:56:34 +00:00
jenkins-bot 122964ed7d Merge "Close tooltip when the focus moves away" 2023-08-31 08:56:18 +00:00
jenkins-bot 7a64be70c3 Merge "build: Update MediaWiki requirement to 1.41" 2023-08-31 05:24:20 +00:00
jenkins-bot e66f2f370b Merge "Remove grab cursor workarounds for older browsers" 2023-08-30 18:11:13 +00:00
WMDE-Fisch 41cb479b45 Remove grab cursor workarounds for older browsers
According to the compatiblity standards to give Grade A support
for modern browser versions not older than 3 years, we do not need
these workarounds anymore.

Change-Id: Ib1c42594b2c4077cabb010b8830a04ab10938a17
2023-08-30 18:05:10 +02:00
thiemowmde e65e19aa56 Make use of Codex LESS tokens where possible
Mostly motivated by the confusing border-radius.

Change-Id: I87c0fd6fbe86df765a41047a04a8d2a3c6516403
2023-08-30 17:54:59 +02:00
WMDE-Fisch 45b68b2942 Don't trigger hover or tooltips from a tooltip
Mousemove events seem to bubble up and can trigger unwanted hover
effects when the tooltip is appended to the pointer container.

This regression was introduced in the patch that supports tabbing
into the tooltips in I75ef7c32fb105526552eac387ff5a5bda8eefe1b

Bug: T341872
Change-Id: I975cc054a760f2da1d8ea37d10d9a5bf00bf3ae2
2023-08-30 14:40:13 +02:00
WMDE-Fisch e2bb3741e6 Close tooltip when the focus moves away
Adds two handlers to make sure the popup is closed when the focus
moves away from either the pointers or contents of the a popup.

Bug: T341874
Change-Id: Ia68fc5ffbb63b4a534c84987879499e06cd60238
2023-08-30 08:56:06 +02:00
jenkins-bot 3dcd9c3756 Merge "Remove obsolete per-skin CSS" 2023-08-29 15:47:18 +00:00
jenkins-bot 3b6eeb0be8 Merge "Restore highlightable-row CSS we accidentally removed" 2023-08-29 15:46:40 +00:00
thiemowmde 10931b6210 Remove obsolete per-skin CSS
This is obsolete since I75ef7c3 where we had to replace the
`font-size: 0.8em` with a fixed 13px.

Bug: T341872
Change-Id: I81603536dd930c6faee38c63aabe848203c42715
2023-08-29 17:29:20 +02:00
thiemowmde 6455955ea1 Restore highlightable-row CSS we accidentally removed
This was removed in I75ef7c3. Turns out it's needed for the
highlightable elements in the popups (e.g. when highlighting all
edits made by the same user). The text row in the popup gets a thin
gray border. This border needs some padding on the left.

The solution is to make the CSS selector more specific so it can
win over the problematic selector in Vector.

Bug: T341872
Change-Id: Ia029b92b5e049c60279b55177a62e03919dc55d8
2023-08-29 17:23:31 +02:00
thiemowmde 98e5730835 Remove more duplicate code in SliderView class
Change-Id: I4580047617cfadba04339c1f58d896507927ee73
2023-08-29 17:07:47 +02:00
Svantje Lilienthal 143dee9a1d Close popup when clicking enter
Bug: T341874
Change-Id: I8cafbc93a87d168a428b2e9e46a60ea812ae584c
2023-08-29 16:13:33 +02:00
jenkins-bot 24ca67ff10 Merge "Trigger popup creation on pointer focus" 2023-08-28 12:58:07 +00:00
jenkins-bot 89b7d1fcc2 Merge "Append tooltip to focused pointer to allow tabbing into it" 2023-08-28 12:50:16 +00:00
jenkins-bot b0efa18399 Merge "Generalize revision click handlers" 2023-08-28 12:50:14 +00:00
WMDE-Fisch cc37621ab9 Generalize revision click handlers
The pointer click and revision click handlers did almost the same
and the former was able to handle events from the latter. I merged
them and could then shortcut some code.

Change-Id: Id224b8d8da653110134cce0385da3a18cd073ecf
2023-08-28 11:47:21 +02:00
Translation updater bot bb2576d500 Localisation updates from https://translatewiki.net.
Change-Id: Ib87e08175573ec27a6210a4645617f073c7a8580
2023-08-28 09:30:54 +02:00
jenkins-bot b77b5dcbf8 Merge "Dramatically simplify duplicate code in the PointerLine class" 2023-08-28 06:45:23 +00:00
jenkins-bot 2e173563f8 Merge "Don't add keypress handler when not needed" 2023-08-28 06:21:01 +00:00
jenkins-bot 7857eb993d Merge "Reduce code duplication in RevisionList class" 2023-08-28 06:11:22 +00:00
thiemowmde fe8f8fa05d Don't add keypress handler when not needed
I'm not sure why it was done this way. Probably because it doesn't
make an actual difference from the user's perspective. My motivation
is: When we already called the code that auto-expands the
RevisionSlider UI then it doesn't make much sense to give the user
a keyypress handler that does the same a second time.

Possibly even related to T342556?

This patch also contains a few small, unrelated code cleanups.

Change-Id: I123e89d9d7dc3b1e33cf43831c679330d9dd1cdd
2023-08-28 06:10:06 +00:00
jenkins-bot a998e73f25 Merge "Remove unused jQuery.fadeTo() calls" 2023-08-28 05:58:48 +00:00
thiemowmde 2e8cfcba05 Dramatically simplify duplicate code in the PointerLine class
Turns out this code can only ever access a single underline: The one
it owns and can access via it's own this.$html property. One of the
two jQuery selectors always turned out empty, and calling .css() or
anything else on an empty jQuery collection just doesn't do anything.

This patch also contains a similar, but technically unrelated
cleanup in the init code.

Change-Id: Ic89b11971f51f5dcca67dcbd308f65310f48f0ec
2023-08-25 17:49:59 +02:00
thiemowmde e4c55ae5de Reduce code duplication in RevisionList class
Two almost identical pieces of code, both adding revisions to the
list.

There is a 3rd one that prepends revisions. I leave this untouched
for now.

Change-Id: I4798c8c2d6e0f9b70f7ea0dc20bb271514c03350
2023-08-25 17:48:51 +02:00
jenkins-bot a925f7957f Merge "Remove obsolete IE9 safe guard" 2023-08-25 14:52:25 +00:00
WMDE-Fisch cd90d01977 Append tooltip to focused pointer to allow tabbing into it
When the user uses the keyboard to interact with the slider, the
revisions can changed by moving the pointers with the arrorw keys.

In that case the pointers have keyboard focus. To allow tabbing
into the popup from that position, the tooltip needs to follow the
pointer in the DOM. That's what's done in this patch.

Bug: T341872
Change-Id: I75ef7c32fb105526552eac387ff5a5bda8eefe1b
2023-08-25 14:45:24 +00:00
WMDE-Fisch 690156b47c Trigger popup creation on pointer focus
Bug: T341872
Bug: T341874
Change-Id: Ia881bcccfe879f48275e896a186b257d270d88b0
2023-08-25 16:43:22 +02:00
thiemowmde 53281f2b7e Remove unused jQuery.fadeTo() calls
This is a little weird. It looks like this was never actually
animated. The time was always 0.

Change-Id: Ibd476bc3bfb05840959db9e51c411d3b12cebd90
2023-08-25 16:20:55 +02:00
thiemowmde 9f2f774cc4 Remove obsolete IE9 safe guard
Change-Id: I350cc395cb0ab673699cda03f6da19c9470ee7bb
2023-08-25 16:19:14 +02:00
jenkins-bot 72ef3975c7 Merge "Drop wikitext comment in favor of parsedcomment" 2023-08-25 13:54:56 +00:00
jenkins-bot 8ce1f474eb Merge "Don't re-create tooltip when it's already there" 2023-08-25 13:53:50 +00:00
WMDE-Fisch 8c4b9b963a Don't re-create tooltip when it's already there
It took me a while to come up with a solution for this, but there
are several things that seem to trigger the showTooltip method a
bit to often.

Tooltips can be triggered either by the handlers that deal with
mouseenter and mouseleave events that also trigger revision high-
lighling. But tooltips can also be triggered when you use the
keyboard or the mouse while dragging sliders.

The mechanics on what's highlighted and what's triggering a popup
are a bit weiridly setup and there could probably be a major re-
factoring done to make things clear ( for example the show popup
method also highlights the revision but the highlight revision
mehtod does not ). I had a quick approach to fix that, but it's
not too easy.

Another issue is, that some events fire off a delayed popup close
mechanism. So the solution here reads like:

If you are triggered to show a popup, and that popup exists
already, stop the delayed popup close mechanism and bail out.

Bug: T341872
Change-Id: I2646a69cccd549af902d57fdf4ff6fb0e94cbe64
2023-08-25 15:35:06 +02:00
thiemowmde 3d93003dcc Drop wikitext comment in favor of parsedcomment
The plain wikitext comment is apparently not used for anything,
anywhere. It was for some reason used for an "is empty" check. But
we can do the same with the `parsedcomment`. I checked and an empty
comment doesn't result in something non-empty like `<div></div>`, but
stays as an empty string.

Change-Id: Iedc5898b7b0f82231328ab3e0e46b1461ca845b1
2023-08-25 14:42:32 +02:00
thiemowmde 5863e5e73b Make use of jQuery.append() accepting multiple arguments
Change-Id: Ibfd285aeef411f16ba6486fa60114439227b7e6e
2023-08-25 14:39:39 +02:00
thiemowmde 040f6c28ae Fix left/right cursor key handler also acting on all other keys
This code was designed for the left/right cursor keys. But it
currently triggers on all keys. This causes confusing behavior when
tabbing through the UI. This code also triggers on tab/shift+tab,
which can be visibly seen when the wrong popup opens. It also
triggers on enter, which feels like it's intentional, but is nore a
happy accident.

Especially note how the buildTabbingRulesOnKeyUp handler directly
below does the exact same: It only acts on left/right, but no other
key.

We intentionally keep the existing (even if bogus) behavior for the
enter key. To be replaced with something better in a later patch.

Bug: T341874
Change-Id: I75aac4ea3a66a69a44756159c8a98acdc6e74b01
2023-08-25 11:36:22 +02:00
thiemowmde 6b4894c4fb Replace numeric key codes with OO.ui.Keys constants
Bug: T341874
Change-Id: I5393ecfea28938b6d9f79efd80e00ee7d76dfbf0
2023-08-25 10:41:44 +02:00
jenkins-bot f204bfe708 Merge "Replace switch with a map in util class" 2023-08-25 07:20:46 +00:00
jenkins-bot 03235ac917 Merge "Remove unused hasNoTags helper method" 2023-08-25 07:20:45 +00:00
thiemowmde dd9e9e25b4 Remove some self = this indirections that are not needed
Change-Id: I2c267e036a1b8ad395019b1aa3dcb29c21b9b251
2023-08-24 11:36:15 +00:00
thiemowmde a045c78b3d Remove unused hasNoTags helper method
Change-Id: I31b08328d8582bd75c6e972cfbfac7b555455015
2023-08-24 11:29:18 +02:00
thiemowmde 8eff7a7455 Replace switch with a map in util class
Change-Id: If569e34f032ecda261f7970d5ef1e59efc55d56c
2023-08-24 10:59:26 +02:00
James D. Forrester 0c23f638c8 build: Update MediaWiki requirement to 1.41
All extensions in Wikimedia production are expected to track MediaWiki's release directly.

Change-Id: I9396997261ad6ec407f87321b4cff774b9798f45
2023-08-19 14:04:20 +08:00
Translation updater bot 3631ad18d1 Localisation updates from https://translatewiki.net.
Change-Id: Iaed84e4a96a0bd71f1beed4df63843bab136dc3b
2023-08-17 12:10:42 +02:00
Translation updater bot 1959b2820f Localisation updates from https://translatewiki.net.
Change-Id: I6b50c1251147ca8fccdca6129f56631e9bbe6145
2023-08-09 09:15:43 +02:00
Translation updater bot a00542fb9c Localisation updates from https://translatewiki.net.
Change-Id: Ie7d660a222ccb660046ffe353fe23a06c89f360b
2023-08-07 08:39:33 +02:00
Translation updater bot 71569fa96a Localisation updates from https://translatewiki.net.
Change-Id: I9e64ed7f2294da24e87254236a0bd49d7f58be39
2023-07-31 09:00:44 +02:00
Translation updater bot 883797bc1b Localisation updates from https://translatewiki.net.
Change-Id: I05d285a07b30624d518fe0faed34a96353a8441d
2023-07-28 09:20:59 +02:00