OOUI widgets are required for the actions menu dialog, but no need
to have them loaded unconditionally.
Bug: T309793
Change-Id: Icc09b88aa70af1316bd67a56b13a411ebc8f7f8a
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
Stop additional conditional hook if MW < 1.37, and move the check
to inside the hook itself
Bug: T299305
Change-Id: Ied1c5c0beee015d7b0a8d6bd750346f4a8a5aaa1
This rule was applied to all WMF wikis in T55300 / I0cc1e92a8f,
but for some reason was not set here.
Change-Id: I908aac19b648de550659aad85bca115f26f43fb4
This change also replaces the calls of deprecated functions from class
Language and replaces the global variables by the MainConfig.
Change-Id: Ice7273481a736cb138e263a9300bfd90fdcbb401
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
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
User::setOption() is deprecated and should be replaced with
UserOptionsManager::setOption()
Bug: T277818
Change-Id: I5ac58c4be5046d4457de24b63b062aa238e972b6
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
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
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
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
This is updated version of 61f1a9863a
which was reverted due to compatability issues which are no longer
present.
Change-Id: I05333ddc288171b6d867dce8a1d3efc1e1450e0a
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
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
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
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
These modules are always loaded together. There is no need to load
them in separate ResourceLoader modules
Change-Id: Ibdf7d1bbd9090ffed6a142055ee684ad97dd6680
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
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