Commit Graph

1106 Commits

Author SHA1 Message Date
Hannah Okwelum
a50eb568af Prepare Less styles for math=parens-division
Bug: T368921
Change-Id: I5394fd074c1860f0f95407757e6aede226119f58
2024-07-31 20:29:57 +01:00
Abijeet
c82cd6dee0 Drop support for MW 1.40
Bug: T369064
Change-Id: Id3dde7df0fe963a35c68ff5b6bdf56a268eacc6e
2024-07-04 06:46:52 +00:00
Ebrahim Byagowi
60b6e52ad2 i18n: Make close icon direction aware
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
2024-07-01 11:35:02 +00:00
libraryupgrader
6586bce598 build: Updating npm dependencies
* eslint-config-wikimedia: 0.28.0 → 0.28.2
  The following rules are failing and were disabled:
  * resources/js:
    * es-x/no-object-assign

* grunt-stylelint: 0.20.0 → 0.20.1
* stylelint-config-wikimedia: 0.17.1 → 0.17.2

Change-Id: I93fa42275d02c006a0dcb2be6fc152c5a0daaa15
2024-06-22 08:10:45 +00:00
bwang
02f44318b4 Add skin-invert to ULS
Bug: T366738
Change-Id: Ia53bbd48cab5b96984778765238e9f9af0850be7
2024-06-17 15:46:46 -05:00
ksarabia
a88e7d1bd7 Adds additional notheme classes
* Adds to the language settings menu.
* Adds tp the language actions menu.
* Changes template directly.

Bug: T365990
Change-Id: I7e13a461c5e455ac1de821351576b992681c66ac
2024-06-10 19:15:55 +00:00
libraryupgrader
3d9bf0ea7f build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
  The following rules are failing and were disabled:
  * resources/js:
    * no-jquery/no-extend

* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: Ia94171d47725e7ae95d102afb8eb7fbb651c11d2
2024-06-08 13:26:07 +00:00
ksarabia
1f611b310d Add notheme to dialog
* Ensure white text is fixed in dark mode.

Bug: T365990
Change-Id: I5a3db5b322ef9b9d925d513645d771a94db8b04e
2024-06-05 12:12:28 -05:00
Niklas Laxström
3367b51bbe Remove woff files
Bug: T318167
Change-Id: I54181a8ba084f0f1336dbe95389f046c9a987f2a
2024-05-04 14:56:46 +03:00
Kartik Mistry
17f182bb6a Update UnifrakturMaguntia fonts to v2017-03-19
Changes:
* Updated UnifrakturMaguntia fonts to 2017-03-19
* Updated upstream URL

Change-Id: Icf0b3ebc71f48709c84e032a676d093d163b1f80
2024-05-03 19:23:02 +00:00
Kartik Mistry
1df7379b96 Update AbyssinicaSIL to 2.201
Changes:
* Updated AbyssinicaSIL font to 2.201
* Updated upstream URL

Change-Id: Id993365d0b51c59f605a96d41528f5347b9bc5f8
2024-05-03 18:41:06 +05:30
albertoleoncio
468f6e396a Add NotoNastaliqUrdu font for Kashmiri Wikipedia
Bug: T334811
Change-Id: Icfaaa33d6ebc9ec233f4bcdcc1c37fa42e6e8aad
2024-05-03 13:27:02 +03:00
likibp
a86f166d90 Add Noto Serif Hentaigana font for Japanese Language
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
2024-05-03 09:17:44 +00:00
thiemowmde
23f64d03f5 Avoid a bit of confusing code duplication in .js code
Change-Id: I0cd203e3b2f7ad2be873b92325b80cde462124a5
2024-04-29 15:55:50 +00:00
thiemowmde
668527a562 Avoid repeated initialization when clicking very fast
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
2024-04-29 06:44:04 +00:00
thiemowmde
b086aebcc8 Avoid calling expensive ActionsMenuItemsRegistry.getItems
Change-Id: I6ba87ea91d1aca151882f96f4e164b07064bf040
2024-04-18 12:01:47 +00:00
thiemowmde
885c729c74 Remove unused code from ext.uls.compactlinks.js
This was removed via Ifae139d989fb6cb21fc3e19006306ed597d058e6 in
2021.

Change-Id: I76f86d53641dffa572683ac40f41af64a5afa924
2024-04-04 09:35:13 +00:00
Abijeet
ad5753ad40 Remove support for MediaWiki <= 1.39
With release of MediaWiki 1.41 we no longer need to support MW 1.39

Bug: T355105
Change-Id: I7957ca8aefee168ef11bc20905abd9944faecd73
2024-01-23 12:06:44 +00:00
NikG
5617a19b4e Clean up hacky code that avoids loading @wikimedia/codex in vector 2022
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
2024-01-19 10:50:21 +00:00
Volker E
e094773671 build: Update 'svgo' to latest v3.2.0 and re-minify SVGs
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
2024-01-16 14:54:33 +01:00
NikG
0b7ae1dce6 Avoid loading ext.uls.compactlinks module for Vector 2022 skin
Bug: T353850
Change-Id: I43551be73da2126fd84ffaa0d37faec58bc47135
2024-01-16 10:43:26 +00:00
Winston Sung
2fa3da3610 ULS: Fix JavaScript language fallback mapping being overridden
Follow-up of commit 7284215879
(Change-Id I9f68e0744bf0c730aa3a410901a9b536af7623fc)

Bug: T348376
Change-Id: Ic4331f635da2ee3de1211448838bc8cf145a808e
2024-01-08 10:18:55 +00:00
Jon Robson
14e3be1cd3 Revise logic for creating compact links button on Vector 2022
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
2024-01-04 04:09:32 +00:00
Jdlrobson
6f9ffac1c3 Use Codex styles for buttons in language overlay (attempt 2)
* 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
2023-12-20 18:53:41 +05:30
Jdlrobson
5481573341 Revert "Use Codex styles for buttons in language overlay"
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
2023-12-08 22:00:26 +00:00
Jon Robson
d29050d080 Use Codex styles for buttons in language overlay
* 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
2023-12-07 14:19:23 +00:00
ksarabia
26ec080e5a Bump up z-index
*This addresses the issue of the sticky header
concealing the ULS menu.

Bug: T338642
Change-Id: I8fb09509c520b6db6d06d9773ff93d43fe39eecf
2023-11-02 13:48:37 -05:00
Abijeet
d413fc2721 Fix TypeError: mw.user.isNamed is not a function
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
2023-10-27 15:24:26 +00:00
Niklas Laxström
8a38906b8a Update Junicode font to 2.100
Bug: T253006
Change-Id: I7d02c91dec8200e26ebd7312ab87556b79cd806e
2023-10-17 16:19:53 +03:00
Ed Sanders
e040f65ca6 history.replaceState: Drop unused argument
Per https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState

Change-Id: I6687967c8c8f29393f7f10a3234f42754d192953
2023-09-20 21:26:08 +00:00
Ed Sanders
bde4b44108 build: Update linters
Change-Id: If959fe0c1b972fe55c6f8cee1c9bb33a52b4265d
2023-09-20 19:10:42 +01:00
Niklas Laxström
ee42cf07bb Add AwamiNastaliqBold
Fixes: I1a50a699543ad6502e452f7be380419246c3b6b8
Change-Id: I336f137750efd1cfe2a0eb46c2e746d7c116b081
2023-09-17 10:06:21 +00:00
Stang
953ca0ad88 Add Tiro Bangla font for Bengali Language
Bug: T343658
Change-Id: I86870360f00e5fda48bc1fbc2da47f807318e137
2023-09-11 04:53:20 +00:00
Abijeet
939c03bad1 ext.uls.interface.js: Inline isNamed() method
This module does not use ext.uls.common

Bug: T344635
Change-Id: Ib21c7f9020b8f51241299f4fb5b721c68de6a8e4
2023-08-22 19:37:27 +05:30
Abijeet
88f0045b94 ULS Frontend: Save preferences only for named users
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
2023-08-21 11:08:26 +00:00
Jon Robson
76e7805881 Don't load mediawiki.ui.button on page load (attempt 2)
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
2023-07-17 21:28:23 +00:00
Jdlrobson
d7d63236fd Revert "Don't load mediawiki.ui.button on page load"
This reverts commit 693087b886.

Reason for revert: This was a bug in my code. Sorry about that.

Change-Id: Ia3bb8d2b38e179a570f94bfd1d989bb51fab41e4
2023-07-17 20:24:38 +00:00
Jon Robson
693087b886 Don't load mediawiki.ui.button on page load
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
2023-07-17 05:37:17 +00:00
Winston Sung
21261dbdec UniversalLanguageSelector: Don't suggest non-specified-script zh for UI language
Change-Id: Ic46587437d3b48e43b689d18ef562cebf7730f41
2023-07-12 08:24:03 +00:00
Volker E
e67d5bd33c build: Update SVGO to v3.0.2 & re-crush icons
svgo         2.8.0  →   3.0.2

Amending to new `cleanupIds` plugin name.
Re-crushing SVGs while at it.

Bug: T339162
Change-Id: I9804d6fa3c81e3c85e6d89e45079736d0934c465
2023-06-15 02:36:53 -07:00
bwang
330853765d Remove padding-left from .uls-trigger
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
2023-06-14 11:25:10 +00:00
Niklas Laxström
08645aae8b Update AwamiNastaliq to 3.100
Add bold variant.

Change-Id: I1a50a699543ad6502e452f7be380419246c3b6b8
2023-05-17 12:24:15 +03:00
Niklas Laxström
3ac1c1b9ce Update Junicode to 1.003
Bug: T253006
Change-Id: I34321e7430b04c8a4dcd8cc07015e65e31cc3362
2023-05-17 12:03:08 +03:00
Niklas Laxström
744eeae6a1 Update Amiri font to 1.000
Bug: T335231
Change-Id: Ief092bf4ffd6e06f208db14b79a18ce944dc9e1b
2023-05-17 11:37:34 +03:00
Jon Robson
240498e6ee Let Vector 2022 manage its own styles
Depends-On: I9996696795f792567f770ac8bf57002bd5706d06
Bug: T335710
Change-Id: I1f4bddc9091a360795f0ee16f5eed00a7a9ce846
2023-05-10 23:55:00 +00:00
libraryupgrader
d0d88ee40e build: Updating eslint-config-wikimedia to 0.25.0
Change-Id: I56a69db1b780752b33ad1ed0babee8bb280a4aa3
2023-05-05 18:51:36 +00:00
Abijeet
9b3fb0cc4e ext.uls.mixins: Use LESS variables from skin
Bug: T332541
Change-Id: If431b51615aa492b32a7707acc4946212d644971
2023-05-04 14:26:00 +00:00
Volker E
d5285655fd styles: Replace 'mediawiki.ui/variables' call with skin variables
- 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
2023-05-04 04:44:44 +00:00
Fomafix
69ddc959ac Use Unicode '\u00A0' instead of HTML '&#160;'
The .html() can replaced by .text() which avoids a possible JavaScript
injection by a malicious message.

Change-Id: Iffdf13299db6fb4ccd8a35b9df4c2f235646ea9d
2023-04-24 09:43:39 +00:00
Niklas Laxström
7d20f15b17 Remove ULSMobileWebfontsEnabled
To my knowledge never used since it was added in in 2013 with
commit fd885d9881.

Bug: T332837
Change-Id: Ia9ecb3e4dd47b8ce4dfaaa489a1ec5a71c378492
2023-04-05 06:21:40 +00:00