Currently it always shows the icon for LTR no matter direction
of the user's language and this fixes it.
Bug: T315464
Change-Id: Ice6902a0823047380655b825aca9fbce14920d7d
* Adds to the language settings menu.
* Adds tp the language actions menu.
* Changes template directly.
Bug: T365990
Change-Id: I7e13a461c5e455ac1de821351576b992681c66ac
In the Japanese locale, add the following fonts to the Universal Language Selector's Web Fonts feature.
Font Name: Noto Serif Hentaigana
Version: v1.000
Download Site URL: https://github.com/notofonts/hentaigana
Bug: T347520
Change-Id: I70d9bab18c138ea786df1aaf2394450f1f7044ea
There is potentially a lot of time between when the attribute is
checked and when it is finally set. At least the two RessourceLoader
modules need to load. This can take a while, even on fast internet
connections. Just double clicking with the mouse can trigger the code
twice without the attribute being set.
The proposed solution is not the only one, but I believe moving this
single line is the most trivial one.
Bug: T358637
Change-Id: Ic9b99859841439febb83e91f70930e8676a4968a
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 latest update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible
Also unifiying npm command to qua standard notation `minify:svg`.
Bug: T354875
Change-Id: I0c712a4cec011ddda3a55caf4ecf493e1e00f3c8
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 reverts commit d29050d080.
Reason for revert: I had mistakenly assumed the @wikimedia/codex
module was loaded on clicking the language button. It appears to
be added on page load.
Given T248718 it's still unclear what our policy on loading
@wikimedia/codex on page load is and given several people are out
I think it would be better to attempt this again next week, possibly
delaying further if needed.
Bug: T353071
Bug: T248718
Change-Id: I09334a1faec06a7400e61013ddda374156bf5d72
* Replace all instances of mw-ui markup with Codex markup
* Use @wikimedia/codex as it is available in 1.39
and codex-search-styles is not.
Bug: T340255
Change-Id: Id85cf3b4af782c0d93bfa3bed5f3e6cbed856f1b
This is happening due to operator precedence. Taking a simpler
example:
return i || typeof i === 'function' ? i() : (i + 3); where i is 1
Explanation from ChatGPT:
* First, the typeof operator is evaluated for i. Since i is 1, typeof i
returns the string 'number'. The result of this operation is `'number'.
* Then, the === operator is applied to 'number' and 'function'. The
result is false because these two strings are not equal.
* Now, we have the logical OR (||) operator. The i (which is 1) is
compared to the result of the typeof and === operations combined, which
is false. Since 1 is considered truthy, the || operation results in 1.
* After the || operation, we have the conditional (ternary) operator ? :.
In this case, the condition to the left of ? is 1, which is truthy, so
the expression after ? is evaluated.
* i() is the expression after ?. Since i is not a function, and the
condition to the left is truthy, it attempts to call i() but throws
a "TypeError: i is not a function" error.
Fiddle that demonstrates the issue: https://jsfiddle.net/t2v1w6ae/2/
Bug: T347847
Change-Id: If5e8405141dfafd53c4495c91265545ec01acab3
Add a new method isNamed in ext.uls.common to use the isNamed
method if available else use the isAnon method as usual.
mw.user.isNamed was added in MW 1.40
Bug: T337780
Change-Id: I747c042a95e8edc793a2265a15ed6ba8ae9f1997
The stylesheet is needed on legacy Vector but not modern
Vector 2022 meaning Vector 2022 loads two sets of styles
for buttons.
This is a short term fix until UniversalLanguageSelector can
use Codex.
Bug: T340255
Change-Id: Ie34949e31e93dcfcabc07fa418dec06022159ca7
The stylesheet is needed on legacy Vector but not modern
Vector 2022 meaning Vector 2022 loads two sets of styles
for buttons.
This is a short term fix until UniversalLanguageSelector can
use Codex.
Bug: T340255
Change-Id: Ib4e228908d2813898654886bc1ee76e90dc52f22
svgo 2.8.0 → 3.0.2
Amending to new `cleanupIds` plugin name.
Re-crushing SVGs while at it.
Bug: T339162
Change-Id: I9804d6fa3c81e3c85e6d89e45079736d0934c465
This padding appears to be unnecessary. It's overridden in Vector 2022 & legacy Vector, and doesn't seem useful in Monobook as well.
It would be helpful to remove because it overlaps with the Codex button styles
Bug: T336526
Change-Id: I6a991600f8826fbeb09c7afb0c4cea4ebfd5cdd5
- Replacing 'mediawiki.ui/variables.less' `@import`
with new Codex design tokens as external library. We're using the
legacy values as UniversalLanguageSelector has been a desktop first
extension and those values are also used by Vector skin.
The values replaced are anyways only touching colors, borders or
transitions which are the same in normal and legacy.
These will be replaced by skin-aware 'mediawiki.skin.variables.less'
standard with dependency of UniversalLanguageSelector upped
to MW 1.42.0.
- Replacing several static values with new Codex design token featuring
skin variables, in categories `background-color`, `color`,
`border-*`, `box-shadow`, `opacity` and `transition`.
Note, that this change should result in same rendering of the
extension, only properties that already have an equal token are
replaced.
Bug: T332541
Co-Authored-by: Volker E. <volker.e@wikimedia.org>
Change-Id: Ic563fa84bf8e76fd62f14487924d7d6fd5c1a065
The .html() can replaced by .text() which avoids a possible JavaScript
injection by a malicious message.
Change-Id: Iffdf13299db6fb4ccd8a35b9df4c2f235646ea9d
Currently, inside the page language selector of multilingual wikis
(like Commons), the user can access the language settings by clicking
the display and input setting buttons that are provided at the bottom
of the language selector. However, instead of these buttons, the quick
actions trigger should be used instead for a consistent user experience.
The trigger will only provide access to the language settings, and other
quick action items won't have any effect in this case.
Bug: T314021
Change-Id: Iaaf61c85518b4d3d44d4a92dbf5dc7fdb96282fa