Commit graph

1639 commits

Author SHA1 Message Date
thiemowmde c2e8f82319 Remove meaningless CSS, dead code since 2016
The border color was added 20016-08-12 via Id561485.
The border was removed 2016-09-15 via I1fdc0ec.
The color is meaningless since then.

Bug: T370572
Change-Id: Ic7a190bf3b56903f2afdd989eb1e78fa02ac01d9
2024-07-23 20:34:20 +00:00
WMDE-Fisch 37dc0b5adb [QUnit] Avoid manipulating the global history
Also introducing sinon to mock some parts.

Bug: T370573
Change-Id: I5a7573bcac9501a7b37a12b86bb0d4f46055f70e
2024-07-23 22:19:58 +02:00
Translation updater bot 5815371cf1
Localisation updates from https://translatewiki.net.
Change-Id: I2707094a84b1465dac3ea3bf79d44fd7c95c455f
2024-07-16 09:41:15 +02:00
Translation updater bot 337ef4430f
Localisation updates from https://translatewiki.net.
Change-Id: I723f7e055bee90a9e8a56b5cab418bccbdad530c
2024-07-08 09:33:52 +02:00
Translation updater bot 3882b297da
Localisation updates from https://translatewiki.net.
Change-Id: Ic0545d638a80bdeefda93896c8780b8239e5ec4e
2024-07-01 09:26:16 +02:00
Translation updater bot 50592ba9cc
Localisation updates from https://translatewiki.net.
Change-Id: I2b927d6e221d0860585bf4654d53b376eb4d459f
2024-06-28 09:42:31 +02:00
Translation updater bot fcf6e9687c
Localisation updates from https://translatewiki.net.
Change-Id: Ie8667e8710eb3546c016239ba2861caa817d546e
2024-06-26 09:22:09 +02:00
libraryupgrader 18c3b0a87a build: Updating npm dependencies
* eslint-config-wikimedia: 0.28.0 → 0.28.2
* grunt-stylelint: 0.20.0 → 0.20.1
* stylelint-config-wikimedia: 0.17.1 → 0.17.2

Change-Id: I798f739b5b2f12e5c6eedc88ecac557de28be129
2024-06-21 20:28:54 +00:00
Translation updater bot 56374a2ce5
Localisation updates from https://translatewiki.net.
Change-Id: I10cf2232e0485743827f02ca4091677139a45495
2024-06-17 09:32:39 +02:00
Translation updater bot f7e11cf77f
Localisation updates from https://translatewiki.net.
Change-Id: Ia2840afbace6b48f507524af43b6efbd13c622a4
2024-06-14 09:49:49 +02:00
jenkins-bot 4a9dd26aee Merge "build: Updating npm dependencies" 2024-06-13 12:07:55 +00:00
Umherirrender ef3f96742c Use namespaced Message class
Change-Id: Ib358324d32156dc219c40dd1286ab9a9d3c3d21d
2024-06-10 20:17:27 +02:00
libraryupgrader f5de8ee108 build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
  The following rules are failing and were disabled:
  * modules:
    * no-mixed-spaces-and-tabs
    * no-jquery/no-extend
    * implicit-arrow-linebreak
  * tests/qunit:
    * no-jquery/no-extend

* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: I3fd3c4a2cbb03d3aa4c8efb658e33d14d24cd518
2024-06-08 12:04:26 +00:00
Translation updater bot 6abac2d0c3 Localisation updates from https://translatewiki.net.
Change-Id: I81e6aef4ee8b50d0f3483aeb64b06f3bc8ced41b
2024-06-07 09:46:04 +02:00
jenkins-bot bc3d1b7868 Merge "Fire mw.hook 'wikipage.diff' like in core module 'mediawiki.page.ready'" 2024-05-28 14:46:34 +00:00
Translation updater bot a3f016b378 Localisation updates from https://translatewiki.net.
Change-Id: Ie5072003463f28fa656e05ee3ea1953df13a2b33
2024-05-28 09:31:13 +02:00
jenkins-bot fa8300af53 Merge "Streamline element replacement when updating the view" 2024-05-27 07:56:44 +00:00
WMDE-Fisch ff555fb62c Streamline element replacement when updating the view
I mostly refactored what's there. Instead of replacing parameters in specific links,
I'm going for the parent menues where these links live in and replace them completely.

Thereby I could also merge the edit and ve-edit selectors.

Also adding the footer that includes the link to the mobile view and seemed missing.

Bug: T211557
Change-Id: I263c82e80c675918683340d1bb01291213797f9f
2024-05-27 07:10:51 +00:00
Translation updater bot b7c6ed30e9 Localisation updates from https://translatewiki.net.
Change-Id: I5b15ab7e62e3b937503221d42c948135146a012d
2024-05-20 09:26:02 +02:00
libraryupgrader f11cfc95ff build: Updating grunt-banana-checker to 0.13.0
Change-Id: I1bd723ec50ae4a1e98b908f0972d52d59352d3c8
2024-05-19 00:31:07 +00:00
Translation updater bot e99585f3b1 Localisation updates from https://translatewiki.net.
Change-Id: I2cdfb1dbc45656dbd0454feda293946bafe0279f
2024-05-17 09:49:39 +02:00
Translation updater bot b4d4e74885 Localisation updates from https://translatewiki.net.
Change-Id: I7f800152d66299e04604f821c517cf39b58c95ba
2024-05-13 09:27:53 +02:00
libraryupgrader 663a20a03d build: Updating dependencies
composer:
* mediawiki/minus-x: 1.1.1 → 1.1.3

npm:
* grunt-banana-checker: 0.11.1 → 0.12.0

Change-Id: I78c57df954b4fbdde6559598d15f00af13e9681c
2024-05-10 22:05:50 +00:00
Fomafix dd4f849805 Fire hook 'wikipage.categories' before change of the catlinks DOM
Also use the selector
	'.catlinks[data-mw="interface"]'
instead of
	'#catlinks'
like in mediawiki.page.preview.js. This prevents selector injection by
the wiki content.

This change allows consuments of the hook 'wikipage.categories' to work
together with RevisionSlider.

Change-Id: I274e3d3b8ac94cc21c7b0878425c9a785a09b964
2024-05-05 08:13:37 +00:00
Fomafix a8d1a07c0c Use $( '#t-permalink' ).parent() instead of $( '#mw-panel' )
The selector '#mw-panel' from skin Vector and some other skins is not
stable to use and not available on other skins like Vector-2022.

The update of '#mw-panel' breaks CollapsibleVector: T211557.

Using $( '#t-permalink' ).parent() is also a dirty hack but it probably
works on all skins.

The .parent() also updates siblings like '#t-urlshortener' from
extension UrlShortener.

Also add $( '#ca-delete' ).parent() to update the other portlet links.

Bug: T211557
Change-Id: I084c93e8fe7c7663d9de8a39433a9e92a3827196
2024-05-04 09:45:53 +00:00
libraryupgrader af340e9ae9 build: Updating dependencies
composer:
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

npm:
* ejs: 3.1.8 → 3.1.10
  * https://github.com/advisories/GHSA-ghr5-ch3p-vcr6

Change-Id: I18926d22ec1ae7cf3df57e40f4ff950ca6e196f2
2024-05-02 13:54:56 +00:00
thiemowmde 363f24a409 Remove dead code from HelpDialog test
There are not even any <a> elements involved because the language is
set to qqx.

Change-Id: I64a6c414ccb327bc65a606ebd1579b579cd3215a
2024-04-29 11:59:14 +02:00
Fomafix c930a7a88e Use .parseDom() from mediawiki.jqueryMsg instead of .parse()
This generates the DOM elements directly instead of generating and
parsing HTML.

Also move the dependency on module 'mediawiki.jqueryMsg' from module
'ext.RevisionSlider.init' to module 'ext.RevisionSlider.Slider'.

Change-Id: I3a93b942e08ff7453e2b940c7f3e896f90679d0d
2024-04-26 14:14:01 +00:00
Fomafix 008cf562e4 Fire mw.hook 'wikipage.diff' like in core module 'mediawiki.page.ready'
The `[data-mw="interface"]` in the selector prevents selector injection
by the wiki content.

The `.length` prevents unneccessary calls with emtpy list.

Change-Id: I434371539355e305d9faf569371ab5a686b2caff
2024-04-26 09:00:02 +00:00
Fomafix a0d76d6f4a Move dependency on module 'mediawiki.util'
from module 'ext.RevisionSlider.init'
to module 'ext.RevisionSlider.Settings'
where mw.Api is used.

Change-Id: Idcc0e3e670fa3eddb0cd121b1de42aabca6bd6ae
2024-04-25 18:53:27 +00:00
Translation updater bot 1cdcc1ba92 Localisation updates from https://translatewiki.net.
Change-Id: I7650006281474967a66b13b1fd97566803729957
2024-04-22 09:29:33 +02:00
Jon Robson b1d8a16d2d Remove dead code
The MobileDiff page no longer exists, and was replaced with a redirect
that redirects to the desktop diff page, so this code can safely
be removed.

Bug: T360389
Change-Id: I8ebe2bc88a650caf29a5755013e980fe3b5aaeb0
2024-04-19 16:23:23 +00:00
thiemowmde e482005b2e Remove dead code for "colored diff column top borders"
This code was added in 2016 via Iadf7793. The two CSS classes
.mw-revslider-older-diff-column and .mw-revslider-newer-diff-column
became unused only one month later via I317a2fc. Since then all
this is apparently dead code. There are no "top borders" on these
columns any more. Lines still appear in the same position, but as
"border-bottom" on other elements.

It really looks like we just forgot to remove this.

Change-Id: I627628fa44da96ca1f1301d3a879919e4a021e5b
2024-04-18 12:04:10 +02:00
libraryupgrader b8f57c9d1d build: Updating eslint-config-wikimedia to 0.27.0
Change-Id: I96a066dc8a4253a6be6485281a86e9a664d73fe3
2024-04-18 03:47:12 +00:00
jenkins-bot 40bbb24d73 Merge "Drop RTL scroll type detection, obsolete since 2023" 2024-04-05 07:28:37 +00:00
Translation updater bot 4c40fffc39 Localisation updates from https://translatewiki.net.
Change-Id: I0c4d069c7a04e68919e7952a4bff4c66a7bf9427
2024-03-26 08:20:46 +01:00
libraryupgrader 43908d80c6 build: Updating mediawiki/mediawiki-codesniffer to 43.0.0
Change-Id: Iba959438c61bc43240aefe78cf6ac1d114f61d4c
2024-03-18 00:07:20 +00:00
thiemowmde c45b92209c Drop RTL scroll type detection, obsolete since 2023
According to https://www.mediawiki.org/wiki/Compatibility we can:
* Ignore Internet Explorer as well as "Edge legacy" (before it
  switched to Chromium) entirely.
* Ignore old Opera (Presto, before it switched to Chromium).
* Ignore Chrome and Chromium-based browsers that are more than
  3 years old.

According to https://github.com/othree/jquery.rtl-scroll-type
* Firefox and Safari always followed the web standard.
* The "reverse" type was only ever relevant in IE.
* The "default" type was only relevant in old Chrome and
  Chromium-based browsers, before the engine was changed to follow
  the web standard.

According to https://chromestatus.com/feature/5759578031521792 this
happened in version 85, June 2020.

The only edge-case I can think of is that we want to support some
niche browser that – for some reason – still uses Chromium 84 or
older. But according to https://www.mediawiki.org/wiki/Compatibility
we are at 88+ already, everywhere.

It appears like we can safely remove two types, which means only
the web standard behavior (a.k.a. "negative") is left.

No pressure merging this. This patch can as well sit here for
another year. ;-)

Bug: T352169
Change-Id: Ifdedfd6d16abc87576df9807a55cd1b8a7d185db
2024-03-12 18:41:54 +01:00
thiemowmde e8a327fd85 Remove unused dir property from RevisionListView
The property is unused since I883a502 from 2017.

Change-Id: Idb61db8615038f136982f74f67960a2f86e1b3ff
2024-03-12 17:38:57 +01:00
jenkins-bot c75ba6880b Merge "Work around rounding errors in RTL scroll type detection" 2024-02-29 08:03:24 +00:00
jenkins-bot 4cc578bf17 Merge "Fix flipped left/right cursor keys in RTL mode" 2024-02-29 08:03:22 +00:00
thiemowmde 346846f16c Work around rounding errors in RTL scroll type detection
This is closely related to Ied0b974 which fixed a similar, if not
the same rounding issue.

Note the following might be different depending on e.g. the
operating system. My Ubuntu+Chromium shows the following behavior:
* The RTL scroll type is correctly detected as "negative" with all
  zoom factors below and up to 100%.
* When the zoom factor is 110%, 125%, or 150% the scrollLeft value
  is not 0 but something like 0.909090876 or 0.200000002.
* It's 0 again at 175% and 200%.
* Bad at 250%. Good at 300%. Bad at 400%. And so on. No rhyme or
  reason.

The current Firefox version also ends in the "negative" branch, but
doesn't have the same rounding errors. It's always a perfect 0 in
Firefox.

This makes it look like a bug in Chrome's engine. We don't know how
old it is, but based on the information in T352169 it might be a
relatively new bug that didn't exist when this code was originally
written in 2016 (see I7c903c2).

For reference, this is what's supposed to happen here: Browsers with
the scroll type "negative" (which are apparently all current Chrome
and Firefox versions) won't allow scrollLeft to be a positive number
on an RTL page. When you scroll to the left in such browsers the
numbers get negative. The detection code tries to set the number to
+1 anyway. We expect the browser to ignore this invalid call and
still report the previous 0.

This mostly works in Chrome as well. For example, setting scrollLeft
to +100 wont set it to +100 but to … some random number between >=0
and <1, depending on the current zoom factor? o_O?

I suspect we can remove this detection code entirely, or at least
change the default to "negative". But this needs more testing with
more browsers. Let's start with this tiny fix.

Bug: T352169
Change-Id: I22cbb8881578e96165097d4fcc812baadc22d7fa
2024-02-28 14:03:32 +01:00
jenkins-bot 9bc2b41d50 Merge "Drop separate .render/.initialize logic from View classes" 2024-02-27 09:07:52 +00:00
jenkins-bot 59d3001331 Merge "Merge separate "noscript" CSS module" 2024-02-27 09:06:59 +00:00
thiemowmde 759c081add Drop separate .render/.initialize logic from View classes
Most callers use it as if it's a `getElement` call anyway.

There is one .initialize method left in the HelpDialog class. That's
part of the upstream OOUI Window interfaces.

Change-Id: I5727c59ad0ad05d712d51d255906ddc44e898668
2024-02-26 20:40:28 +00:00
thiemowmde 4d5b7be496 Remove confusing grab cursor when hovering ghosts
This line was added in 2017 via I9adbd47. I think this was a mistake.
What happens is that the grab cursor appears as part of the hover
effects (the yellow/blue "ghost" circles). But these can't be
dragged. Having the cursor there is confusing as it constantly
flickers between the click and drag cursors.

Am I missing something?

Change-Id: I611fee6f7199d68b61b103bcbb2011c88651883b
2024-02-26 19:07:45 +01:00
thiemowmde af86647d5c Merge separate "noscript" CSS module
It looks like there is nothing special about this module. It is
loaded the same time as the other "lazy" module, under the same
conditions.

Change-Id: Iae3e425297ef5ed3f35cb8c8d66b390875158905
2024-02-26 17:54:53 +01:00
thiemowmde f8ad641612 Fix flipped left/right cursor keys in RTL mode
In RTL mode the slider is flipped and goes from right to left. The
revisions increase from right to left. The left cursor key needs to
be the one that increases the position.

Note there are three different "RTL scroll types" called "default",
"negative", and "reverse". This is only about CSS positions and
doesn't affect the cursor keys.

Change-Id: Ie747aa2572f2542b6c2c2176f817dd9a42b29f78
2024-02-22 16:34:26 +01:00
jenkins-bot f7b6d277ee Merge "Pass through pointer events from pointer-containers" 2024-02-22 15:33:38 +00:00
WMDE-Fisch f42385eafa Pass through pointer events from pointer-containers
Hover and click events to highlight or change revisions need to
know the intended revision target. This did not work for the area
where the pointer containers overlap the underlying revisions.

For that reasons we implemented a calculation to get the revision
using the mouse positions. That implemetation seems to be faulty
at some points.

pointer-events: none allows us to pass though the mouse events so
that we're able to always rely on the revision containers as target.

On the pointers we still want to catch events to allow dragging.

Bug: T352169
Change-Id: Ie53a6ec3b7c458dc2f72e494829dfab80952b86f
2024-02-22 16:17:01 +01:00