Commit graph

15 commits

Author SHA1 Message Date
Amir Sarabadani
167fbd0a20 Drop deprecated config $wgLogoHD
It has been deprecated since 1.35, hard deprecated since at least I9776d11d4e2d184

No grep result in wmf-config

Change-Id: I2c67bab3e3212f25a0cbce7301f5e32a082f76da
2024-01-24 19:46:04 +01:00
James D. Forrester
c1599c91b3 Namespace Config-related classes under \MediaWiki\Config
Bug: T166010
Change-Id: I4066885a7ea071d22497abcdb3f95e73e154d08c
2023-09-21 05:41:58 +00:00
Jan Drewniak
2eedee7974 Create mediawiki.tempUserBanner module
Creates a new resourceLoader module which holds the
scripts and styles related to the temp user (IP masking) banner
described in T339379.

The temp user banner includes a tooltip which explains
what temporary accounts are. This is built using OO.ui.PopupWidget
and includes a clock icon and parsed i18n messages.

The Tooltip dependencies are loaded and instantiated on a click event
in order to minimize the dependencies on page load.

Bug: T339379
Change-Id: Ie2631221b0a07dd3bf55e970805d30fbb3cac190
Depends-on: Id5a4a9a00e50420c50868c54f899d36d7ddd373d
Depends-on: Icf622c4be910f5d14de95355efa02c05930179bf
2023-06-30 00:41:46 +00:00
Umherirrender
580439e604 tests: Use MainConfigNames consts to refer config names
PasswordSalt was dropped in 2e909bcb

Change-Id: I58d2b8d4e2a235afdc8054eafdea4e85b61f03c1
2023-06-19 20:21:08 +00:00
Jan Drewniak
62196c2fa1 Create new TempUserBanner skin component
Creates a new skin component for informing users with
temporary accounts that they can login or register if they choose.

Adds:
- New skin component: SkinComponentTempUserBanner.php
- Skin feature: "temp-user-banner"
- Associated styles
- New i18n messages for banner

NOTE: This component is not registered via the skinComponentRegistry
because it doesn't output any data, only a string of HTML.
Instead it is appended to the body element before the skin is rendered.

Bug: T330510
Change-Id: I1e137dbd29f3c73efac901f43f8a8258e2a111fc
2023-06-16 16:50:06 +00:00
Tim Starling
25d0d37adc ResourceLoader: tweak comments and error messages
Change-Id: Ifcaefedf65b090a87ec1417808277ae6451302dc
2023-04-03 18:21:30 +10:00
Tim Starling
5e30a927bc tests: Make some PHPUnit data providers static
Just methods where adding "static" to the declaration was enough, I
didn't do anything with providers that used $this.

Initially by search and replace. There were many mistakes which I
found mostly by running the PHPStorm inspection which searches for
$this usage in a static method. Later I used the PHPStorm "make static"
action which avoids the more obvious mistakes.

Bug: T332865
Change-Id: I47ed6692945607dfa5c139d42edbd934fa4f3a36
2023-03-24 02:53:57 +00:00
Bartosz Dziewoński
d3c64c5ce6 ResourceLoader: Remove SVG fallback hack from SkinModule
Bug: T329127
Change-Id: I28c02efc137c3a9ceacdc07366ac374c70b0fb7e
2023-02-08 00:32:52 +00:00
Jon Robson
ac389cf0f0 ResourceLoaderSkinModule: Split up interface feature into multiple parts
While working on the site notice in Vector we've noticed these
styles are proving more problematic than helpful so splitting these
up allows us more granularity in the styles we ship.

The core interface styles are now enabled by default as they contain
important logic relating to empty portlets and the print footer

Bug: T316027
Change-Id: Ib5ae640bb260cee46e654228b785c776722c7003
2022-08-24 13:59:17 +00:00
Timo Tijhof
11f729301b ResourceLoader: Hoist and simplify @covers in test cases
I consider it busywork to maintain this, for no tangible benefit.
Limiting the credited coverage to a class is limiting enough to
exclude unintended coverage from reports. Especially as this
helps ensure tracking coverage correctly for implementation details
such as helper methods and internal methods that do not warrant
their own test as that would defeat the purpose of tests exercising
the contract and demonstrating good usage.

Change-Id: Icf865f15cbd86585bbc02fc4943a960efb40c0eb
2022-08-23 23:59:17 +00:00
Thiemo Kreuz
02971ace54 Remove confusing ->onlyMethods( [] ) with empty array from tests
Calling ->onlyMethods( [] ) with an empty array does have an effect.
By default, all methods are mocked, which means the original code is
not called. Calling ->onlyMethods( [] ) turns this around. No methods
are mocked but all call the original code.

This is almost the same as ->enableProxyingToOriginalMethods(). The
difference is that ->enableProxyingToOriginalMethods() also requires
the original constructor to be called, but ->onlyMethods( [] ) does
not.

We can get rid of this confusing setup in tests that don't need it.
All tests in this patch that succeed with a simple ->createMock()
just demonstrated that they don't need it.

Change-Id: I341323a1ca793c039498f80b7f073c124b6b6ae0
2022-08-08 15:49:59 +02:00
Thiemo Kreuz
61ae7504df Replace trivial usa of mock builder with createMock() shortcut
createMock() does the same, but is much easier to read.

A small difference is that some of the replacements made in this
patch didn't use disableOriginalConstructor() before. In case this
was relevant we should see the respective test fail. If not we can
save some CPU cycles and skip these constructors.

Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5
2022-07-15 16:43:48 +00:00
Tim Starling
3e2653f83b ResourceLoader namespace (attempt 2)
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader itself.

Move the tests by analogy.

I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".

I did not address DependencyStore which continues to have a non-standard
location and namespace.

Revert of a241d83e0a.

Bug: T308718
Change-Id: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
2022-05-24 15:41:46 +00:00
Lucas Werkmeister (WMDE)
a241d83e0a Revert "ResourceLoader namespace"
This reverts commit e08ea8ccb9.

Reason for revert: Breaks Phan in extensions, and as far as I’m aware,
this change isn’t urgently needed for anything, so the simplest fix is
to revert it again for now. After PHP 7.4 it should be safer to try this
again (we hopefully won’t need the two “hack” classes by then).

Bug: T308443
Change-Id: Iff3318cbf97a67f821f78e60da62a583f63e389e
2022-05-16 14:43:33 +00:00
Tim Starling
e08ea8ccb9 ResourceLoader namespace
Move ResourceLoader classes to their own namespace. Strip the
"ResourceLoader" prefix from all except ResourceLoader and
ResourceLoaderContext.

Move the tests by analogy.

I used a namespace alias "RL" in some callers since RL\Module is less
ambiguous at the call site than just "Module".

I did not address DependencyStore which continues to have a non-standard
location and namespace.

Change-Id: I92998ae6a82e0b935c13e02a183e7c324fa410a3
2022-05-16 14:41:27 +10:00
Renamed from tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php (Browse further)