Why:
* The standard format for ServiceOption keys is to provide them
in a const named CONSTRUCTOR_OPTIONS.
* Doing this makes it possible to assert that the required keys
are in the ServiceOptions instance passed in the constructor
(as it may be called directly without using ::factory).
What:
* Move the ServiceOptions keys to a CONSTRUCTOR_OPTIONS const in
Hooks.php
* Reference this constant in the ::factory and ::__construct
methods.
Change-Id: Icba2eadc9faf4a15abf4d52efa541e5ddb0294bd
Why:
* The WikimediaMessages extension currently has no tests.
* This is not ideal, considering that the extension is deployed on
WMF production and can be run on every page load (such as
through the ::onBeforePageDisplay hook).
* Testing the extension makes the code easier to maintain
and more reliable to regressions.
Why:
* Add some unit tests that cover a few easy to cover areas of
Hooks.php.
* This is done separately to make it easier to see the coverage
change in future patches.
Bug: T315774
Change-Id: I916668ae0375e8668b09a16111d83bf2e2feee40
Why:
* The Watchist and RecentChanges guided tours implemented in this
extension are set to not show for new users. Furthermore, in
T217451 the task description describes about how this tour should
probably be removed.
* Keeping the tour around leads to extra ResourceLoader modules
and when users are not shown it when first interacting with the
RecentChanges and Watchlist pages, it means that this is not
necessary and keeping it doesn't outweigh the performance
benefit.
What:
* Remove the GuidedTour code related to the watchlist and
recentchanges from ::onResourceLoaderRegisterModules
* Remove the ::onChangesListSpecialPageStructuredFilters,
::isOresAvailable, ::onLocalUserCreated, and ::onGetPreferences
methods from Hooks.php as no longer needed (including then
removing the hook definitions in extension.json related to
the removed methods).
* Remove the i18n strings, less files and JS files associated with
the now removed GuidedTour.
* Remove the the `modules/images` folder as all the files were used
in the now removed GuidedTour module.
* Remove the dependency injection of the UserOptionsManager as it
is no longer used.
Bug: T217451
Change-Id: I13f08bb5ecea3c9d4de3372185da9343b0d57c8d
Why:
* The Hooks.php file has a property for the ExtensionRegistry
instance being used for the class.
* However, some methods in the class call ExtensionRegistry
::getInstance directly and don't use the property.
* This makes it harder to unit test the methods that call
::getInstance, so using the property (which can be set as a
mocked version) is better.
What:
* Replace calls to ExtensionRegistry::getInstance in all methods
of Hooks.php that are not static (and are not ::factory)
with a usage of the extensionRegistry property.
Change-Id: I97c1e3407d8930c094f8b3fc6f1b3cb9552c175f
Why:
* Active development on IPInfo has now concluded for the time being
and only one piece of feedback was added in 2024.
* Removing the link also reduces the amount of untested code in
the infobox.js file. While the ResourceLoader module needs to
stay, it does remove one dependency and a message key from the
definition.
What:
* Remove the 'Feedback' link in infobox.js
* Remove the message used for the feedback.
* Remove the 'oojs-ui.styles.icons-interactions' dependency and
removed message from the ResourceLoader module.
Bug: T362538
Change-Id: I038e0ed100e83734b1484ff3978fcb8af22259db
Why:
* WikimediaMessages defines a feedback link for Special:Investigate
using the ::onCheckUserSubtitleLinks.
* However, the feedback page that this links to is now a soft
redirect and the last comment was made in 2021.
* Removing this feedback link is therefore good because it is not
being used and therefore keeping it in WikimediaMessages is
not necessary.
What:
* Remove Hooks::onCheckUserSubtitleLinks and remove the associated
Hooks configuration.
Bug: T364213
Bug: T315774
Change-Id: I4b06eb7e5ef9fb4747393fd234ae9a6081061f6d
Why:
* MainConfigNames allows the use of core config values without
having to use strings. This makes it easier to find usages
using code searching.
* The Hooks.php file uses core config values as strings instead
of MainConfigNames
What:
* Replace core config defined via strings with usages of the
MainConfigNames class.
Change-Id: I0234dbdf1f43ea028dfeeeaf6276ca9370e7ffde
Why:
* In I2cec02d3be5decbbe207e706f6398b8cb8046381, it was made
possible to define description text that is added above the
checkbox that is used to allow a user to view temporary account
IP addresses.
* On WMF wikis, the description currently has a list without the
use of bullet points. Using bullet points is only possible if
this text is put in the element above which allows raw HTML.
* This means that the message override for the preference text
added in 6ec964289c needs to be
updated to use a diffferent message key and the text associated
with the message key to use bullet points.
What:
* Rename the 'wikimedia-checkuser-tempaccount-enable-preference'
key to 'wikimedia-checkuser-tempaccount-enable-preference
-description'.
* Update the text in the renamed message key to use an unordered
list for the list like content.
Bug: T327281
Depends-On: I2cec02d3be5decbbe207e706f6398b8cb8046381
Change-Id: I44cfcddfae3949470f8b48463fd132139a366a3e
Why:
* A warning that is displayed when a user tries to use
Special:InvestigateBlock to block accounts and IP addresses in
the same use of the form was added in the commit
2b8ef31cb661596be2e4ebdac40de560e9d3e1ce.
* The message mentioned that the use of the form may violate the
privacy policy for the site, but did not link to any specific
page.
* For Wikimedia wikis this should link to the 'Access to nonpublic
personal data' policy ( https://w.wiki/96nJ ).
* Some wikis may choose to link to their policy which is more
restrictive than the policy, but in general this should be
displayed over all wikis and as such needs to be defined in this
extension to override the message for Wikimedia wikis.
What:
* Define an override for the 'checkuser-investigateblock-warning
-ips-and-users-in-targets' message in the wikimediaoverrides
folder.
* Add this message key to the Hooks::onMessageCacheFetchOverrides
method.
Bug: T362548
Change-Id: I032c4bec456211b3f86d28f0c28b01059833866c
This commit corrects a typo in the class naming for French Wikipedia
infobox styles in the night mode stylesheet. The error corrected
involves changing `infobox---frwiki` to the proper `infobox--frwiki`.
Changes:
- `theme-night.less`: Corrected the class name for `.infobox--frwiki`
from three dashes to two, aligning it with the intended naming
convention and ensuring the styles apply correctly in night mode.
This typo correction ensures that the night mode styles are accurately
applied to the specified infobox elements on French Wikipedia.
Bug: T359644
Change-Id: Id04128f6ce0c24e03c9cf1b97cee3250123d2b58
The color in light theme is color-base (202122) not #333
so this is creating issues in the night mode theme where backgrounds
are optimized for that color choice
Follow up to 1f564dfb236be45b5892d0fac37b94f5a7ab66bc
Bug: T358797
Change-Id: Idf7750b180b46b6a7cad35068c405428c4c9c955
This update targets CSS conflicts in night mode, particularly
for French Wikipedia,this change focuses on
infobox compatibility with the French wikipedia.
Changes:
- `theme-night.less`: Applied specific styles to `.infobox`
and `.infobox---frwiki` to improve compatibility.
Additional Context:
- Opting for `.infobox---frwiki` as a temporary measure
allows focused adjustments without broader impact.
- Ongoing discussions aim to refine a strategy that could
reduce CSS complexity while maintaining clarity and
functionality across projects.
Bug: T359644
Change-Id: Ic0520c476685fb886d64de45dea1f2ed00e24039