Commit Graph

230 Commits

Author SHA1 Message Date
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
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
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
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
Ed Sanders
bde4b44108 build: Update linters
Change-Id: If959fe0c1b972fe55c6f8cee1c9bb33a52b4265d
2023-09-20 19:10:42 +01: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
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
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
NikG
a6a338c0f7 ULS: Use quick actions icon inside page language selector
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
2023-03-30 05:52:06 +00:00
Umherirrender
e464c5ab31 stylelint: Enable selector-pseudo-element-colon-notation
Via stylelint --fix

Change-Id: I77f14cac83e4422c7962339d1177da9e65b6a28e
2023-03-30 01:03:16 +02:00
Wandji69
7a69478642 style: Replace deprecated prefixed mixins with unprefixed CSS property
Bug: T308351
Change-Id: I80615dcee5dd97fe267cb901fa0b4d5018a7ea88
2023-01-26 10:37:20 +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
NikG
965ffc3b1a Add language settings button inside dropdown for non-content pages
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
2023-01-11 18:05:29 +02:00
Jdlrobson
570a7d3b4e Revert "Add language settings button inside dropdown for non-content pages"
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
2023-01-09 20:25:46 +00:00
NikG
5d576d05b4 Add language settings button inside dropdown for non-content pages
Bug: T316559
Change-Id: Ifdf2a529b30e5a2df8867b606a525c9f7b3bdb6c
2023-01-09 05:02:57 +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
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
Timo Tijhof
af60848942 displaysettings,inputsettings: Rename two classes for consistency
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
2022-03-10 05:19:48 +00:00
Jon Robson
607124c247 Drop ineffective rule
This has been moved to Vector in
I8d5294a986d76574284419efc7d384fc954a86c8

Bug:  T297579
Change-Id: Id75de20550de208c23d27842c0d2686521e59b5c
2022-01-11 08:24:14 +00:00
jdlrobson
26aa8d450c Hide sticky header language button with preference disabled
Adds a class to body when the ULS dialog is disabled.

Bug: T297579
Change-Id: I791c65c6a7ac5221dcf24e5db01c22c3e2e9f81a
2022-01-06 05:13:45 +00:00
jdlrobson
5890cf27f1 Disable language button background color on modern Vector
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
2021-11-29 23:28:35 +00:00
Jan Drewniak
7805386fcb Lower .uls-menu z-index for Vector skin
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
2021-11-24 17:13:06 +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
jdlrobson
9f92d7e759 Register meta data to allow Vector to handle display of this menu item
- 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
2021-09-03 19:21:21 +00:00
Jdlrobson
4c3907e61d Revert "Language button icon/button should be consistent with other buttons"
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
2021-09-01 15:35:05 +00:00
jdlrobson
5ca2ccb58a Language button icon/button should be consistent with other buttons
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
2021-09-01 08:05:54 +00:00
jdlrobson
01c7a4fb0b Restrict compact language button styles to legacy Vector
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
2021-07-22 23:47:01 +00:00
Santhosh Thottingal
4f40e08f9c Remove deprecated .box-shadow mixin
Replace with unprefixed box-shadow

Bug: T286692
Change-Id: Icb448cb092c214b0c467864201a2469076134a4c
2021-07-15 06:52:46 +00:00
Niklas Laxström
0a692b227a Increase z-index for undo tooltip
When interface language selector is at the top, the undo tooltip
may appear under new Vector search box and other user tool links.

Change-Id: I36ac01511e590896afb0382c17ae90d01ba57314
2021-03-18 09:29:59 +00:00
Niklas Laxström
dd8842517e Change ULS content language selector positioning
New Vector introduced a new content language selector trigger. This
code was hardcoding a behavior that works for compact language links
but is not so appropriate for other uses in the skin, which are out
of our control.

This patch aims to be a minimal change to allow other kinds of
behavior without changing the amount of tech debt. This changes
the default ULS dialog behavior to match the requirements shown
in the task. Compact language links specific behavior is retained but
only enabled for the compact language links trigger. The behavior
is chosen depending on the value of isUsingStandaloneLanguageButton().

For future changes, I propose that mw-interlanguage-selector class will
not have any styles attached to it. Whoever creates the trigger would
be in charge of styling it. Ideally that code would also define the
positioning and other behavior, but it is less clear how that can be
abstracted in a nice and decoupled way.

Bug: T276248
Change-Id: I52da6c2f5a1f25d64f322a3c8f6105da3b244b66
2021-03-16 22:36:18 +00:00
Volker E
f5c4fe1826 Remove unnecessary rules and properties
Active state is already covered with `mw-ui-button`. Color needs to
become darker for better contrast ratio when button is toggled.

Change-Id: If888a862c0b642aaa200e8207f3804f76f05b8b0
2020-11-03 13:56:05 +00:00
Volker E
8d54c3faf7 Amend compact links icon to use latest WikimediaUI version
Also amending `color` & `padding` to be closer to button standard appearance and
increase `margin-bottom` to make “Edit links” link not stick to button.

Bug: T170137
Change-Id: Iabb6abfdb8fa69c9f2634b190cb5fa6c005eb17c
2020-11-02 07:00:55 -08:00
Volker E
394b7cb185 Replace deprecated background-image-svg() mixin calls
Use normal `background-image` properties with SVGs now
that IE 8 and Android 2.1 is removed from Grade C.

Bug: T248062
Change-Id: I6026ff013e41cc147d916193d93c03a6b3d4efef
2020-07-30 04:31:04 +00:00
Volker E
6ea7307df9 Amend Base10 color and remove (affected) PNG fallbacks
Amending Base10 to slightly darker `#202122` to fulfill WCAG
requirements in connection to Accent50.
Also removing all PNG fallbacks as they are only used in JS-only.

Bug: T248393
Change-Id: I07fa4e23320763a634e5340ab125634842b86454
2020-04-21 11:43:23 +00:00
Fomafix
8652470ec4 Use position:fixed instead of position:absolute
This prevents a wrong position of the dialog when there is a different
scroll position like on an URL with fragment, for example
Special:Version?setlang=de#Installed_software

Change-Id: Ic10c6b13461a259d87fd43a718acdd1421193b6c
2019-12-23 13:50:28 +00:00
Abijeet
ff02e63a45 Update setlang to display confirmation dialog to change language
setlang will now display a dialog to confirm with the user that
they would like to change their interface language. The preferred
language will only be updated if the user confirms.

The dialog will be displayed if the setlang parameter is present in
the query string and,

* A user is logged in, and their preferred language is not the same
  as the one passed via setlang.
* For an anonymous user if the wgULSAnonCanChangeLanguage is true,
  and the current interface language is not the same as the one
  passed via setlang.

Bug: T63115
Change-Id: I882297d99a594fd82fd0aec3b4664e8bfd1eac3a
2019-12-19 14:54:34 +00:00
Volker E
f6e5d24941 Put overhauled icon on baseline and unify code with Vector's
Putting icon on link label baseline as good as possible cross-browser
and unify code with Vector skin's code. With one improvement,
putting icon in `:before` selector in order to be able to specifically
change icon independent from link, which opens up `opacity` or state
changes.
Also cleaning up CSS by
- reducing specificity
- changing to `stylelint-disable-line` only on specific selectors
- removing initial value `transparent`

Bug: T207075
Change-Id: Ib5d446434263441eb85aa2e96a0e4dbde1034c1c
Depends-on: I92acb9851a3c0acdbc40a4a4528a91c7332c9293
2019-11-13 23:02:23 +00:00
Timo Tijhof
372ab5301e ext.uls: remove redundant -webkit gradient/svg reference
To match how MediaWiki core expands the .background-image-svg() mixin
function. According to Codesearch, this is the only repo with a match
for `-webkit-linear-gradient.*url\(`.

Bug: T121730
Change-Id: Ide4fc6eef81de76b4b0043cd88ecdf8ed2e3e736
2019-10-06 16:38:21 +00:00
Timo Tijhof
21100ebb78 Remove @embed where it needlesslay delays the page load
>>! Performance Inspector
> Source: ext.uls.common
> Used selectors: 0.00% (0 of 10)
> Used embeds: 0.00% (0 of 1)
> ----
>   .uls-icon-back {
>     background-image: .., url("data:image/svg+xml..

It seems the entire module isn't used, but that can be fixed
separately. The icon is used by ext.uls.inputsettings and
ext.uls.displaysettings as part of a click-triggered dialog,
which means it can never appear on a page directly.

Bug: T121730
Change-Id: I36831beeb764e6893c331b20b90102a5ceb0d21a
2019-09-27 16:19:34 +00:00
Isarra
3ef282de00 Set a relative size for the pt-uls icon and padding so it scales properly
Instead of background-size:containing to the relative font size, but with
fixed horizontal space for it due to the padding, set both the padding and
background-size to use ems instead of px so both scale properly.

Tested in modern, cologneblue, monobook, and vector with no visible issues.
Resolves issue with icon being too large on timeless. Does not appear to
affect minerva, as that just handles it all another way.

Change-Id: Ibcea827fe15ee50c947e9c0de1e6cf053e299033
2019-09-07 11:36:34 +00:00
Volker E
78b30ddae7 Decrease opacity and add :hover transition
Follow-up to https://github.com/wikimedia/jquery.uls/pull/335.

Change-Id: I83f2e8b0fd23a6a989b16009d2c138383320067f
2019-06-12 05:16:51 +00:00
Niklas Laxström
4e5a1d2173 Remove extra empty line in css
Change-Id: I05245d755423e2ed4d7642e68c35d0d9662d728b
2019-01-09 09:06:42 +01:00
Ed Sanders
7bf345669a build: Update linters
eslint-config-wikimedia      0.8.1  →   0.9.0
 stylelint-config-wikimedia   0.4.3  →   0.5.0

Change-Id: I0f55e743c2f38bb8910931c3989a6516e0527703
2018-12-10 14:24:24 +00:00
Volker E
e55d85453a Apply background-color of header for callout arrow
The callout has been carrying the wrong color for the elements it's
applied to.

Change-Id: Ifedc21f4686b94f368c3a41eed1d3e35b467d635
2018-11-26 06:08:25 +00:00
Volker E
aa15e2eda3 Update 'help' icon to standard
Bug: T90414
Change-Id: I3906d452bacb312dd6c97118ad5bf34168fe1da7
2018-11-21 06:47:31 +00:00
Niklas Laxström
d3cd069f7e Correct alignment of cog in interlanguage links in Vector skin
Bug: T162381
Change-Id: Ieaa75507d9c73eccbadc03d915bb7107e728fe0f
2018-09-17 18:44:47 +00:00