IE9+ which is lowest that MediaWiki still supports is supposed to
support both ttf and woff par some exceptions.
This reduces uncompressed repo size almost 4000 bytes.
Change-Id: If80f4ec898d86d5fd4cf873d0d86245e66da2f0b
Now that Compact Language Links also started to add to this list, ULS would
show incorrect language change tooltip notifications. ULS interface language
selection will still keep updating the list of previously selected languages.
Refactored the code a bit: 1) created minimal Store that wraps around plain
localStorage, since mediawiki.storage cannot be used yet. 2) Inlined the
userHasChangedLanguage function to new initTooltip function. 3) Split parts
of the huge initInterface to new initTooltip and initIme functions for
increased readability. 4) Solved a TODO for moving language change recording
out of the tooltip showing code.
Change-Id: If8478a59168d89264f4d46938ac865c0c9a04f25
This is already expected by the callers. Added addPreviousLanguage
to make updating the list easier.
Change-Id: Ie4f888235ea4de4a2ce6bf5a9f24955e423e8c48
The benefit of this is that '/' is no longer escaped, making
ext.uls.webfonts.repository.js file 376 bytes smaller. I expect
that the difference in compressed size is neglible.
Change-Id: I77c0b88fa23f2245f09615c354546b6a9ebf650c
This is now new standard way of doing this in MediaWiki.
Since this makes the font repo bit longer, compensated by no
longer providing version information, which also simplifies the code.
Uncompressed increase is 542 bytes.
Depends on https://github.com/wikimedia/jquery.webfonts/pull/45
Bug: T135806
Change-Id: I1921115fc1abc20e6e756044c0a84a9fe4133884
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
Load jquery.uls only when the trigger is clicked.
Reduces the initial footprint by 63.9 KB (uncompressed)
Bug: T135210
Change-Id: I972cb6ea1794485917ea530f7abe68bdddc2014f
Modern browsers will use woff2, which has smaller size than woff
Updated the README in the font repository explaining how different
file formats are produced.
Bug: T128291
Change-Id: I81c5380fdbf0ff76142b67cf8fce9db20e8164fa
It re-triggers mw.uls.getFrequentLanguageList(),
getPreviousLanguages() and localstorage read.
In this patch the result was saved and reused.
Bug: T122341
Change-Id: I14839eb611cd3e995e8d8ab729ee3f714840f9ad
We don't need plugin pattern here since it is not meant for a use
in multiple contexts. Code simplified.
Change-Id: Iee86069aaa82f5a9ab3a856c19360e9ea89211ad
Includes changes to the generated repository file
because the script had not been run for last update.
Change-Id: I6b5d1ce980c6e5b42e36c0044729536b6b0ae4dc
We had a browser check to blacklist all browsers older than IE 8
IE <= 7
But that is no longer required since JS support is not there for such
browsers as per https://www.mediawiki.org/wiki/Compatibility#Modern
We can support all modern browsers listed there and we don't need
additional blacklisting now. From 1.27 onwards, there is no JS loaded
for IE 8 too. So we can just use MW browser support policy.
In this commit, the code to do brower checks removed and simplified
the initialization code. Still I am not happy with the interface module,
that need further refactoring.
Change-Id: I655826c55fb2c7c5c88f16368110142d64a96eec
Test plan:
* Remove localstorage and cookies for a site
* Go the the site
* Change language and observe the undo tooltip
Change-Id: Ibecb5ea1cd537b2f019e7a9aa67ffac1a4e0923d
These changes affect anonymous users:
* Old code to restore preferences from jStorage removed
* No cookie used anymore
Bug: T100639
Change-Id: I3cfec447703d9c67cd2310ec4acc5692ad76be8e
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
Interlanguage lists can contain language codes that are redirects
in language data of ULS.
For example, sr is a redirect to sr-cyrl.
So, if sr is passes as one of the language to ULS, its region, script
grouping is failing and the end result will be missing them in the ULS
language list. This should be properly fixed in jquery.uls library.
Tracked at https://github.com/wikimedia/jquery.uls/issues/207
In this patch we are following a simple approach of passing the language
codes to ULS as redirect resolved.
Bug: T100002
Bug: T131005
Bug: T126909
Bug: T123834
Change-Id: I8b89edb60b4d2c6f2b25c8589569f748c5523722
The pointer arrow of the ULS was not aligned with the 'x more' trigger
and it missed shadow. This commit fixes it.
Notably, we replace the old arrow with a box rotated 45 degree so that
we can apply the shadow very easily.
Bug: T130633
Change-Id: I4d36f3ee9fcfea932e10208518a03e7b246a7abe
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
Move the showTipsy calls into the callback.
Move the declaration of the functions hideTipsy and showTipsy before the
new call position.
Also change the order of the declaration of the functions hideTipsy and
showTipsy to avoid a forward reference in showTipsy. Spotted by JSLint.
Bug: T118507
Change-Id: I338a78cde249405459be14948b78cf59d715145a
T122341:
* Move hideOriginal() call to right before render() to reduce repaint flash.
* Use plain css() instead of show() and hide().
* Use native getAttribute() instead of jQuery().attr.
Other minor clean up:
* Fix jsduck syntax.
* Consistently use 'location' instead of 'window.location'
(mostly the case already except for one).
Bug: T122341
Change-Id: Ief76fe7c0fb2bfca3468361ebab14c1dfb1df4c2