Follows-up 285c52039b.
Get rid of mediawiki.mediawiki.action.toolbar. Not keeping a
backwards-compat alias since this module is not supposed to be used
publicly in its current form.
Change-Id: I403216c6916e1f4d29216a55c3fe6c92eb68400b
Introduced mw-ui-text base class for plain-text, non-interactable elements which require context colors (eg. icons)
Also added mw-ui-anchor for interactable elements (such as anchors)
Note: This is not supported by IE6 at current time.
Bug: 69212
Bug: 70801
Change-Id: I4d017d0a22cb4f3ca52b6228e45c0463c110ae64
This allows skin customization. This was missed since it was under
code review when the others went in.
Change-Id: I2c640fda4d2c6e40be0add52f6fc948a8e07c010
New changes:
8daef61 TextInputWidget: Add setValidation function to change pattern used to validate text
953c46c [BREAKING CHANGE] Create a MediaWiki theme
e2a3bae PopupWidget: Position body/anchor using 'margin-left' instead of 'left'
4f50c34 Correct the left positioning of a popup wrapper
afa3241 Move references to pending.gif to the themes that provide it
Update changes:
* Update links to OOjs UI distribution files
Change-Id: Ic59650b56de44807348db4df46c538756ed9329e
Follows-up I43bf828654d342893a19656ddd4151c2558d2f63.
The confirm close needs messages and jQueryMsg for parsing "int:".
Change-Id: If9a69749dcff2196dfe51a4484c6faeb98674ffa
Requires skins use the 'mw-wiki-logo' class on the logo element for the styles
to apply and to load the 'mediawiki.skinning.interface' module (or implement
their own skin module that uses the ResourceLoaderSkinModule class).
This is backwards compatible with skins using inline styles as the class only
applies when used.
Bug: 56257
Change-Id: I4e6db89a688843ac24539f8fd1b408c0d04881b3
There's a preference which makes the browser go to action=edit when double
clicking on the content. In VE we want to disable this while the editor is
open. With this check in place, we can turn it off by falsifying the value
of the preference (and then restoring the original value when VE closes).
Bug: 53058
Change-Id: I0f6225b25ad279755548361f82b855727758da2b
Compatible with IE8+ (because of the use of pseudo-elements).
This includes support for icons on the left of the element and
icons which hide the text of the containing element.
I attempted to make an mw-ui-icon-element which didn't use pseudo
elements but the problem with this is how it plays with things such
as mw-ui-button and the gutter. I'd suggest exploring this later as this gets greater
adoption.
In addition to this I have dropped mw-ui-icon-after since I don't see any
clear use cases for this yet and I think it is overengineering the solution.
Bug: 55535
Change-Id: I68a1b207d8a4af57879361921a5f8c3aeda3fd9a
Much like the similar warning on the edit page, it has been requested
that we display a warning if the user has made changes on
Special:Preferences and attempts to leave without saving.
This adapts the code from
resources/mediawiki.action/mediawiki.action.edit.editWarning.js to do
so.
Bug: 55966
Change-Id: Idb00f50ad8148cd80bd0af81b4cd06a0eb217d96
Use $nodes.updateTooltipAccessKeys() instead of
mw.util.updateTooltipAccessKeys( $nodes )
mw.util.updateTooltipAccessKeys() with empty parameter
to update all nodes is only needed in mediawiki.page.ready.js.
Copy that code to mediawiki.page.ready.js.
Adapt wikibits.js
Change-Id: I300a23e614e5f91fe2f536d958e91a47f6203021
Also, try out a way to have per-module LESS variables defined in PHP.
This might come in handy in the future… Maybe for skin theme support?
(I recommend reviewing the file changes in the order below. :D)
includes/resourceloader/ResourceLoaderFileModule.php
* Pass the context (ResourceLoaderContext) deeper down via
readStyleFiles() and readStyleFile(). We need it to compile the
.less files for the right language.
* Extract LESS compiler creation to getLessCompiler().
* Allow passing a LESS compiler instance to compileLessFile(), rather
than getting one after the method is called.
All of the changes are backwards-compatible.
includes/resourceloader/ResourceLoaderEditToolbarModule.php
* New module to support getting the language data and passing it to
LESS variables.
It might be a good idea to factor out a reusable class for a LESS
module with additional variables, but that would require more
attention to design than I gave it.
resources/src/mediawiki.action/mediawiki.action.edit.toolbar/mediawiki.action.edit.toolbar.less
* Glue code to use the language data defined by the module above and
put it in final CSS.
includes/EditPage.php
* Do not hardcode image URLs in output HTML, as they are provided in
CSS now. This gets rid of some usage of globals.
In fact, we should be able to finally move the inline JavaScript
calls out of getEditToolbar(), but I'm already introducing too many
changes for one patch. That can be done later.
languages/Language.php
* Add getImageFiles() to complement existing getImageFile() method.
Misleadingly named, it returns paths for images for the toolbar
only (and no other ones at all).
skins/common/ → resources/src/mediawiki.action/mediawiki.action.edit.toolbar/
* Moved all of the button images to new location.
Also, boring cleanup that was harder before because we treated the
paths as public API:
* Placed default ones in en/ subdirectory.
* Renamed cyrl/ to ru/.
* Renamed ksh/button_S_italic.png → ksh/button_italic.png.
languages/messages/
* Adjusting paths and filenames for the changes above.
resources/src/mediawiki.action/mediawiki.action.edit.css
resources/src/mediawiki.action/mediawiki.action.edit.js
* Added styles and updated the script to make it possible to have
non-<img> elements as toolbar buttons.
* Consolidated styles that were already required, but defined
somewhere else:
* `cursor: pointer;` (from shared.css)
* `vertical-align: middle;` (from commonElements.css)
Bug: 69277
Change-Id: I39d8ed4258c7da0fe4fe4c665cdb26c86420769c
It should have always been there, my bad. Problems with lack of the
space:
* Languages with ligatures may decide to join the last letters of
"Yes" with first letters of "No", producing a mess. (This was
reported with a proposed solution as I0e6fcd83, I opted for doing
this fix instead.)
* The "Yes" and "No" may be read together by screen readers, as
"Yesno" (although I didn't test this), and similarly misinterpreted
by other tools.
* The interface looks silly when copy-pasted.
Change-Id: I65c771fc22e105bf5978e6e4ee5068200f294b9e
* Created a ResourceLoader module for redirect page styling.
* Fixed a couple of bugs in Article code.
Keeping two of the old files for a while because they might still be
referenced by something (bug 69277 comment 11).
Bug: 69277
Change-Id: I8fa565833545e41d0232101566da8c5ffa850e36
This is a BREAKING CHANGE, as we have used the names of these three
files in skins/common/ as a "public API" for skins for a long time.
Doing so has been deprecated (but still supported) in 1.23.
We must clear them out at some point, and now is as good a time as
ever, with the 1.23 LTS release still supporting the old way.
Skins may no longer rely on the presence of commonElements.css,
commonContent.css and commonInterface.css in skins/common/ and
include them in their style modules. The corresponding ResourceLoader
modules must be used instead:
- skins/common/commonElements.css → 'mediawiki.skinning.elements' module
- skins/common/commonContent.css → 'mediawiki.skinning.content' module
- skins/common/commonInterface.css → 'mediawiki.skinning.interface' module
Follow-up to I3947eaac (where I said I intend to do this) and I56758908.
Bug: 69277
Change-Id: Id8456c570ff406822a8befad8f42f528ef5bd3a6
Redrawn the images with SVG versions.
Intentionally did not preserve the value of the 'alt' attribute of the old
images, it doesn't seem very useful to me. Instead, added 'title'
attributes on the sort links that describe their action. This should be
more useful than the old version for both visual and aural mediums.
Bug: 69277
Change-Id: Ibaec75e81d3eb8338d911ac84d91570047f475f5
* Create a CSS module for pager styling (table and navigation),
pulling in existing styles for shared.css. Load it on all pages
where the pager itself is shown.
* Build a ParserOutput object encapsulating the return HTML and
required modules, rather than only providing the HTML. Added some
hacks for backwards-compatibility with old-style calls and
soft-deprecated them (there are many usages in extensions).
Other cleanup:
* Remove styles in oldshared.css, they were all overwritten by
shared.css or by styles for .mw-datatable.
* Remove inline styles where possible, explain them where impossible.
* On SpecialListFiles, display navigation bar above the table as well
as below (this seems to be the convention for other pages).
Change-Id: Iae976f854b96b5c61691918787c4dff7db089c28
Also renamed some image files for consistency and sanity.
Added temporary symlinks to the new location for ajax.js and
wikibits.js, which still seem to get many hits for unknown reasons.
I'm going to figure this out and remove them before 1.24 release.
shared.css also appears in the access logs from bug 69277, but with
many fewer hits (it might just correspond to debug=true requests)
and failing to load a style file is a lot less problematic from
user's perspective than failing to load a script.
Bug: 69277
Change-Id: Id4a8f9470d287c73309ff526ffb88984e2d351b9
New changes:
0473209 Standardize less imports and image rule generation
4ead033 Localisation updates from https://translatewiki.net.
596d4e9 Tweak behaviour to match description in demos
8846b27 Fix typo in documentation: "nodes" (pl.) goes wo. article
611703c Fix label text in RTL demo listing containing parentheses
93c4b43 Divide CSS properties between base styles and themes
6ede2d8 Reorganize theme system
3515f5a Build with clean CSS
a24c7af Make OO.ui.Window's $content a div again
ea0172d Followup 6ede2d8: fix popup font size
d72addb Fix remaining references to 'agora' not 'minerva'
f6468b8 build: Don't copy anything other than SVG and PNG files to /dist
43f379c build: Also whitelist GIF files in the copy task
Local changes:
The "Agora" OOUI theme has been renamed to "Minerva", so correct loader.
The RTL CSS files were here by mistake, and have been removed.
Change-Id: I76e47b0b53bc5652146dd24fc403591bcc54e18b
This should facilitate the creation of third-party skins.
Previously third-party skin creators have had to either copy the relevant
lines from Monobook's main.css, which has led to unnecessary code
duplication and bitrot (to a degree), or no support for external link
icons at all.
This change set will hopefully make the main.css file of your average
custom skin about 86 lines shorter, as well as keep the external link code
and icons centralized for proper RTL support and whatnot (which is *not*
a given when it comes to custom, non-core skins!).
HTTPS' custom icon was dropped and HTTPS URLs are now given the standard
external link arrow icon. This is an intentional design decision.
New icons are Isarra's handiwork, kudos!
Bug: 63521
Change-Id: I8ecbc827f2b05aec79401ac4962fcc15387c8ad8
Follows-up fff9a814f2. Per the OOjs readme, it requires:
> (..) parser compatibility with ES3 engines.
> To support ES3 engines, ensure an appropriate polyfill is
> loaded for these methods:
> * Array.isArray
> * Object.create (basic use only)
> * Object.keys
> * JSON.stringify
The es5-shim and oojs modules already provide JSON, and most
Array and Object methods. Except for Object.create because there
are a few features in it that can't be emulated, and hence
es5-shim refuses to ship the polyfill for it.
Bug: 67590
Change-Id: I4838d78f77a3a71f80e6750adb914213b5ca4df5
The data can now be accessed via mw.language#getFallbackLanguages or
mw.language#getFallbackLanguageChain.
Bug: 69285
Change-Id: Id0c3267f01d5c4da0e4000a0fb318a9dfb538ef3