Commit graph

8 commits

Author SHA1 Message Date
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Reedy
58f0a7ee4e Wrap some long strings in tests/
Change-Id: I89d53c5051e5ee4bd8624df8ee2b25993090a7df
2015-09-26 21:01:59 +01:00
Bartosz Dziewoński
a3e6df1690 ResourceLoaderImage: Allow shorthand syntax
array( "en,de,fr" => "foo.svg" ) now means the same as
array( "en" => "foo.svg", "de" => "foo.svg", "fr" => "foo.svg" ).

Bug: T76539
Change-Id: I0bf82e06be3c5f94b6ac88bbc0437b5229ceb284
2015-04-02 21:27:06 +02:00
Bartosz Dziewoński
d469b37955 ResourceLoaderImage: Add basic tests
Also remove some wrappers from ResourceLoaderImageModule tests that
are no longer necessary, since the files they were mocking now exist.

Bug: T86334
Change-Id: If02e58716ce8e6c8327c8939c6c6425bd48bb560
2015-03-30 19:15:35 +02:00
Bartosz Dziewoński
fca3887393 ResourceLoaderImageModule: Rename 'image' in descriptors to 'file'
Like in OOjs UI. Less confusing. No one is using this yet.

Bug: T93669
Change-Id: Ib1c9af96b46ba660b3697d272129e071da1fdf18
2015-03-29 19:38:14 +02:00
Bartosz Dziewoński
8c9ff9c46c ResourceLoaderImageModule: Remove 'type' stuff
Provides no value and makes the definitions uglier. Also, the
implementation sucks.

This is a breaking change, but ResourceLoaderImageModule was not in
any public release yet.

Submitted patches to fix two usages in extensions:
* Gather: I371209afe7b48e7c215ea9912826d4eb2cacf4e5
* MobileFrontend: I1963f5fe759c3a031220157d3a6f0f3b42bc5426

Bug: T94073
Change-Id: I36cfdb09bb203b8d9958e6016447e446dd6ff78b
2015-03-29 19:37:11 +02:00
Bartosz Dziewoński
8edbfb5feb ResourceLoaderImageModule: Implement CSS selector templates
Instead of a 'prefix', a 'selector' can be specified, with a string
containing a simple template to use for CSS selector. For example:

    'selector' => '.mw-ui-icon-{name}'

'prefix' continues to work as before.

When using variants, one might want to provide separate
'selectorWithoutVariant' and 'selectorWithVariant' options.

Available variables are {prefix}, {type}, {name}, and {variant}.

Bug: T78215
Change-Id: I99ccaf25e8d24fed5afd0c4b770d2f389789ce4b
2015-03-29 17:25:02 +00:00
Bartosz Dziewoński
5ed35b04c9 ResourceLoaderImageModule: Add basic tests
Bug: T86334
Change-Id: Ie98bf5dec2d4d4c309ed5075b3191da3017f5ad4
2015-03-29 18:29:51 +02:00