In modern Vector, the ULS trigger button has a child node which is
a span. When clicks are received on the span, they will result
in positioning relating to the span rather than the button.
The ev.currentTarget should be read outside the asynchronous function
to avoid bubbling.
Bug: T276248
Change-Id: I6e138c88e29b335b8e0bc22cf0aa07c289a5eb74
These ignores are already in package.json. Placing these here was
making `npm test` wait 10-20 seconds doing nothing waiting for Grunt
to synchronously recursively glob and expand an array of every file
in the current working directory (incl node_modules, and vendor) and
then once more for node_modules and vendor, and then to filter one
out from the other. And all before eslint even starts.
Instead, give '.' to eslint as we do in some other repos already,
and let it iterate on its own, skipping sub directories as it goes
based on package.json/eslintIgnore.
This follows-up 445087e5f, which did this once before,
and be400fe75 which unintentionally brought the Gruntfile part
back while leading the other part behind.
Change-Id: If637f2a696326778f25ea208224f5ac101f8c64a
The ulsPopup variable is local to the showUndoTooltip() function.
If it is called multiple times, then a previous assignment of an
OO.ui.PopupWidget object would not be found here in subsequent calls.
This check can only ever be false since it is the first statement in
the function (after variable and function declarations, which don't
do anything other than call `$()`).
Change-Id: I7020c103428d01b5e48c65be695471401f588fc4
jquery.ime:
* Update characters for the Basaa keyboard.
* add ~1 rule to the Palochka layout and make it
available for the Dargwa language
Updating to
51418055cd
jquery.uls:
language-data: Add the Dargwa (Dargin) language (dar)
Updating to
67e4d46f6a
Change-Id: I6fe23100a5a4b2ad0507353d6a7cd4c5520867c0
composer:
* mediawiki/minus-x: 1.1.0 → 1.1.1
npm:
* eslint-config-wikimedia: 0.17.0 → 0.19.0
The following rules are failing and were disabled:
* compat/compat
Additional changes:
* Added the "composer phan" command to conveniently run phan.
* eslint: Renamed `wikimedia/client` profile to `client-es5` (T277085).
Change-Id: Ib31cbcd8c615d2e6abf9ee30f0f4d7b7baa54e2e
User::getBoolOption() is deprecated and should be replaced with UserOptionsLookup::getBoolOption()
Bug: T277600
Change-Id: I119f9ed8a2f81af2a7f3ac6743e4af239f7ca61d
In development environment, ev.currentTarget is the button.
In Beta Cluster, however, once ext.uls.mediawiki is loaded,
it is now the document (the event has bubbled up). I do not
know what causes the difference, but we can use the target.
Bug: T276255
Change-Id: Ie4c425510293a6f2ce81e4bf4a353f2c8d86d412
Small dialogs were resizing after loading when display and input
setting buttons were added to it. Now delay showing the dialog until
they are loaded.
Bug: T276248
Change-Id: I7033903737afedbd4be908c84d07656c468ce801
Unrelated behavior change: ULS language selection dialog is hidden while
display or input settings is open.
Also simplified dead code in addDisplaySettings.
Bug: T276248
Change-Id: Ia91a2b83e7ad4072016649230e2376b0793cbbff
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
Reported in
https://github.com/wikimedia/jquery.uls/pull/383#pullrequestreview-613761459
Instead of checking the left edge of the trigger, check the midpoint.
This is more reliable and does not cause the dialog to incorrectly
swap sides in narrow screens in LTR direction,
This patch does not touch the compact language links variant.
Bug: T276248
Change-Id: Ic734abb7b350852f8c5c10ced8456bf146df62d8
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
Changes to comments, naming and code to increase clarity of the code
and explain better what it does and why. No change in behavior.
Change-Id: I998fcfd620c2ee737618c3ab8f41fb6dfdd2c99a
Translate's pagetranslation.uls module needs to override the action
that happens after language code is set. Currently it uses setlang
url parameter, which (no longer) works with Special:MyLanguage.
After this patch, it can use mw.uls.setLanguage and does not need
to reimplement it's functionality.
Turned mw.uls.changeLanguage into simple utility that calls
location.reload when the promise is resolved.
Change-Id: I9a648b146188dd252c239085bbe276165dc5f393