- 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
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
During the implementation of the “addEmptyState” method, a part of code
was copied from the “addActionsMenuTrigger” method. This part is the
rendering of the action menu items (Translate button, Open Language
Settings button, etc) that is common for both the empty state and the
actions menu. During this copy, two unused lines were also copied. These
lines basically create the trigger for the actions menu (the “ellipsis”
or “cog” icon button at the bottom right corner of non-empty ULS), which
is not rendered for the ULS empty state.
This patch removes these unused lines.
Change-Id: I4776c2038cb6e1c74401c4caa6705e98181c6dca
OOUI widgets are required for the actions menu dialog, but no need
to have them loaded unconditionally.
Bug: T309793
Change-Id: Icc09b88aa70af1316bd67a56b13a411ebc8f7f8a
Currently, actions menu button only support an event handler to be
called upon button click. However, when the desired result of a
button click is just a redirection, "href" attributes are preferable,
due to their accessibility support.
To better handle such cases, this patch also adds support for "href"
attributes inside action item buttons. When "href" property exists
for an actions menu item, it is used and the event handler is
ignored.
Bug: T289840
Change-Id: I776680c19564f032acd550206c7d1306407420e0
"ext.uls.actions.menu.items.registry.js" should be required at the
top of the "ext.uls.interface.js" file. The latter is the main file
of the "ext.uls.interface" module, and it's the only one that is
executed when the module is added as an external dependency. Since,
the "mw.uls.ActionsMenuItemsRegistry" object is needed outside ULS
extension (inside ContentTranslation), the corresponding file should
be required at the top of the main file so that it's available.
Bug: T289840
Change-Id: I70ced03c09b7907c6dbf2aa35a29d5fd14b790e6
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
I suspect these may have been accidentally mixed up or miscompleted
from a nearly data-attribute or interface message, since all other
classes start with `.uls-` in this repository.
* "uls-input-settings-imes" is not used referenced anywhere else.
* "uls-sub-panel" is referenced in one skinStyles override, updated with
https://github.com/StarCitizenTools/mediawiki-skins-Citizen/pull/434.
Change-Id: Ia0b23d795f7807ef9227f66d0890a25524cd5a9f
The languagesettings dialog does not open when clicking the
uls.trigger for the first time. This issue occurs when the user is
not logged in, ULSPosition is personal, and ULSAnonCanChangeLanguage
is false.
Without this change, the following happens:
* uls.languagesettings is loaded via uls.interface
* uls.languagesettings::hide is called via uls.languagesettings::init
* click method is triggered immediately via script in uls.interface
* uls.languagesettings::show is called
* uls.languagesettings::hide is called - triggered via ::show
method - $( document.documentElement ).trigger( 'click' ); but
dialog is not visible yet, so this does nothing
* uls.languagesettings::show displays the uls.languagesettings
* hide method called again via click handler for documentElement
With this change in place the hide method is not called again due to
e.stopPropagation();
Additionally add a parameter autoOpen that can be set to open the dialog
automatically.
Bug: T301882
Change-Id: I54e8172ae017c4a9c6ab5b841d9328b2f24f97a8
Updating 'svgo' to v2.8.0 and newest Wikimedia SVG guidelines –
mainly around new whitespace features of SVGO.
Change-Id: I7c9eb84fdaeb50f6ff04c9e5cd2f005e129d555a
Update to version 6.001
Upstream font file names were changes. So updated it here too.
Added Bold and Bold Italic since they are present in upstream.
Bug: T298613
Change-Id: I1c0429f6c5abac66471df0fa96738a10a7b28d04
Limit this style to sidebar buttons. When skins are not placing it
inside the sidebar (e.g. modern Vector), we should defer to them for
all styling matters. This rule clashes with modern Vector's mw-ui-button
class.
Bug: T296323
Change-Id: I16bdbf8882e37b8727fbf693c904b9c9d1d8820c
Adds special logic to accommodate the ULS trigger being placed inside
modern Vector's sticky header, which has a fixed position and requires
the ULS menu to remain pinned to the page when scrolling.
Bug: T295391
Change-Id: Ic531dd2ae213f8221157386f79edb95bc61a8119
To avoid overlapping with the Vector sticky header, the z-index
should be lowered so that the sticky header is always
above it.
Bug: T295794
Change-Id: I9d3f45d56204bedc98d1994ed984b43f01c29fd5
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
In Vector the language button is a checkbox. It uses the checkbox
hack to provide non-JS dropdown behaviour.
When the JS upgrades such a button, the checkbox behavior continues
to work. An unsatisfying hack in Vector workarounds this problem.
This provides a neater way to disable that behavior
in Vector once the button is clicked by adding support for the
well documented checkbox hack.
Bug: T283757
Change-Id: I97a69c30b27cb1ded06451389e086229561c3589
- Update document click handler for loading ULS
- Use data attributes to ensure ULS isnt loaded multiple times for an element
Bug: T289815
Change-Id: Iba6cbbd6c6e48a1abfda342421822e3ff2715362
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
- Adjusts CSS to defer button/icon rendering to skins that support button
and icons e.g. Vector
Depends-On: Ib518858e06549f252d73d57fd4768f446cc561b9
Bug: T289630
Change-Id: Ie9e30af5468aea9803d77c9a36e480ba2b2e86a0
This reverts commit 5ca2ccb58a.
Reason for revert: Per Niklas's review (T289630#7324439)
I've also seen a much better way to do this which limits the change
to modern skins so I'll post a follow up shortly.
Change-Id: I99802c60390e23eaa0de21462788da622a35a37a
This converts the language button into a mw-ui-button which is the
class we're currently using in both Vector and Minerva. In future
this can become a WVUI button using the same roadmap as Vector
and Minerva.
This fixes the issue with the icon resize, as well as the issue
with the button lacking appropriate hover/focus states.
Bug: T289630
Change-Id: I8242986e8762a8f663f8cab07c54481e14223320
These styles are causing the language button to move downwards
on page load in modern Vector
and legacy Vector.
See T191021#7231088.
Bug: T191021
Change-Id: I9d62ad8a79168bdaebace07fb82f22da4c534b5c