Commit graph

1647 commits

Author SHA1 Message Date
Translation updater bot 168803f272
Localisation updates from https://translatewiki.net.
Change-Id: I3f3f9ebed0c614f0e0a13a416d1b98f15d32f447
2024-07-29 09:28:19 +02:00
Translation updater bot 58e58ff318
Localisation updates from https://translatewiki.net.
Change-Id: Id3da114b60191b016cfe83e90d0dd9654c980716
2024-07-26 09:46:34 +02:00
WMDE-Fisch b6f82d5fa8 Fix broken JSDoc
Sneaked in while introducing the the history injection.

Change-Id: Icb5206751a55582acfb108230cd2d57d22d5a6f0
2024-07-25 11:01:35 +02:00
Antoine Musso 85d5d2f4db Remove Sinon.JS from package.json
The library was introduced in 37dc0b5ad to mock the History API. However
the extension package.json is solely used for linters such as eslint.
The JavaScript dependencies should be provided by a Resource Loader
module and mediawiki/core already provides Sinon.JS for the QUnit tests
(see tests/qunit/QUnitTestResources.php).

Remove sinon from this extension package.json and thus partially revert
37dc0b5ad. The sinon variable is still defined to please eslint.

Bug: T370573
Change-Id: I03d7fef161730d9f36b1367d931641430df4bfed
2024-07-24 19:19:08 +02:00
jenkins-bot 5a7e33d9f9 Merge "Replace some more colors with LESS design tokens" 2024-07-24 11:05:33 +00:00
jenkins-bot 208b59ed01 Merge "Remove meaningless CSS, dead code since 2016" 2024-07-24 11:05:31 +00:00
Taavi Väänänen 7fd058e8e7 Fix borders on dark mode
Updates the borders for the RevisionSlider box to use Codex design
tokens with dark mode support instead of hard-coded colors. The slider
itself still doesn't look ideal on dark mode to my eyes, but at least
with the slider in collapsed state it looks better now.

Bug: T370570
Change-Id: I6035781169e9a18f1c959032f605b8e72878aba5
2024-07-24 10:47:59 +00:00
thiemowmde 93d33916a4 Replace some more colors with LESS design tokens
This doesn't fully solve T370572 but already improves the situation
a bit, without causing any change in light mode. Notably: The 1px
separator between the individual bars was hard-coded white before.

I suggest to continue working on this in separate patches, not make
this patch more complicated.

Bug: T370572
Change-Id: I1a2159221bfc37f23e85e6aa7d6beed1f149163f
2024-07-23 20:34:28 +00:00
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