Commit graph

11 commits

Author SHA1 Message Date
Bartosz Dziewoński
485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
2018-05-30 18:06:13 -07:00
VolkerE
9bb94b0ac8 Revert "Support changing icon variants on hover"
This reverts commit 46c62ff5f4. After reconsidering menu item treatment under UI Standardization perspective, we don't need and shouldn't use such pattern.

Bug: T110051
Change-Id: I0e8b6035f516e6629010b4f18471445c8833156e
2017-12-05 18:00:29 -08:00
Bartosz Dziewoński
c8ad83310f Refactor registration of OOjs UI resource modules
includes/resourceloader/ResourceLoaderOOUIModule.php
* New trait centralizing some logic for dealing with OOjs UI themes,
  previously duplicated in OutputPage, ResourcesOOUI.php and
  ResourceLoaderOOUIImageModule.
* Follow-up change I74362f0fc215b26f1f104ce7bdbbac1e106736ad uses this
  as a base to allow skins/extensions to define new OOjs UI themes.

resources/Resources.php
resources/ResourcesOOUI.php
includes/resourceloader/ResourceLoader.php
* OOjs UI resource module definitions are moved back to their rightly
  place in Resources.php. They are again (almost) normal and static.
* Theme-specific logic is now handled by the module code, definitions
  only specify 'themeScripts'/'themeStyles'/'themeImages'.
* ResourcesOOUI.php is deleted and no longer loaded by ResourceLoader.

includes/resourceloader/ResourceLoaderOOUIFileModule.php
includes/resourceloader/ResourceLoaderOOUIImageModule.php
* Glue code previously existing in ResourcesOOUI.php now lives here.
* Use the ResourceLoaderOOUIModule trait to avoid code duplication.

Change-Id: I39cc2a735d9625c87bf4ede6f5fb0ec441d47dcc
2017-06-01 17:04:05 +02:00
James D. Forrester
7668836236 Update OOjs UI to v0.22.1
Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.22.1

Depends-On: I4ee36222e67697a7290a1ac94788676e476ca768
Change-Id: I964a298018d837b1a05a1608a81ca0544f34a2c8
2017-05-31 12:27:05 -07:00
Bartosz Dziewoński
5af0c8f2be ResourceLoaderOOUIImageModule: Actually load non-default themes' images
Values in SkinOOUIThemes are TitleCase, but these filenames are
lowercase. And we silently ignore missing files. This only worked for
the default theme, which is hardcoded to lowercase 'mediawiki' above.

Change-Id: I5b14d65a8f7d5219acfa2a40eabbb13617833b26
2017-03-17 03:30:22 +01:00
Bartosz Dziewoński
519d578697 ResourceLoaderOOUIModule: Minor code quality fixes, and more comments
Change-Id: Ibc7195cc68e1a46062612635988bd16d8145ab63
2017-03-17 03:29:29 +01:00
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
paladox
dca469bb87 Fix phpcs warnings
Bug: T102614
Change-Id: Iecea365f83bbb0c336b58f1cfdebfc9b1112087e
2015-06-18 20:13:37 +00:00
umherirrender
d8821f2b0b Fixed spacing
- Removed space after casts
- Removed spaces in array index
- Added spaces around string concat
- Added space after words: switch, foreach
- else if -> elseif
- Removed parentheses around require_once, because it is not a function
- Added newline at end of file
- Removed double spaces
- Added spaces around operations
- Removed repeated newlines

Bug: T102609
Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
2015-06-17 20:22:32 +00:00
Matthew Flaschen
d8673b072d Fix variants for OO UI images
Fixes T101895, caused by https://gerrit.wikimedia.org/r/#/c/212917/

Bug: T101895
Change-Id: Icd9af0d2eba2a62a1761cb9c9dcd90fc736c2b39
2015-06-09 15:51:59 -07:00
Bartosz Dziewoński
1fc57830e2 OOUI theme support
* Split off OOjs UI's module definitions to a separate file from
  Resources.php.
* Extend ResourceLoaderImageModule to support per-skin images and
  variants.
* Allow skins to specify their preferred OOjs UI theme using new
  skin registry attribute 'SkinOOUIThemes'. The default remains the
  'mediawiki' theme, 'apex' can also be chosen now.
* Implement custom ResourceLoaderOOUIImageModule which implements some
  special sauce required to shoehorn OOjs UI image set definitions into
  ResourceLoaderImageModule with skin-specific styles support.

Bug: T100895
Change-Id: I3fbacbce95126a4cc29221352f3ef846f41e7b1b
2015-05-31 22:55:13 +00:00