Commit graph

57 commits

Author SHA1 Message Date
Umherirrender ef3f96742c Use namespaced Message class
Change-Id: Ib358324d32156dc219c40dd1286ab9a9d3c3d21d
2024-06-10 20:17:27 +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 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
jenkins-bot 8f79cb6ad9 Merge "Various tiny clean-ups" 2024-01-12 09:48:13 +00:00
gerritbot 639d3fa19c Update UserOptionsLookup's FQN
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.

Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I4daca7542a428455aa72cc372521e894716e3c40
2023-11-29 12:39:57 +00:00
thiemowmde fdf34e4dfb Various tiny clean-ups
Notable:
* Arrays shouldn't be initialized like this. Instances will actually
  share the same array object. Luckily this was dead code anyway
  because it's re-done in the constructor.
* $timeOffset is already guaranteed to be an int.

Change-Id: Ib0a2b0f39ee368fcef4756281099d519d470eb44
2023-11-29 12:58:51 +01:00
thiemowmde d20cead930 Split large hook handler function into named methods
Change-Id: Ided2c233829166bd691f01cb8b619f03c1ca4ff2
2023-11-08 09:16:38 +01:00
thiemowmde 5bf6ad7ac0 Fix accidental use of Statsd implementation instead of interface
Really just a mistake.

Also make use of strict types while we are here. We can do this now
with our minimum PHP version.

Change-Id: Iab83a4c538b648f19a803442d1e839389f4d9cc4
2023-09-15 13:15:33 +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
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
thiemowmde 59af8caa8f Make use of named MainConfigNames::… constants
Change-Id: Idbed910d3ab8e06bf0b0a0b4aea9a8954102f02c
2023-04-21 10:01:41 +00:00
Sam Wilson e70d7b7ed6 Update to use the new HookContainer/HookRunner system
Implement hook handlers and inject services.

Bug: T335085
Change-Id: Ibe68029561098d90a0ee0b9fa70b1c4866996426
2023-04-20 11:28:28 +08:00
thiemowmde afbc7be282 Simplify slightly complex code reading time zone settings
Change-Id: I30348e27392df03ce775db0e9f8bb055966d2381
2022-11-22 14:33:39 +01:00
Reedy 00d9f42d5e Correct namespacing to match best practices
Bug: T303105
Change-Id: I44529699d6dc9564633a9d61ad11ea150767b9ad
2022-03-05 15:08:35 +00:00
libraryupgrader d95fdc6fab build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.10.6 → 0.11.0
* php-parallel-lint/php-parallel-lint: 1.3.0 → 1.3.1

Change-Id: Ibe08248f1b36bf01530b5d7a8f64331dbaebebc7
2021-09-09 11:28:22 +00:00
libraryupgrader 6b4edb0efd build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* svgo: 2.3.0 → 2.3.1
  * https://npmjs.com/advisories/1754 (CVE-2021-33587)
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)

Change-Id: Ia723f76e78bfbe616d03886ba526be72b8d094fe
2021-07-23 10:25:21 +00:00
Thiemo Kreuz a2bd859b29 Simplify/reformat code pieces with a lot of duplication
Change-Id: I7f933bb0d5c82858e5ab1831f9021f67e373ff69
2021-07-01 09:16:34 +02:00
Umherirrender 4105bd5c02 Do not set current preference value as default in GetPreferences hook
Set by DefaultPreferencesFactory

Change-Id: I068bbec3e318ca8ac6b2da5d50accda112c47512
2021-05-08 00:32:23 +02:00
WMDE-Fisch 3b3392a72f Use OutputPage from diff engine instead of global context
There seems to be no crucial reason why this was done differently.

Change-Id: Ib7ed261970bb9e3301f7657af6645a8373e39ddc
2020-11-12 13:42:43 +00:00
Thiemo Kreuz eb4dbe36ab Trivialize Hooks::getConfig
This is cached anyway in the ConfigFactory. On top of that this
is called a single time only. The cache is not even used.

As far as I can tell this pattern was originally copied from
another extension with more than one hook handler.

Change-Id: Idb88bcba753a99d30cd52cf520257298fad7259a
2020-11-11 16:35:27 +01:00
WMDE-Fisch 60c82b496b Make use of UserOptionsLookup
Change-Id: I408600d0515ce4f06fc58ecfea0dadd2e6a0bbcc
2020-11-11 13:52:26 +01:00
Ed Sanders ced0fbbbb4 Use correct context for checking for MobileDiff
The title returned by DifferenceEngine::getTitle() will change with
I2120d52 (T245172).

Bug: T245172
Change-Id: I092071573a779cc20c33d25d2a495cbf1e22db4b
2020-09-17 09:29:19 +00:00
DannyS712 8e1ed89152 Update hooks to use DifferenceEngineViewHeader, require MW 1.35+
Bug: T255769
Change-Id: I0d64099dd4caffc5b9631fc743bfe229868f46a8
2020-06-24 01:15:45 +00:00
Reedy d8da8ab98a Namespace extension
Change-Id: I0cd732fc28bf2b152281f3318c17215d519c32db
2020-04-19 01:10:58 +00:00
Adam Wight 512d99e6a9 Declare QUnit test modules in extension.json
Newer, declarative syntax for QUnit test modules.

Change-Id: Ifb0064a4891293a29e9a2a9a0e34c106f7614a72
2020-03-30 00:01:22 +02:00
libraryupgrader c9240eacd1 build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
Additional changes:
* Also sorted "composer fix" command to run phpcbf last.

Change-Id: I96581fb165d9c60c205f83a4d9d479e7e7a0da64
2020-01-14 11:15:55 +00:00
Timo Tijhof ad26385a59 Remove use of jquery.ui module aliases (part 2)
Follows-up f0720b6eaf which covered the ones in extension.json.

Bug: T219604
Change-Id: I8a4b5aebee6c055fb9e447e1ce393f925e00d7ee
2019-11-26 19:52:45 +00:00
jenkins-bot 4949c15d0c Merge "Replace expand icon with down indicator" 2019-08-17 13:19:45 +00:00
tzhelyazkova a5d329758a Replace expand icon with down indicator
Bug: T212803
Change-Id: Ic0ae23bbc399ce70764457bbf4d789f113fb2f48
2019-08-15 11:47:14 +02:00
Amir Sarabadani 111d108150 Merge some resource loader modules
Each RL module comes with the cost of its name + hash being sent over every
request and in the startup module increasing the time to load the page.

Bug: T229791
Change-Id: I3ae230a84112a70ab369ffbff70e173b8f07ec1a
2019-08-14 23:10:25 +02:00
Thiemo Kreuz 7eb5a10ce6 Fix capitalization of Html::element() call
Change-Id: I272901367c7ba4a12406c9f8ec7fa444f3889c0c
2018-10-24 11:40:36 +02: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
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
jenkins-bot 0fadc05265 Merge "Remove default "return true" from hook handlers" 2018-06-26 14:02:48 +00:00
Thiemo Kreuz c73bf149bf Remove default "return true" from hook handlers
Change-Id: I78d6d3034556a0bc513265a9f5af785a1843f229
2018-06-26 15:20:53 +02:00
WMDE-Fisch 59435b4bf4 Clean up phpcs and add function spacing check
- added function spacing checks and fixed code
- removed vendor excludes since they are part of MW-CS
- reduced extensions to php, nothing else used here

Change-Id: I8dbdede97be965313e17357fa560d1c7e04686fb
2018-06-20 17:49:54 +02:00
Umherirrender 35f1d3fc48 Add phan-taint-check-plugin
Change-Id: I19032d573a425dd9385945295428d12b11082420
2018-05-22 21:41:10 +02:00
Kunal Mehta f94fa6b851 Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: I3e7a12a224f4c1563a467eeff74ba0f118aa8f00
2018-03-02 15:35:31 -08:00
Ed Sanders b1f2613d79 Use core wgDiffOldId/wgDiffNewId JS config values
Newly introduced in a469795efc5bc1c585c9f84ee289ee099833661d.
This will require MediaWiki 1.30.

Change-Id: I9897a77b24e258bf037f8ec6cafa1d0684bf867d
2017-07-18 16:16:05 +00:00
jenkins-bot 449dfdb051 Merge "Do not hook RevisonSlider into MobileDiff page" 2017-07-06 14:31:44 +00:00
WMDE-Fisch edfd885543 Remove last SliderViewTwo parts
Bug: T165747
Change-Id: I9ac410613361e567bd825f096eb12bbb3edc5cde
2017-07-05 10:22:33 +02:00
WMDE-Fisch 11caf4c828 Do not hook RevisonSlider into MobileDiff page
The RevisionSlider is not ready for the MobileDiff right now, so
do not include him on the MobileDiff page, even when the hook is
called.

Bug: T169535
Change-Id: I190a8681adad4e8605ae5c8bd69399459f364238
2017-07-03 16:56:43 +02:00
Mukunda Modell 8bea89dbdd Set onDiffViewHeader argument defaults = null
See also I1221357746f5d4ba1430bcf0bfe773202484eebc

Change-Id: I0b96a9557ed1fc0e9a74e14bc25753ecddd97d1d
2017-06-29 00:07:37 -05:00
WMDE-Fisch 557ab23aa9 Fixes to address MW PHPCS 0.9
Change-Id: Ia911d9aa0516d6619bd62f104a527b1dc1b62228
2017-06-26 11:58:50 +00:00
Andrew-WMDE 80ab1408ac Remove BetaFeature Code
Bug: T167276
Change-Id: Iad2e34e2f906777c7ba0e22e245dc55891f211ae
2017-06-23 14:45:48 +02:00
WMDE-Fisch 12e34322bc Merge SliderViewTwo CSS into main CSS
Bug: T165747
Change-Id: I1949591063bb8d2df7ddf3bc0c33247ece1bd522
2017-06-21 10:13:32 +02:00
Chad Horohoe 0687de3fbd Also drop Revision typehint from $oldRev
Already did this in $oldRev, this follows up I4c483d7

Bug: T167359
Change-Id: I8b74932caf1188005155b4cbd8a1ff76066b1604
2017-06-08 15:32:01 -07:00
aude 71c586a351 Handle possible null $oldRev in DiffViewHeader hook handler
Sometimes $oldRev can be null (e.g. not a Revision, but
maybe is a missing revision), and also not sure we can be
certain about $newRev being a Revision object.

Bug: T167359
Change-Id: I4c483d711f2ec07a918c708a473aff1b2c150cf5
2017-06-07 22:19:16 -04:00
WMDE-Fisch ae96989d0b Disable the RevisionSlider for screenreaders
Until the sliding mechanism has full support to work with screen-
readers the tool will be disabled for them to avoid unnecessary
confusion.

Bug: T165489
Change-Id: Id0da2c891040ac7e6f1b6ce5ba5f65b727d3cb07
2017-06-06 08:28:15 +00:00
Florian Schmidt 5173fe59d4 Do not use the main config for extension configuration options
This currently just works, because the currently used backend are
global variables. Once the main config uses a more scoped/focused
backend, such as a HashConfig or a database-based config, requesting
extension configurations from it will not work anymore.

Therefore, use the extensions Config object to request configuration
options for the extension.

Change-Id: Iea02d3c284f9a0e12abff33e3624dce9585ab51c
2017-05-20 11:54:52 +02:00