Commit graph

85 commits

Author SHA1 Message Date
James D. Forrester
d3078c0926 build: Upgrade stylelint-config-wikimedia from 0.10.3 to 0.11.1
Just disabling the `declaration-property-unit-disallowed-list` failures
for now, but it looks like at least most of these could be switched over
to ems without breaking anything. For another patch!

Change-Id: I9220334d670f71eba1b0e392da826036d54bc2f3
2021-06-29 11:22:30 +01:00
Ed Sanders
b089533e03 stylelint: Enforce no-unsupported-browser-features
Change-Id: Ic4fb9d27aa94594584327a3d1fc5495861e09ebd
2021-06-05 14:42:03 +01:00
Volker E
14dc9229b4 Unify list-style CSS
`list-style: none none` was a workaround for an IE 6 & 7 rendering issue.
Same goes for `list-style-image: none; list-style-type: none;` combination.
Let's unify to shorthand `list-style: none` for any non-ancient browser.

Change-Id: I05f00db8a08a9fc1523ea00fab91e91d3c00cab3
2021-05-03 01:26:50 -07:00
jdlrobson
046c0b8a9a Installer: Simplify stylesheet
The installer needs a handful of the styles provided by
ResourceLoaderSkinModule. Reduce it to the minimum required in
preparation for the deprecation of the `legacy` feature.

Bug: T232903
Change-Id: I6a718232897448a94fe1ddda547ae5a5c671b7aa
2021-04-20 00:53:13 +00:00
jdlrobson
251405ed02 Installer: The installer should use .warningbox for styling warnings, not .mw-infobox
Bug: T232903
Change-Id: Ibf6426ab90445d7aac94d59336e25957cf48fc1f
2021-04-15 20:55:44 +00:00
Amir Sarabadani
ba3a2b0c40 Use the new mediawiki logos
These logos are approved as part of a community decision making in https://w.wiki/33kx
(Long URL [1]). The rights have been transferred to WMF now.

License: CC-BY-SA 4.0
Author: https://commons.wikimedia.org/wiki/User:Serhio_Magpie
Source: https://commons.wikimedia.org/wiki/Category:MediaWiki_logo_(2020)
[1]: https://www.mediawiki.org/wiki/Project:Proposal_for_changing_logo_of_MediaWiki,_2020

Bug: T268230
Change-Id: Ia588ca79a721f4796e7fe688dd7e538a009f706d
2021-04-01 01:22:33 +02:00
jdlrobson
ee0c7798cc Mark .mw-infobox styles as deprecated
Now that Html::infobox is deprecated in 1.36 let's make sure it's
clear the styles are too.

No release note is needed given the already existing note about
Html::infobox.

Styles are copied to the installer for now, but please note
their future standardization in T232903.

Bug: T268194
Change-Id: I5f7929e698c99e73f5186aa4d9bfe5f7788c12a1
2021-02-09 12:46:18 +01:00
jenkins-bot
9f868e6803 Merge "installer: Add overflow:hidden to help box" 2020-05-28 20:36:41 +00:00
jdlrobson
28090bfe39 installer: Add Installer-specific stylesheet
Follows-up 00e8bde685, which removed loading of Vector styles.
Let the Installer maintain its own appearance instead.

Bug: T248133
Change-Id: Ibdb0a72083a837a369d8d660c79fecd5aac55407
2020-04-03 21:00:19 +00:00
Fomafix
4e7c376d29 installer: Add overflow:hidden to help box
This avoids an overlap of the help box with the floating page list.

The min-width:min-content prevents that long words get cut.

Change-Id: I2d9f38e84d6030de6b00f7105a8373ff9b69e0f9
2020-03-30 14:42:52 +02:00
Jforrester
c9d34f345c Revert "mw-config: Avoid nested calls to dirname(), use levels"
This reverts commit 7099094805.

Reason for revert: Let's maintain PHP4-compat.

Change-Id: I47b9b758fc3cf4df5c49bd148706f69e567b2440
2020-02-07 17:55:04 +00:00
Derick A
7099094805 mw-config: Avoid nested calls to dirname(), use levels
`dirname()`: https://www.php.net/manual/en/function.dirname.php,
has a levels param that can be used for indicate the number of parent
directories to go up!

Change-Id: Ibdf6fbedbcf9b0eead1cfbf822d24ccae6652f3f
2020-02-04 16:53:09 +00:00
Aryeh Gregor
0de9c47b50 Remove Language::factory and getParentLanguage use
Change-Id: I11f8801ef47ec1a1f63d840116e69667e6f3ae3c
2019-10-27 12:34:28 +02:00
Volker E
05bd4c6aa5 Remove obsolete IE 6 & 7 specific comments
Bug: T234582
Change-Id: I9c29ba771d7963492d9cc231069a5283c1ee7760
2019-10-04 19:01:56 +00:00
Volker E
93643275a0 Remove IE 6 & 7 hasLayout hacks
Bug: T234582
Change-Id: I029f41c468a4d7bae9b0d2657dacb91401c8f91a
2019-10-04 19:01:48 +00:00
Volker E
4d8763ef49 Remove unused .success-box class
Change-Id: Ie5ecaed60fc7f6342301550c57b238044c20e4a4
2019-09-17 15:24:24 -07:00
Ed Sanders
689d07b81d build: Update eslint-config-wikimedia to 0.13.0
Change-Id: I7df5840bc97f8bbcd8cfc875c2b48b3061ef2c9e
2019-07-05 13:32:26 -07:00
Fomafix
1dc40b1cb3 Installer: Use HTML/CSS instead of JavaScript to toggle the help message
Changes in the behavior:
* The expanding/collapsing now works even with disabled JavaScript.
* There is no FOUC on loading anymore.
* The animation on show/hide is absent.

Change-Id: I1b88d8e2cdbb1c969670a7a8637dba10bf447330
2019-06-15 12:29:07 +02:00
Fomafix
0f346d6822 Installer: Move style of background image from HTML to CSS
Change-Id: I5fb8a9fc87290c407be123238397accbc5a886dc
2019-06-14 10:46:40 +02:00
James D. Forrester
ae3f5f12ff linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)
Wow, so many opt-outs, and a lot of probably-not-going-to-change ones.

Actually wanted pattern:
* "^mw-…"

Content-related classes we're probably not going to scrap:
* "^wikitable$"

Hard-to-change classes used in lots of skins:
* "^toc$"
* "^toctoggle$"
* "^tochidden$"

Necessary for over-rides/specificity battles:
* "^oo-ui-…"

Probably worth considering changing soon:
* "^client-js$"
* "^client-nojs$"

Some of the exemptions have been applied to deprecated styles (where they're being
renamed); some are for code in entirely deprecated areas themselves; some have the
"wrong" name but sit alongside classes with an appropriate one. And some are, very
clearly, in the wrong repo. Such sigh.

Change-Id: I9b8423d53b6750b5ca79d2f69e111f75c93c5bdc
2019-04-12 10:18:45 -07:00
Thiemo Kreuz
a2c1d8c043 Use the WebRequest::getCheck() shortcut where possible
This is inspired by Ib117e05.

As far as I can tell this is functionally identical. Even arrays should
behave the same, as both the getVal() and getCheck() methods do have a
special case that returns the `null` default in case the user tried to
pass multiple values instead of a single scalar.

Change-Id: Id4e4ec91f39d3c39461bd41673bdafc3bde11737
2019-03-11 09:50:52 +01:00
Derick Alangi
770ee82374 installer: Code augmentation in wfInstallerMain function
Cleanup null checks and string literals in wfInstallerMain function.

Change-Id: Ib117e05faf899b0c46820d337f1bd3ebd4272419
2019-03-09 17:43:02 +01:00
Derick Alangi
41822a6b9e installer: Get WebRequest in mw-config via RequestContext
Change-Id: I535a91d09cc74ab08b782973a946dcf3fc3e6b46
2019-03-09 15:42:45 +00:00
Ed Sanders
9097f95ecc build: Update eslint-config-wikimedia to 0.11.0
Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b
2019-02-20 23:36:03 +00:00
Ed Sanders
b3e490bba6 build: Update eslint-config-wikimedia to 0.10.0
Change-Id: I2930bcabeeb7b7b2eb36063e77b26e664a691b43
2019-01-08 17:40:11 +00:00
Volker E
d939ca58a4 build: Upgrade stylelint-config-wikimedia to 0.5.0 and make pass
Change-Id: I648375927bace5fc21bd842268c645570759ce85
2018-11-28 16:30:32 -08:00
Volker E
14f60cb34c Add generic font-family fallback
Change-Id: I65fb9eff81729f7d320d0fa73f88e6c8c5571100
2018-11-16 20:36:05 -08:00
Timo Tijhof
e6763161e7 PHPVersionCheck: Remove obsolete load.php code and simplify
* Remove obsolete handling for 'load.php', which no longer
  uses this check. This hasn't been used for several releases.

* Remove the 'entryPoint' parameter in favour of 'format',
  which it was already a proxy for.

* Move the double dirname() logic to mw-config/index.php.

Bug: T189966
Change-Id: I343216442475d36e61213900f196ab6ec5f6b747
2018-10-28 14:12:54 -07:00
Timo Tijhof
add9bd191f resources: Strip '$' and 'mw' from file closures
Follows-up Id6d13bbea6:
- '$': mw.loader.implement does this already.
- 'mw': Use the canonical name directly.

This replaces the following patterns:

File closures (common):
- `( function ( $, mw ) {`     => `( function () {`
- `( function ( $ ) {`         => `( function () {`
- `( function ( mw ) {`        => `( function () {`
- `( function ( mw, $ ) {`     => `( function () {`

File closures (rare):
- `( function ( mw, $, OO ) {`    => `( function () {`
- `( function ( mw, OO, $ ) {`    => `( function () {`
- `( function ( mw, document ) {` => `( function () {`

Combined dom-ready and file closure (rare):
- `jQuery( function ( $ ) {` => `$( function () {
- `jQuery( function () {` => `$( function () {

Remaining references in files without a closure, as found by
the new ESLint setting (rare):
- `jQuery`    => `$`
- `mediaWiki` => `mw`

Change-Id: I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b
2018-09-14 00:59:27 +01:00
Fomafix
31a472655b installer: Do not wrongly hide namespace input field
When the radio button is already on "other" then the input field for
the namespace should not get hidden by JavaScript on load.

Also remove the readonly attribute in HTML because the readonly
attribute can not get removed with disabled JavaScript.

Change-Id: I8cfde90d791765234572caf00b731881ac2eda48
2018-05-08 02:39:52 +00:00
Timo Tijhof
fd8a4c707a installer: Clean up ext-dependency jQuery code
Follows-up c8833d8e8e.

* Select the input elements by class to avoid accidentally trigging
  on unrelated elements elsewhere on the page in the future, given
  the generic selector.

* Use on('change') instead of deprecated change() alias.

* Set properties directly instead of via prop() indirection.
* Get attribute directly instead of via data() indirection.

Change-Id: I5158aa26b5fd7327d6795f0a31bbffbe99043fbf
2018-04-18 03:14:30 +01:00
jenkins-bot
cb20bab28c Merge "Handle extension dependencies in the installer" 2018-04-17 15:18:39 +00:00
Kunal Mehta
c8833d8e8e Handle extension dependencies in the installer
As there will likely be extensions bundled with the 1.31 release that
depend upon other extensions, we should have the installer prevent users
from enabling extensions that depend on other, not-enabled extensions.

We can build a dependency map from extension.json's "requires"
component. On the client-side, we'll first disable all checkboxes that
require other extensions, and evaluate each checkbox click, updating the
disabled checkboxes as possible.

This required some refactoring of how ExtensionRegistry reports issues
with dependency resolution so we could get a list of what was missing.

While we're at it, sort the extensions under headings by type.

This does not support skins that have dependencies yet (T186092).

Bug: T31134
Bug: T55985
Change-Id: I5f0e3b1b540b5ef6f9b8e3fc2bbaad1c65b4b680
2018-04-13 15:28:40 -07:00
Kunal Mehta
b3db0b5be1 installer: Hide empty textbox if no extension tables were created
The textarea is for extension update messages to go, but in some cases
extensions don't create any tables so you're left with an empty,
confusing textbox. Hide it with CSS if it's empty, since that's an
expected condition.

Bug: T48802
Change-Id: I798d07d1d6ed65011e9f2a2ac5cc77ad0595df7d
2018-04-12 00:24:47 -07:00
Kunal Mehta
24ae4318b3 Don't use phpcs:ignoreFile to selectively ignore sniffs
Because it doesn't work. `phpcs:ignoreFile` is intended as a performance
shortcut, and gives up on the file as soon as that token is found.
Instead, use `phpcs:disable` which does support selectively disabling
some sniffs. And since disabling is local to the file, there's no need
to re-enable it at the bottom of the file.

<https://github.com/squizlabs/PHP_CodeSniffer/issues/1903> has some
relevant discussion and clarification from upstream on this.

And make the files that are now being re-enabled pass PHPCS.

Change-Id: Ia4d8c45045f61cf9f24eb1d8631ff98d99c82d69
2018-04-08 17:08:53 -07:00
Kunal Mehta
445622563f installer: Fix setting a custom $wgMetaNamespace
`$textbox.removeProp('readonly')` has no effect and leaves the input
still as readonly, so instead use `$textbox.prop( 'readonly', false )`,
which does work.

Bug: T188415
Change-Id: I898c5605caf383cc992a948f14294193460f761b
2018-04-06 16:02:49 -07:00
Umherirrender
255d76f2a1 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable

For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore

Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
2018-01-01 14:10:16 +01:00
Ed Sanders
2c03d167fa build: Upgrade grunt-eslint from 19.0.0 to 20.0.0
Most indent and escaping fixes.

Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
2017-07-18 16:57:03 +01:00
Umherirrender
b5cddfb27b Remove empty lines at begin of function, if, foreach, switch
Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
2017-07-01 11:34:16 +00:00
James D. Forrester
fdf499f2ff stylelint: Drop over-ride for 'declaration-no-important' and make pass
Change-Id: I150acaf188c445ca983583d9de107f10d425a0fb
2017-03-01 12:55:16 -08:00
Volker E
0ea9d4ca33 build: Enable selector-list-comma-newline-after stylelint rule
Enabling selector-list-comma-newline-after stylelint rule and
making it pass.

Change-Id: I8fa3fbe03fcce57d555c47f39361c2a8d9828c3c
2017-02-23 14:15:43 +00:00
James D. Forrester
05f6ab86ca build: Enable stylelint rule 'number-leading-zero' and make pass
Change-Id: I7f6d7784b5a415d4fd4fc098800bfdf9ed61790f
2017-02-20 13:01:59 -08:00
Bartosz Dziewoński
ae6ba47c6d installer: Restore PHP 5.3 compatibility in index.php
This file should remain compatible with PHP 5.3, so that we can
actually display the error message about old PHP version, rather than
a syntax error.

Change-Id: If12f79f5d375e925291728aac7c9db18ca226d26
2016-12-11 21:29:45 +01:00
zppix1
7d16ec0619 This changes grammar, spelling and flow of the README
Bug: T141738
Change-Id: I47d4e76d88b32af10805fa5531faf21cb1d8a77c
2016-08-11 01:08:37 +00:00
Kunal Mehta
1af50341b7 Fix typo in mw-config/overrides/README
Change-Id: I1769753ad7e49b07977e15c369f479f8e42c6385
2016-06-15 22:41:00 -07:00
Max Semenik
d1effacdb1 Change the way installer overrides work
Instead of "don't edit this file, edit that file", do it settings.d
style where packagers can drop their stuff in mw-config/overrides.

I propose to backport it to 1.27 because LTS.

Bug: T135695
Change-Id: I2661ba2036b2887d31ab356751d731cc8b499f26
2016-06-09 17:05:35 +00:00
James D. Forrester
9cdbf83593 Follow-up 276c30e: Use the correct hex for the green we want
Bug: T136175
Change-Id: I4ce6010d55c361c56584a36ac252a68f0d2ee363
2016-05-26 09:38:23 -07:00
James D. Forrester
a508bb1efc build: Enforce stylelints on function calls
* Function calls to calc should use operators with spaces
* Function calls should not be split over lines
* Function calls should have a space after each comma
* Function calls should have space inside of the parentheses
* Function calls should not quote url parameters

Change-Id: Ia35f0bb5ca2dde23ce4ec90256b4fa958203e1cc
2016-05-19 16:25:09 +00:00
James D. Forrester
82d6f1d89f build: Enforce stylelints on fonts
* Font families should be quoted unless keywords (''Times'' not 'Times')
* Font weights should be named where possible ('bold' not '700')

Change-Id: I20194c2998efb71db4da5ea79234a81dc90b55ea
2016-05-19 16:25:00 +00:00
James D. Forrester
276c30ebee build: Enforce the rest of the colour-related stylelints
* Hex colours must be in short form where possible ('fff' not 'ffffff')
* Hex colours must be used over named colours ('fff' not 'white')
* Hex colours must be valid ('fff' not 'ffq')

Change-Id: I2ba04cc3ad9898c17fee3c65bb3bead834c3a1fd
2016-05-19 17:22:41 +01:00