Commit Graph

84 Commits

Author SHA1 Message Date
Niklas Laxström
fd636d1f5f Remove jquery.uls.compact resource loader module
All known users of this module (CX) have stopped using it.

Change-Id: I0827b37a92e56f40433a197b275a0d0dd44cefe2
2016-05-24 08:35:07 +02:00
jenkins-bot
384b109362 Merge "Update jquery.uls and adapt styling" 2016-05-23 11:09:01 +00:00
Niklas Laxström
4ff7d5adf8 Add tooltip to the "more languages" action to provide better context
Bug: T135224
Change-Id: I3c5d909ff334182e25b48fd3917260087ee276ef
2016-05-19 08:56:04 +00:00
Niklas Laxström
a19e8c0dba Update jquery.uls and adapt styling
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
2016-05-18 11:40:58 +02:00
Santhosh Thottingal
cbb46f7451 Compact language links: Delay loading of jquery.uls module
Load jquery.uls only when the trigger is clicked.
Reduces the initial footprint by 63.9 KB (uncompressed)

Bug: T135210
Change-Id: I972cb6ea1794485917ea530f7abe68bdddc2014f
2016-05-17 14:55:51 +05:30
Santhosh Thottingal
d778cc88a4 Add jquery.uls.data as depedendency to ext.uls.init
ext.uls.init has references to jquery.uls.data

Bug: T135210
Change-Id: Ib6ff791ff79b09af60494a1f61016d7982eb1fae
2016-05-17 11:02:19 +05:30
Santhosh Thottingal
02da4454e2 Add config to enable compact language links for anonymous users
By default, the value is false.

Change-Id: I16dd24182c6e2b8e5e63ebfc0ea305a3511a9e1d
2016-05-16 11:20:56 +00:00
Santhosh Thottingal
35e7d72e35 Add config to enable compact links for new accounts
By default the value is false.

Change-Id: I30e9c3d929158d9ebe90edfcb10c90712ad294f9
2016-05-16 15:07:20 +05:30
Santhosh Thottingal
f1995bc603 Introduce a preference to disable compact language links
Bug: T133030
Change-Id: If9ec0b8c75c59c62991f0d4bfa99f6d4c9324c30
2016-05-13 14:51:21 +02:00
Santhosh Thottingal
aa4e4b417d Introduce a config variable to enable Compact language links by default
Configuration: ULSCompactLanguageLinksBetaFeature
Default value: True

Bug: T134145
Change-Id: I8d4e97653daf7fcee9175c6d7cefb5c5abb22305
2016-05-09 08:40:53 +00:00
jenkins-bot
b871779a41 Merge "Remove wgULSCompactLinks configuration variable" 2016-05-09 06:33:19 +00:00
jenkins-bot
897d4f7f72 Merge "Refactor font repo compiler so it can be reused" 2016-05-02 04:37:53 +00:00
Santhosh Thottingal
695ea37918 Remove wgULSCompactLinks configuration variable
This was used to expose Compact language links as beta feature.
Now a days, we want it as beta feature unconditionally and this
configuration does not make sense. So removing.

Bug: T134145
Change-Id: I40d5c07064b5f407ec37837b0835e0698f3a5256
2016-05-02 04:11:13 +00:00
Niklas Laxström
c99a30bf80 Simplify code by using Object.keys
Guaranteed by es5-shim.

Change-Id: Ifd698dc03fd8e755e95ec6c4856ec3683cc3305d
2016-04-22 12:49:15 +02:00
Niklas Laxström
85f7ebdd4b Delay compact language links language selector creation until click
No point constructing the selector when it is used.

Task: T122341
Change-Id: I928f9041a95e2c48625dba6e11550ac6bbdcb7fd
2016-04-22 10:19:21 +00:00
Santhosh Thottingal
cac3e709de Compact links: Add png background image for trigger
Converted the css to less file too.

Change-Id: I2f01c170336b0d19f0dbac10ebd9a3eac769d104
2016-04-19 14:23:04 +02:00
Niklas Laxström
651f8bc1c3 Refactor font repo compiler so it can be reused
Includes changes to the generated repository file
because the script had not been run for last update.

Change-Id: I6b5d1ce980c6e5b42e36c0044729536b6b0ae4dc
2016-04-14 10:12:20 +02:00
Santhosh Thottingal
a29db92746 Remove the years old cookie to localstorage migration code
Change-Id: Icf82e040b7e3f015cb4cbb9b9c7ed4dee240f017
2016-04-12 06:59:12 +00:00
Santhosh Thottingal
64eab95b94 Remove browser checks and use MediaWiki browser policy
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
2016-04-12 12:12:35 +05:30
Santhosh Thottingal
a3c63f1efc Update ULS settings UI style to mediawiki.ui style
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
2016-04-07 12:06:29 +00:00
Kartik Mistry
4dfbcdc1f1 Update version before MLEB release
Change-Id: I17115957cf975bda2d2f7c5716d2941d84710616
2016-04-06 13:07:04 +05:30
Fomafix
cd58ac2f18 Use mw.Api.plugin.options to set user options
This requires MediaWiki version 1.25+.

Change-Id: I3a76b0b4ec403b3acdc29e64b0c750a3b57e252a
2016-02-15 14:13:13 +00:00
Ed Sanders
ce3f9e5358 Disable ULS on VE focusable nodes
The user isn't supposed to type when a focusable node
is selected, and the overlay renders in the top left
corner of the screen.

Change-Id: I52a7947175b4be235f77eaf0e02cebd542f8e500
2016-02-07 19:56:18 +00:00
Kartik Mistry
6e28dd3485 Update version before MLEB release
Change-Id: I5d87945a163c79df7f4a31b3e69def69aa57e8d9
2016-01-29 10:45:29 +05:30
Ed Sanders
b745fe4f6c Use background-image-svg mixin for SVG/PNG fallbacks
Change-Id: I00266b088b16fa749f3ee59d9ce4890ed025c887
2016-01-25 18:35:39 +00:00
Florian
00349ab0eb Register ext.uls.eventlogger conditionally
The ext.uls.eventlogger module is now registered depending on
the configuration variable $wgULSEventLogging. This will prevent
the Structuretest Resourcetest to fail, if EventLogging isn't
installed on the test system (like on my jenkins environment :P).

Change-Id: I1e2545492ec04fb043638765ac42f09da89813e9
2016-01-25 14:53:32 +00:00
David Chan
c68cc74f39 Remove disablement of jQuery.IME on VisualEditor surfaces
The compositionstart trigger in ContentEditableEntry#replaceTextAtSelection
causes ve.ce.Surface#handleInsertion to run, and this appears to be all the
VisualEditor integration we need. But if we later decide we need custom
TextEntry class, see the earlier revision at
https://gerrit.wikimedia.org/r/#/c/264577/3 .

Change-Id: Iad6a6eccccdf2ec9822cf7df0f0ace7a95b6bea8
2016-01-24 08:43:04 +00:00
Ori Livneh
02fe8719dc Only use jQuery.tipsy for undo popover
Per discussion on Gerrit about previous patch-sets in this change, only use
jQuery.tipsy for the undo popover. This means that in the common case (i.e.,
the user has not just changed languages), the ULS tooltip will be system native
tooltip.

Change-Id: I9206a79d59687930c26b7ef86d29bfba050691fe
2015-11-11 13:46:35 -08:00
Niklas Laxström
46f75c2cee Sync resource loader deps in extension.json and Resources.php
Added missing mediawiki.Uri to ext.uls.displaysettings, exposed
by the desync.

Change-Id: I1556ad7488ff76b89c20a8f784dd519e12e29dc4
2015-10-27 15:51:00 +01:00
Santhosh Thottingal
9fed40b83b Set default value of ULSMobileWebfontsEnabled to false
The default value of ULSMobileWebfontsEnabled is supposed to be false
as per I488e411232a1192.

And it is false in UniversalLanguageSelector.php. But in extension.json
it is true by mistake. Must be a mistake from c3322ba830

Bug: T113983
Change-Id: Ia817b0550ae1777417ef646939810c879e87608d
2015-09-29 10:57:47 +05:30
James D. Forrester
9afbea2914 Use jQuery.i18n from MediaWiki core if available.
This allows other extensions to use this too, without needing a hack to detect
ULS's existence and work around it by not loading their copies of j/i18n code.

Preserves backwards-compatibility for archaïc versions of MediaWiki.

Bug: T95666
Change-Id: I25b33437ceddb60570322b9aa51844acc42a3e32
2015-07-23 15:33:42 -07:00
Santhosh Thottingal
71e8c91d3e Add two hooks entries missed in extension.json
Bug: T105795
Change-Id: Ic53d79f7d8f7277e0768c1e461ae5d33c997a444
2015-07-14 14:32:33 +00:00
Niklas Laxström
8a7bccc5ce Set ULS_VERSION when using extension registration
This unbreaks Translate and CleanChanges who depend on the constant.

Change-Id: I8bfb9e2aaeb77351beefb130f71daeee4e07afae
2015-07-07 21:28:09 +02:00
Santhosh Thottingal
c3322ba830 Migrate to JSON configuration based extension registration
Retaining the UniversalLanguageSelector.php and Resources.php
to avoid breaking support for old MW versions. At some point,
we can validate how many old MW versions we need to support.

Bug: T87987
Change-Id: I006e968b70298b54013177aa792a4dfdf5b6aae2
2015-07-06 16:42:51 +00:00