Commit Graph

151 Commits

Author SHA1 Message Date
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
Abijeet
89c173ddac Update version for MLEB 2023.04
Bug: T333822
Change-Id: Iee07d58797a90dd13951c5bae22e19e003579f03
2023-04-25 11:03:31 +05:30
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
NikG
dde48f50ab Add separate buttons for 'add languages' and language settings menus
Bug: T323694
Change-Id: I23cb4687d841025905224a52b843572206fa9ddb
2023-01-25 11:47:24 +00:00
Abijeet
b5ea94188c Update version for MLEB 2023.01
Bug: T326537
Change-Id: Icbfcf520edd52234cea328eb58e8cddbd9ee7527
2023-01-23 12:03:03 +05:30
wangombe
4a87284620 Drop support for MW < 1.37
Bug: T324932
Change-Id: I419f70fb714f9c33c03caf9159888bd93470a929
2023-01-02 06:23:23 +00:00
Abijeet
3c77e27aa3 Update version for MLEB 2022.10
Bug: T319187
Change-Id: I35b36e1bb75eb09acfbe70243dfe26e941b3982e
2022-10-24 11:05:40 +00:00
Abijeet
4632f33e6a Drop support for MediaWiki 1.36
Bug: T311510
Change-Id: I9bc2f91f274df1d37ebad639b42ee4b542274db9
2022-07-26 11:04:40 +00:00
Abijeet
9eb5342795 Update version and required MediaWiki version for MLEB 2022.07
Bug: T311511
Change-Id: I301a288b840204c43c74a5654621995676b700f9
2022-07-25 13:06:00 +00:00
Santhosh Thottingal
3450f90678 Add support for empty states to the current language selector
Bug: T290436
Change-Id: I42c5d44ec15e291d71723c9738ddb8f0d1cf0b09
2022-07-01 09:16:40 +00:00
Santhosh Thottingal
e9a4f5419c Add explicit dependency to oojs RL module
Bug: T309793
Change-Id: I6f4f7beebfc009007ff8e3537a5c1f1f616515e3
2022-06-08 10:26:38 +05:30
Santhosh Thottingal
cfd6d48bc1 Load OOUI widgets only when ULS is opened
OOUI widgets are required for the actions menu dialog, but no need
to have them loaded unconditionally.

Bug: T309793
Change-Id: Icc09b88aa70af1316bd67a56b13a411ebc8f7f8a
2022-06-06 12:35:48 +05:30
Abijeet
a924ab4a8f Update version for MLEB 2022.04
Bug: T305141
Change-Id: I90a9eba2bb732dae855bfb58212d31b6fd7d0609
2022-04-25 18:16:52 +05:30
Santhosh Thottingal
5e6838ebdf Add actions menu inside content language selector
This patch replaces the display and input settings menu bar at the
bottom of the content language selector, with a floating icon that
opens a menu containing all the available language actions. In case
that only the language settings action is available, the language
settings menu is being opened instead.

In order to provide extensibility and support the addition of new
action items from other extensions, a registry class that inherits
from OO.Registry class is created. This class is used to create a
singleton registry object that holds all action items that should
be rendered inside the menu. Other modules/extensions can use this
registry to add new actions items to the menu, by passing the item
as argument, in the following form:
{ name: "", icon: "", text: "", handler: function() {} }

Bug: T289840
Change-Id: Iee017a9e3e6a654145e9fdd2b7df35baa348697d
2022-04-11 05:24:08 +00:00
Abijeet
6e6635bdbb Move version check inside PersonalUrls hook
Stop additional conditional hook if MW < 1.37, and move the check
to inside the hook itself

Bug: T299305
Change-Id: Ied1c5c0beee015d7b0a8d6bd750346f4a8a5aaa1
2022-01-24 09:24:43 +00:00
Abijeet
c9d695db36 Update version for MLEB 2022.01
Bug: T298889
Change-Id: I362f8c0c6a693b52c7d944976201290be3c55330
2022-01-19 08:10:11 +00:00
Abijeet
30986e6d9e Remove backward compatibility for MW <= 1.35
Bug: T298856
Change-Id: I1e635785d0a29d87f510e729b11fce9a2eb68e11
2022-01-18 12:51:07 +00:00
Clare Ming
4c13cb713d Update skinStyles with new vector skin key.
Bug: T292599
Change-Id: Ib05b186df5c40ca2e157ab5acd510e0dfda50666
2022-01-10 15:01:42 -07:00
Reedy
f9532855ad Namespace extension
Change-Id: I79aa319f177589d85446888289568748cd63d1c5
2022-01-05 10:47:22 +00:00
Ed Sanders
2b16bb0ad8 Upstream WMF config to disable ULS in Ace editor widgets
This rule was applied to all WMF wikis in T55300 / I0cc1e92a8f,
but for some reason was not set here.

Change-Id: I908aac19b648de550659aad85bca115f26f43fb4
2021-11-30 12:19:08 +00:00
Abijeet
defc3d416d ApiULSSetLanguage: Use LanguageNameUtils
Change-Id: I00e814894db4ba84f1d08c52db2993b59fbccf55
2021-11-16 18:36:23 +00:00
Fomafix
10e15cf0f8 Use .parseDom() instead of .parse()
Use

  $( ... ).append( mw.message( ... ).parseDom() )

instead of

  $( ... ).html( mw.message( ... ).parse() )

Add dependency on 'mediawiki.jqueryMsg' to 'ext.uls.setlang'.

Change-Id: I23897ab16a84a1732286921a8153b9a5e57c9462
2021-11-09 21:12:01 +00:00
Fomafix
f0c6bec1ac Use HookHandlers and inject services
This change also replaces the calls of deprecated functions from class
Language and replaces the global variables by the MainConfig.

Change-Id: Ice7273481a736cb138e263a9300bfd90fdcbb401
2021-11-04 14:00:31 +00:00
Fomafix
183bb97f74 ApiULSLocalization: Inject LanguageNameUtils
Replace deprecated Language::isValidCode by
LanguageNameUtils::isValidCode.

Change-Id: I2adef21fb37e78c163674008a4f9b1e5a74aa6a1
2021-10-29 13:14:31 +00:00
Abijeet
770b0dfe50 Update version for MLEB 2021.10
Bug: T294021
Change-Id: I252fffcde7d0c401cb8a460c3b162c71948ec018
2021-10-25 13:29:03 +05:30
DannyS712
e17f5c0b39 Merge jquery.webfonts into ext.uls.webfonts.repository
The two modules are always loaded together and don't need
separate entry points.

Additionally, this makes the ext.uls.webfonts.fonts
just depend on the ext.uls.webfonts.repository module
and not do anything else, so remove it in favor of
referencing ext.uls.webfonts.repository directly where
needed.

Bug: T292042
Change-Id: I067b9eda923fcb0d5da0ed80030356f1f747259b
2021-10-19 09:07:11 +00:00
jdlrobson
a55369e0e2 Pull out Vector personal tools styles into skinStyle
Most of the skin styles are no longer needed for modern
Vector. This refactors them so that they only apply
to legacy vector, reducing the overrides needed inside
Vector.

Depends-On: I1edee874a42b070bc319648496ae80a01b6365fb
Bug: T289630
Change-Id: Ic5ab5172d881c48caae6bb3691ccc95515dcdcdb
2021-09-07 06:58:22 +00:00
Alexander Vorwerk
0d9e1b134a Avoid using User::setOption()
User::setOption() is deprecated and should be replaced with
UserOptionsManager::setOption()

Bug: T277818
Change-Id: I5ac58c4be5046d4457de24b63b062aa238e972b6
2021-08-16 06:00:28 +00:00
Niklas Laxström
36d79be608 Remove ULSEnableAnon
I am not aware of anyone using this niche configuration where ULS
visible interface is enabled only for logged in users. Simplify
code and updated comments.

Change-Id: I9f0a5969fdc76ca790d961ee3035fdb27ece9c0c
2021-08-09 23:25:01 +05:30
Kartik Mistry
5a7a6a5fe3 Update version before MLEB release
Bug: T286474
Change-Id: I2bc4406addfad28a843fd4f5328882b1f388c7c7
2021-07-20 11:49:38 +05:30
jdlrobson
2c46226f83 Use SkinTemplateNavigationUniversal for ULS button
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
2021-06-07 20:40:14 +00:00
Niklas Laxström
0c45465786 Simplify extension.json with ResourceFileModulePaths
Change-Id: I4f00d86456132ed7a852cba0e9ce3e73a7d42193
2021-06-03 15:58:14 +03:00
Abijeet
5baf437b3c Remove MW 1.34 backward compatible code
Move hooks and scripts to extensions.json

Bug: T282783
Change-Id: Id63d17d04789bb36fff35e0512e7878dc8bfe12c
2021-06-01 08:17:13 +00:00
jdlrobson
1786fce2c6 Default state of ULSCompactLanguageLinksBetaFeature should be false
extension.json configuration should reflect recommended production
configuration whenever possible. This particular configuration flag
is only ever true on Russian Wikivoyage or Wikisource, so is more
often false than true.

Having this default would have saved me ten minutes trying to work
out how to make the preference available, so I am keen to save someone
else that time in future.

Bug: T282149
Change-Id: Ieef58631c7ef5c42ffc05f13d0ed8a4f02c48de1
2021-06-01 07:45:37 +00:00
Kartik Mistry
2e05b501bb Update version before MLEB release
Bug: T279280
Change-Id: Ida8597db98c3bef3dd97a11ceda0c9b08087d3d0
2021-04-27 17:01:31 +05:30
Sam Smith
852d72e66d Remove UniversalLanguageSelector instrument
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
2021-03-04 13:58:19 +00:00
Kartik Mistry
a04f1af26f Update version before MLEB release
Bug: T271398
Change-Id: I42f5e7051bcd295d4a5e925e66f4545e7e2c1657
2021-01-21 10:20:12 +00:00
Nikerabbit
3ac9853220 Simplify ext.uls.preferences module
This is updated version of 61f1a9863a
which was reverted due to compatability issues which are no longer
present.

Change-Id: I05333ddc288171b6d867dce8a1d3efc1e1450e0a
2021-01-21 08:08:15 +00:00
Ottomata
93c48e4667 Finalize migration of UniversalLanguageSelector to event platform
Bug: T267352

Change-Id: Ic961eba1587e4f5c61c8a92d74501abeb45f6699
2021-01-12 08:57:59 -05:00
James D. Forrester
9fc9dbafa3 Use User->isRegistered(), not deprecated isLoggedIn()
Bug: T270450
Change-Id: Ibeb882b8917f43aed9fd2411a6d4a2400532da33
2020-12-18 22:16:26 +00:00
jdlrobson
ab6decae11 Allow skins to register their own button and disable compact
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
2020-11-18 17:06:40 +00:00
jdlrobson
e3569d32a7 Separate compacting of language list from launching of dialog
This refactor will allow us to separate these two functions so that
the modernized version of Vector can avoid loading the compact
language list.

Changes:
* `options` is now optional to the CompactInterlanguageList constructor
The max value is already defined in
CompactInterlanguageList.prototype.init
* this.interlanguageList is now initialized inside the constructor
Previously calling CompactInterlanguageList.prototype.createSelector
or getCompactList before calling init would throw an exception.
This will be important in I0518ecdf402ebf5eb6bad2c430f6462322c0d8e1 when
the responsibilities of wiring up the button and compacting the languages
is separated.

Bug: T264824
Change-Id: I9606df30a050d0cdaf7add2deff849cd5b895bab
2020-11-05 08:44:06 +00:00
jdlrobson
740ff490e0 Drop unnecessary ext.uls.init module
This module is just an alias at this point. It's only consumer
is taken care of in the depends on.

Depends-On: I7c362ad391b076d3c4214c7b01fca7bbaaa320b9
Change-Id: I842c1ba10b24967a3888107806788f7e7844339b
2020-10-29 11:52:47 +00:00
Kartik Mistry
eab051abe1 Update version before MLEB release
Bug: T265886
Change-Id: I1821a7dfc72cd44ffc37c8cc8e1146978d5c3c6d
2020-10-26 12:09:04 +05:30
jdlrobson
5cd10ce862 Reduce JS loaded on critical path
As a precursor to incorporating a new language switcher in the new
version of Vector I'd like to improve the performance of loading
the switcher.

It seems most code can be deferred until the language selector
button is clicked.

This shaves around 30kb of resources off the critical path for
most users. There's potential here for a positive performance
impact so we should follow up the deployment by checking the
associated performance graphs to see if there's improvement.

Note, if the compact personal links feature is enabled
there is no performance saving for now. This will be addressed in follow
ups.

Bug: T153844
Bug: T153845
Bug: T237061
Change-Id: I740600d18859422b2f98a5ef92d0321f6e9615a2
2020-10-20 13:40:49 +00:00
jdlrobson
a1963ce12d Merge ext.uls.inputsettings into ext.uls.displaysettings
These modules are always loaded together. There is no need to load
them in separate ResourceLoader modules

Change-Id: Ibdf7d1bbd9090ffed6a142055ee684ad97dd6680
2020-10-14 21:11:03 +00:00
Niklas Laxström
98f0bb42bd Remove ULSCompactLinksForNewAccounts and ULSCompactLinksEnableAnon
These are disabled by default and on production. They are only enabled
in the beta cluster, which is not needed.

Change-Id: Ifa847fd8a1f3d7d2695a7c1c4a1a93f136091604
2020-10-14 13:02:25 +00:00
jdlrobson
b5aff8a06b Define unsupported skins
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
2020-07-28 14:55:40 +00:00
Kartik Mistry
e85b393965 Update version before MLEB release
Bug: T257286
Change-Id: I58005902adfd2cd9ee8cf751b060d0ecb0071f8b
2020-07-21 06:05:01 +00:00
jdlrobson
afebb45eb9 SkinTemplateOutputPageBeforeExec is deprecated
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
2020-06-12 09:07:14 -07:00