Commit graph

1615 commits

Author SHA1 Message Date
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
Translation updater bot 39deb3e9dd Localisation updates from https://translatewiki.net.
Change-Id: I312a483e54342862492f708e9b0354a114423b7d
2023-07-24 09:39:33 +02:00
Translation updater bot 6f67c70bdb Localisation updates from https://translatewiki.net.
Change-Id: I6d17bff0ab1bb94d2a02d905e4472a6ffd4480c3
2023-07-13 10:50:07 +02:00
Translation updater bot a8432061b0 Localisation updates from https://translatewiki.net.
Change-Id: I2a2ad7f64a1ec106711de20a017eb0f4a09ff8a1
2023-07-10 09:38:55 +02:00
WMDE-Fisch b1225f400a Remove aria-hidden on RevisionSlider
I removed this aria-hidden, because the RevisionSlider as a whole
can be accessed with the focusable button that expands the UI.

Elements that are focusable should not be aria-hidden.
screenreaders in general will allow interaction with these or even
might show unpredictable behavior.

Screenreader and keyboard support for the feature is not good but
this aria-hidden is useless and wrong at the moment.

Bug: T339254
Change-Id: I8b8e3938cba701c821d4fd2ee3c2f90bf7610623
2023-07-10 08:42:01 +02:00
WMDE-Fisch d4693da19f selenium: run tests concurrently
Bug: T337862
Change-Id: Iff2b05070772955f048010010b1bac38881c54ec
2023-06-23 15:01:41 +02:00
Adam Wight b900446572 Migrate JS to ES6
Reintroduces IIFE closures in test files because variables were
declared in the global namespace, and "const" now causes hard errors.

Bug: T339323
Change-Id: I69e9d7a29591137f185f3e5ab02dea590ec4dff6
2023-06-23 08:01:31 +02:00
jenkins-bot 9219f80a65 Merge "Dramatically simplify a forEach loop" 2023-06-15 15:57:47 +00:00
thiemowmde fdc1b1212a Dramatically simplify a forEach loop
I'm not sure why it was done like this. It looks like we can skip
both the extra conditional as well as the extra function scope.

Change-Id: I9aebd17bece0b9a573fc1f9697e79b759741751e
2023-06-15 12:16:59 +02:00
thiemowmde 3ca3013522 Add overflow-x: clip to minimize impact of resize issues
This is certainly not an actual fix for anything. But it makes any
resize issue look much less broken and much more bearable. I think it
is helpful to have this extra safety in place even after we properly
fixed the issue.

Bug: T336729
Change-Id: I724ede9cda120f18c4b7ee3ebf7bb41c0541819e
2023-06-15 12:15:56 +02:00
Volker E 7f6f5d7824 build: Update SVGO to v3.0.2
svgo         2.8.0  →   3.0.2

Amending to new `cleanupIds` plugin name.

Bug: T339162
Change-Id: I1eedb094b0afce2167c1de7296c81c30813838e0
2023-06-14 12:38:31 -07:00
Translation updater bot c53e613656 Localisation updates from https://translatewiki.net.
Change-Id: I25a30b7cc9ba8b0125c17531de9a066c6add61ef
2023-06-14 13:07:52 +02:00
thiemowmde bbf3b67bad Use "0" instead of "false" for default user options
This is best-practice, as far as I can see. It doesn't make a
difference in terms of what is stored in the database. false,
the number 0 and the string "0" will all be stored as "0" in the
database. More precisely: These values will not be stored because
they are all considered equal to the default value by
UserOptionsManager::isValueEqual().

It makes a difference in terms of what is send to the browser. The
keyword "false" is 5 bytes while "0" is only one.

Bug: T300371
Change-Id: Ia9eb03ebdc2155df1785fa5d40bceaab56268bf9
2023-06-12 10:01:46 +02:00
Translation updater bot 2d4dde3e67 Localisation updates from https://translatewiki.net.
Change-Id: Ibbcc7cd4e075cea3e2faab734059e3c3beb7c91d
2023-06-09 09:14:45 +02:00
jenkins-bot 7f430a4d1f Merge "Don't set preferences for temporary accounts" 2023-06-05 06:21:59 +00:00
libraryupgrader aacd7dba34 build: Updating npm dependencies
* grunt-banana-checker: 0.10.0 → 0.11.0
* stylelint-config-wikimedia: 0.14.0 → 0.15.0

Change-Id: I4ddab3580ba726a373f36cc96cd2ced448e96f39
2023-06-02 01:47:11 +00:00
thiemowmde 4e5faf6e95 Don't set preferences for temporary accounts
Not extensively tested. Just fixing the most obvious places.

Bug: T335971
Change-Id: I31c4c2be6ae6b8122b446ee3b49411108f3e39d3
2023-06-01 15:44:38 +00:00
WMDE-Fisch 7b385ee3ef Skip user setting for unnamed users
Bug: T326908
Change-Id: I6421ad020db98d258c45d1f50d211d38b5c6f3a9
2023-05-24 06:13:56 +00:00
WMDE-Fisch 8fe657e90e Fix test for scrolling over revisions
Due to some change in the test setup, possibly related to the new
Vector skin, the slider now has more space and the need to scroll
triggers at a later point.

Change-Id: I5411d5a31714761434135e65d916f57f1e437003
2023-05-22 13:13:06 +03:00
Translation updater bot dc132af392 Localisation updates from https://translatewiki.net.
Change-Id: I5f337bc9c432e0303771e61c23d2081b438eb606
2023-05-22 08:46:34 +02:00
libraryupgrader 50fe9c445b build: Updating eslint-config-wikimedia to 0.25.0
Change-Id: Ib27405f6bab96e7edefae53e8e48dc6bd470443d
2023-05-05 10:49:05 +00:00
libraryupgrader 9dd40a599c build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.12.0 → 0.12.1

npm:
* grunt-eslint: 24.0.0 → 24.0.1

Change-Id: Ib973eda921fe671098e9ed4e98094d8b5da7091b
2023-04-29 09:51:30 +00:00
Raimond Spekking 319804d979 Merge "Localisation updates from https://translatewiki.net." 2023-04-24 07:47:28 +00:00
Translation updater bot c326fa9abd Localisation updates from https://translatewiki.net.
Change-Id: Ib26271a4faaad849f91d1709ef77e9f63f67af6c
2023-04-24 09:17:09 +02:00
Fomafix 6c0d10ddbe Use .empty().append( $jQueryObject ) instead of .html( $jQueryObject )
According to https://api.jquery.com/html/ a jQuery object is not
supported in .html() although is works.

The .empty() is needed to avoid multiple sliders on resize.

Change-Id: I0ce4748e95529dbe27f82d6fd0aa2433bfda4375
2023-04-22 19:16:31 +00:00
jenkins-bot 2781a23fe6 Merge "Make use of named MainConfigNames::… constants" 2023-04-21 15:40:49 +00:00
thiemowmde 59af8caa8f Make use of named MainConfigNames::… constants
Change-Id: Idbed910d3ab8e06bf0b0a0b4aea9a8954102f02c
2023-04-21 10:01:41 +00:00
Fomafix 65d1dfefbf Use document.body instead of 'body' as jQuery selector
Change-Id: I2e74d31b61f5f46d1bbb1a0283a7468af9c4e856
2023-04-21 08:52:25 +00:00