This code was introduced as a hotfix for avoiding loading @wikimedia/codex
module in vector 2022 skin, in I44835e672bce97a7d3a98d9d75c4805ee2cc448d.
Now that the issue has been properly handled after this patch
(I43551be73da2126fd84ffaa0d37faec58bc47135) has been merged,
we can remove this code.
Bug: T353850
Change-Id: I458a0a6835caedb25bfaa1c58800fb9ce849fb1b
The existing strpos code is not working and the code is loading on
Vector 2022, it also appears to be required on Vector 2022 as without
it the language button does not appear to work (these should be
decoupled in a later patch)
The easiest possible solution here, is to move the check to the
client side and not create the trigger button in Vector 2022. e.g. do
the equivalent check for the node existence in the client instead
of the server side.
Bug: T353850
Change-Id: I44835e672bce97a7d3a98d9d75c4805ee2cc448d
* Replace all instances of mw-ui markup with Codex markup
* Use codex-search-styles
* Where codex-search-styles is not installed (e.g. 1.39)
register an alias which points to @wikimedia/codex as that is
available.
Bug: T340255
Bug: T340257
Change-Id: I4f3ddfb68ea6c033ee7a49729187f4ddbc8abe5c
This restores the language button on the user page and main page
for Vector 2022 for pages which have no languages
Bug: T315036
Change-Id: I65e638f05bf1fd6451fa33bd9d8fc660ee45b87e
Some browsers use formats like "zh-Hant-TW", the current detection
cannot handle them correctly.
Bug: T337665
Change-Id: I0db11a20e219d4cf66832aeee67d59bf3ec41a62
Instead of displaying the empty state for all non-content pages, we
should check whether the page is missing or if it's a talk page instead.
Also use the term "subject page" to align with existing functions
of Title and NamespaceInfo.
Bug: T316559
Bug: T326788
Change-Id: I0f50898b6e9817aee2bcfba38e69c67ae041a14b
NOTE: This patch is identical to patch with change-id:
Ifdf2a529b30e5a2df8867b606a525c9f7b3bdb6c
The above patch has been merged but reverted because of the usage
of '$skin->getTemplateDate()' method, which should be avoided. The
current patch replaces the usage of this method, with the usage of
the output page title ($out->getTitle()). All the rest of the code
has been kept the same.
Bug: T316559
Change-Id: Ibef9f6fd46d9055c3e0865905fb8aa8d031c1940
This reverts commit 5d576d05b4.
Reason for revert: Using Skin::getTemplateData method outside the
skin rendering layer is dangerous and likely a performance issue as
it means generating the rendering data twice and makes various hooks
execute multiple times.
It has caused T326538 and may be causing other issues.
Bug: T326538
Change-Id: Ie5d079deae414eb199d2a40b98d04b57439eaac4
The Compact language list preference was intended to control whether to
show all languages directly or show just a few of them (with option to
search for the rest) instead. However, with the new Vector 2022 skin,
there is only a button to access language selection and thus, this
setting should be ignored for this skin.
This patch modifies the "isCompactLinksEnabled" method inside Hooks
to always return true when the skin is set to Vector 2022 (when ULS
features are enabled).
Bug: T319690
Change-Id: Ic8a537d31ee4dad02932a04017f19537140e0c1c
The UTF-8 normalization for the URL attributes `languagecode`, `uselang`
and `setlang` are not needed.
Change-Id: Ib204629fb15e2578bba09be4c40d0210eb81dd77
I'm not sure what this is for, but it's definitely not needed
in Vector 2022 skin. It also prevents the uls-after-portlet-link
element from appearing inside the language button when ULS is disabled.
Bug: T275147
Change-Id: I8f6c1361040b72107f2d45bfc18e22d6b8f2021c
* Use isRegistered() from the more narrow UserIdentity interface.
* More specific type hints.
* Remove comments that literally repeat the code.
Change-Id: Icd0eaf8236be41b258efcf81d581540d2448e9e3
Stop additional conditional hook if MW < 1.37, and move the check
to inside the hook itself
Bug: T299305
Change-Id: Ied1c5c0beee015d7b0a8d6bd750346f4a8a5aaa1