* Link in preferences is again opening ULS
* "personal" entry point now works even with compact languages
preference disabled
I added lots of comments and refactored this code to give things
better names to make this code easier to understand and maintain
and hopefully reduce the amount of bugs in the future.
Bug: T282956
Bug: T286574
Change-Id: I9cd6776ea6664e33fd63c49dfa77c5f004fba799
The compact languages button user preference will be applied to
any compact language button provided by the skin, this allows users
to opt out of the feature as before.
This will be used immediately in Vector in
I436554d9d51470d277d59c2c71e08124735e12fd
Bug: T282149
Change-Id: I726c61d4c6895a28b999781752535e0ddc961744
As part of the desktop refresh, we are moving towards a universal
hook for adding menu items. This allows more control over placement
without breaking backwards compatibility.
In modern skins, the personal URLs bar is split into
user-menu and notifications options which are combined for legacy
skins.
Depends-On: If4805e5186756056afcd31d21919e907a7782ce8
Bug: T282196
Change-Id: I79fa85e67d9c0064dd4dc9437517264d5fc04140
User::getBoolOption() is deprecated and should be replaced with UserOptionsLookup::getBoolOption()
Bug: T277600
Change-Id: I119f9ed8a2f81af2a7f3ac6743e4af239f7ca61d
Per T275894, Readers Web intend to increase the scope of the
UniversalLanguageSelector instrument to help them understand how
users are interacting with the Languages list in sidebar.
In order to keep the UniversalLanguageSelector extension focussed and
not overly Wikimedia-specific, it was agreed that the instrument would
be migrated to the WikimediaEvents extension, where other such
instruments are located.
Therefore, remove all code related to the UniversalLanguageSelector
instrument.
Bug: T275894
Depends-On: I2acee8ba8dc59c497dc6ba42cd5bd88dfd985c8b
Change-Id: I72b1d0ff35488521b3499e9606efee26baff8c00
Light refactor of existing code into reusable method to support
this.
Use Extension attributes to allow skins to provide ULS
additional configuration.
Bug: T274396
Change-Id: I7dcd49f05fae83fbc0c15768bee8ca93eab17bcc
This provides an alternative mechanism to
I0518ecdf402ebf5eb6bad2c430f6462322c0d8e1 for loading the compact
language link module. Instead of relying on the client, the HTML
is inspected.
Bug: T264824
Change-Id: I977a998388b3e70f7fe4d97fa05be3c1ac1bf676
Example usage:
Iabd4688c6081b4de391b9655b92a16f3a414e018
We will skip loading the compact link if we don't need
to compact the languages.
Note special handling is known for Timeless which stops
propagation of events. This will be fixed in Timeless at a
later date.
Bug: T264824
Change-Id: I0518ecdf402ebf5eb6bad2c430f6462322c0d8e1
These are disabled by default and on production. They are only enabled
in the beta cluster, which is not needed.
Change-Id: Ifa847fd8a1f3d7d2695a7c1c4a1a93f136091604
Previously UniversalLanguageSelector relied on the targets system
meaning the modules ext.uls.interface,
ext.uls.interlanguage and ext.uls.pt were
loaded on Minerva desktop skin unnecessarily and silently removed
on MobileFrontend which throws a warning.
Instead of doing this, check the skin
Bug: T237036
Bug: T235712
Change-Id: Ib38b041533cf959c3c4c30decc65869995c254fa
During MLEB 2020.07 release testing noticed that if $wgULSPosition
is interlanguage, the ULS was not appearing.
Revert some of the changes introduced in
I2843edde1bb45c70911d5acf2f7dafdff3bac53e to fix this
Tested this change on,
1. MW 1.34, Timeless (1b22886)
2. MW 1.34, Vector (f39a3f0)
3. MW 1.36, Timeless (e5e188f)
4. MW 1.36, Vector (3926ffa)
ULS appears in all scenarios
Change-Id: I84feaed26c4e32d74ae90152a2d006648d4d9b64
Instead use SkinAfterPortlet to force the language portal
to always display. This will work with all Wikimedia deployed skins that
use ULS (note the Minerva skin is not impacted but in future can benefit
from this change)
Depends-On: I438daa79d3d97e2518e6258c3213a805bd1f30e8
Bug: T253178
Change-Id: I2843edde1bb45c70911d5acf2f7dafdff3bac53e
As this extension supports MW 1.34 (and MW 1.33) in the master
branch, apply the usual ternary PHP registration and ternary
tricks.
Bug: T233676
Change-Id: I4d18bab53460b397d4f50485c4a149185a1db7b3
This change allows to use the ULS language changer without getting a
dialog for restoring the old language.
This change requires that the module is also loaded in this case.
Change-Id: Ie5169e986d0362034ede122b0bc29ce7a4aa481e
ULS currently supports MediaWiki 1.32+ which supports PHP 7.0+.
This change can reverted when the minimum required MediaWiki version is
1.34+.
Change-Id: I8115c4ae74c8aa91899899b1fb304ccbf1066ad8
setlang will now display a dialog to confirm with the user that
they would like to change their interface language. The preferred
language will only be updated if the user confirms.
The dialog will be displayed if the setlang parameter is present in
the query string and,
* A user is logged in, and their preferred language is not the same
as the one passed via setlang.
* For an anonymous user if the wgULSAnonCanChangeLanguage is true,
and the current interface language is not the same as the one
passed via setlang.
Bug: T63115
Change-Id: I882297d99a594fd82fd0aec3b4664e8bfd1eac3a
This change allows to replace the Assert::parameterType by a type hint
in Ie215179b4631fd9071b257772c5cb193547cb7d7.
Change-Id: I399a92d3fac0e0849fe3a403c703fe7d32f51257
MediaWiki 1.33 is released. The next version MLEB 2019.07 will be
compatible with MediaWiki 1.32 and 1.33.
Change-Id: I9487706125fe84d02cb8d3fec0a10e1f10006e64
This could've been done longer ago (by defining ext.uls.common
in Hooks.php), but didn't notice it before.
The ext.uls.eventlogger was (if configured) loaded on all page
loads. Same as ext.uls.init (but without config condition).
ext.uls.ext is an empty shim around ext.uls.common, which is thus
also loaded on all pages. Merge this into there given has no
reason for being its own module. They are always loaded together.
Change-Id: Icdda6f27470a1d56a37275164c06541514a488a0
The modules 'ext.uls.init'/'ext.uls.common' provides only a library and
no own funtionality. The modules get automatically loaded through
dependencies by other modules when needed as library. An explicit
loading on all page is not necessary. For example the MediaWiki API
help page does not have any ULS elements.
Bug: T145186
Change-Id: Ida99704ca2846e6adf154255bee3148e80c957d8
Given the code no longer uses any EventLogging methods directly,
but rather mw.track(), this means it also doesn't need to declare
any dependencies, including for older MediaWiki versions this
will work as-is.
Change-Id: I8cdcef54321d0887c509fc3683acf132c113e628
The following sniffs are failing and were disabled:
* MediaWiki.VariableAnalysis.UnusedGlobalVariables.UnusedGlobal$wgWBClientSettings
Change-Id: Ia5423c3d7ea419b3f073f35736de7a9379d4429a
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
Change-Id: I06e0542d737cec5e2500aad6d85f72951f8b584d
TTF files are not removed, the entries for them from the repo
is removed. Generated CSS will also skip ttf.
TTF format is not required for any browser now a days.
https://caniuse.com/#feat=woff
Change-Id: I018e74f6a50e63f55adeca480c03124092fba015
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Public
Change-Id: Ic8acf95cfd8edf88125128fe527e357fa5d0a8ec
* Fix inaccurate class comment that was copied from an unrelated
module in MediaWiki core.
* Remove use of deprecated getModifiedTime(). While this implementation was
straight forward, it is more reliable and deterministic to use a content hash
because timestamps are not tracked by Git. This currently causes needless
cache invalidation for all users at Wikimedia every week because git-clone
starts with fresh timestamps on disk.
I'm not using enableModuleContentVersion() right now because calling
getScript() reads all files into memory which is more expensive than
simply hashing the files. Especially because safeFileHash() is backed
by an APC cache via FileContentsHasher.
This matches the implementation in core ResourceLoaderFileModule.
Change-Id: If9aaefa6a3cf047c6c36e1cdd0f350412d59c849
* Remove manual tracking of when a hash is first seen.
ResourceLoader is no longer time-based, rather it is content based.
Except where a timestamp is actually wanted as key, a hash is all
we need. The default implementation of simply calling getScript()
and hashing its output suffices, and isn't a performance problem
in this case.
* Also simplify getScript() by passing an object to 'mw.config.set'.
Instead of multiple calls for each key/value. This is a no-op
now because there is only one key.
* Fix inaccurate class comment that was copied from an unrelated
module in MediaWiki core.
Change-Id: I9bb82cadd9caa7e584e20dd49ce30b64218326c4
Enable several of the ULS modules so they can be used in a mobile context,
in particular by the Translate Extension
Changes:
* Create a ext.uls.common module that can be loaded safely on mobile
* Only add the ext.uls.init entry point module on desktop (ensured by
the use of targets). On mobile it has no impact other than to increase
the amount of bytes shipped to users.
* Note various modules have not been enabled for mobile usage.
Bug: T102922
Change-Id: If2808886f0bfa153f5918e3c7536e88641028da9
IE9+ which is lowest that MediaWiki still supports is supposed to
support both ttf and woff par some exceptions.
This reduces uncompressed repo size almost 4000 bytes.
Change-Id: If80f4ec898d86d5fd4cf873d0d86245e66da2f0b
This is now new standard way of doing this in MediaWiki.
Since this makes the font repo bit longer, compensated by no
longer providing version information, which also simplifies the code.
Uncompressed increase is 542 bytes.
Depends on https://github.com/wikimedia/jquery.webfonts/pull/45
Bug: T135806
Change-Id: I1921115fc1abc20e6e756044c0a84a9fe4133884