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
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
Introduced in I740600d18859422b2f98a5ef92d0321f6e9615a2.
When onSelect was called for the new language, it set dirty to true.
Then the, now delayed, render function reset the dirty status to false.
There is no need to set dirty to false on render, so moved it to the
constructor.
Change-Id: Ibfa23f545c9d358e7e03fb299c238182ea449d7c
Follows-up c578db02 and ea671b1f, which I thought removed
all code relating to the old async EventLogging method.
I didn't notice this UI code at the time, because I only took a
single pass over the code to find dead code. Now that that code
is gone, it is clear that the UI code is also redundant.
The mw.track() and logEvent() methods don't track the Beacon API's
async fetches, which also isn't needed, since the loss of browser
context upon navigation doesn't abort background beacons.
The loading of the EL library itself is already ensured via a
dependency so we already know there won't be an async fetch for
that.
What that leaves is some portion of older browsers in which a
EventLogging falls back to 'new Image'. This is basically just
IE 11 per <https://caniuse.com/beacon>, and for those some portion
of events will have been lost since EventLogging removed support
two+ years ago for tracking those fallback fetches via a Promise
(because of the perf issues caused by what the removed code here
was able to do).
Change-Id: Idf4378f983b6ba0e755ebadb97aa6d87cf95f7a5
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
'mw' are '$' are globals, always have been, and aren't going
anywhere. They're every bit as real as their longer versions.
If anything, the longer ones are less "real" or 'stable" because
they're not used internally by RL and easier to accidentally
replace or override. For anecdotes and history, see 91f950d6b0.
Change-Id: I526fb8c961d9477992d88f2780a0ff4cbdc51923
when appearing on right side of screen
Languageselect was mostly fixed in 354378, but I forgot the
settings ones, so the triangle just disappears when
switching dialogs currently. This follows up on that and
properly fixes it.
Sidebar callouts now appear toward content regardless of
where they're appearing from, or the language
directionality. Triangles are now consistently alligned to
the top of the callout (same position in languageselect and
compact language links) to avoid issues with it appearing
over a scrollbar.
Sideways callout triangles (carets) are consolidated into a
single rendering approach and mixin across compact language
links and toolbox language selector.
Bug: T161586
Change-Id: I7717e26525ac527ede486796f49083ed40ee7d4f
Let them assume normal size with regular padding. In the case that
the buttons do not fit one line, some will overflow to the second
line. In my opinion that looks less ugly than irregular padding
and truncated language names.
Bug: T136273
Change-Id: I26dd7745ac03e1b940348b318d74d0a2bd27e1a3
jquery.uls.compact module is kept for now as some other
extensions depend on it. But it does not do anything
anymore.
There are some styles which should be in jquery.uls
upstream, but given the current state that is easiest
done in a follow-up later.
The main change is that language selection is now
compact by default: no heading etc.
Includes style changes for the dialogs, and especially
for the new position of the callout caret.
Bug: T85519
Change-Id: Iade8005439b4f58ab241752f69a5365d8bb88d2c
The ext.uls.buttons style can be removed but Translate extension use that.
Once it is separated we can remove it from ULS.
Testplan:
Use ULS settings and notice the style difference of buttons, checkboxes
and radio buttons. No functionality should be affected and UI should not
be broken in any ways.
This was once attempted in Id186ece6513f154e0388bc4170c21bdabb59038a
but we had to revert because of incompleteness
Bug: T52599
Bug: T127020
Change-Id: Ibbb2068b5036537f298fad6c49169a5b986304d5
Removed the code to log whether map(removed long time back), search,
common languages used for selecting the language.
This logs were introduced to measure and adapt UI effectiveness.
No longer needed now.
Change-Id: I83bdd250cb6474da4fbf22aed2011071b9f9eba4
- Updated versions and order of checkers.
- Some consistency updates in Gruntfile.js.
- Updates to make jscs pass.
Change-Id: I7ed93596ff383dc713bd17af2da0472be934d59d
This reverts commit 30d26a4fd2.
Some issues in this patch were identified, see T52599.
Reverting so that MLEB can be released and issues fixed and
tested properly after the release.
Change-Id: I35c1eb2db5ead8ca75dc2724997d789c83c69b6d
Replaces many of the styles with the new standard ones in mw-ui, which is
present in v1.22 of Mediawiki, the current lowest supported version of
ULS.
Might require a follow-up to reduce the amount of redundant CSS present
Bug: T52599
Change-Id: Id186ece6513f154e0388bc4170c21bdabb59038a
This patch restores the enableWebfonts preference, stored inside
the uls-preferences blob. It existed as 'enable-webfonts' in
the past and was removed in
If735a733717596fae03042c5e277bd538bd8501f
Each wiki can be configured to load the fonts by default
using the new global variable $wgULSWebfontsEnabled.
Its default value is true (to load fonts).
This also removes the preference 'uls-enable', recently added in
I71b70d8ee7c3cad7f49b32e5dc494ef4fc1bdb2f
The initialization of ext.uls.webfonts.js is changed as well,
so that minimal webfonts JS library code is loaded,
and the rest is loaded only if a user requests it.
Bug: 60304
Change-Id: I49e812eae32266f165591c75fd67b86ca06b13f0
Files:
* Consistently have one (1) new line at EOF
(.gitignore, *.css, *.sh)
JSHint:
* Separate the common (general Wikimedia code conventions) from
the local more stricter rules (nice work!).
Maintenance:
* Use simplified $IP definition where getenv is only called once.
Based on http://git.io/ve-mw-36fc3b59-makeStaticLoader
JavaScript:
* Use the same closure in all files:
- No need for "undefined".
- One linebreak between license header and start of closure
(sometimes there were 1 or 2 empty lines).
- ext.uls.ime.js: No need for "document" (redundant in general,
but especially as it wasn't used anywhere in this file).
- Use "$, mw" for all ext.* modules (one of them used "mw, $").
Change-Id: Iba5dab14bbc3fbfc9f8fe96dd2d95529587a69aa
Pressing apply button is applicable to all settings module, not only
for the one that is visible. Unless we do a validation before we save
preferences, other module can cause incorrect (old) preferences to be
saved.
Bug: 56885
Change-Id: I31df2ee0bf8b600a94e8fed1a784daf529186b16
It happens when input settings are accessed directly while display
settings are not initialized. While saving the display settings
will not be rendered, causing a js error
Change-Id: I3ef1afe67a6bcdc3047b482d697bc03baab6ac47