* renderPortals() - Takes array only, enforce this with a type hint.
* renderPortal() - Actually takes either array or string as $content,
fix the type doc to match the code.
* renderNavigation() - Simplify by removing support for non-array
$elements, fixing one caller.
This and other minor changes are tracked under T140664, which intends
to reduce code complexity in Vector to (potentially) make it portable
to an HTML template.
Change-Id: Idc95d023a55c83450b041109745cfbcbcd04f580
The naming the parent classes of these is quite confusing.
Specifically how "SkinTemplate" is not a skin template, rather it is a Skin
subclass that *uses* a template.
The "skin template" itself, is VectorTemplate << BaseTemplate << QuickTemplate.
Change-Id: Ie8997c5390d24cd38cdb12f97a87f8868a0b00d2
Instead of implementing keyboard (and mouse click) handling in
JavaScript, put an invisible <input type="checkbox"> into the
dropdown handle. It can be focused and toggled using keyboard
actions like a normal checkbox. This checkbox also takes over
the duties of handling mouse hovering and clicking.
Old JavaScript and CSS are left in place for compatibility with
cached page HTML, to be removed later in a follow-up.
Bug: T168080
Change-Id: I27532140b06c97921f1cfb64e44bff814d99a358
To some degree the literal HTML was (maybe) useful and self-documenting
at some point when the template was really simple, but until and unless
we really use an Html template for this, it's probably a lot easier to
maintain, understand and review (incl. from security perspective) if
we consistently use the Html class abstraction.
For now, I'm only focussing on cases where there is mixed literal HTML
with embedded PHP statements. The cases where HTML is created plain without
embedded PHP I'm leaving untouched for now.
Any case where attribute or content comes from PHP, use the Html class
instead to clearly indicate which values are escaped, and which are not.
Change-Id: Ib2d6425994918b0c17ef29c1b5d0f9893f61a889
Consistently do the following in this file:
* Consider '<?php' the start of a block indented level, like other code blocks.
* Don't increase indentation between the opening of '<?php' and the top scope
within, consistent with other PHP files and most of this file.
* Don't manually create tabs or new lines to try to align with the HTML,
this is a pointless excercise that already doesn't line up anyway. It just
creates more arbitrary whitespace. Most portlet, personal, sidebar stuff
is already not doing any indentation, this removes some of the remainder,
at least in places where it was manually being emulated. The natural stuff
stays for now.
* Remove some arbitrary line breaks.
Change-Id: I42627ac8473604c7c1309db370302f5ee5f1df0e
tabs such as read/view source are collapsed into more in screens
whose resolution is less than 700 px so that they don't wrap to
the next line and cover the content of the page
Bug: T56919
Change-Id: I30e0642d3cb93c4d9a8b2bdfb7f04912d8ca8649
This affects the four tabs menus (namespaces, variants, views, actions).
Other menus (personal menu and sidebar) have already been using it.
We need some minor overrides to get the same results as the hand-built
HTML, but I think this still makes the code a lot nicer.
The output is the same as before, except for unimportant whitespace
differences and the order of some tag attributes.
I tested this with several extensions and configuration options that
mess with the tabs:
* $wgUsePigLatinVariant = true
* VisualEditor extension
* FileAnnotations extension
* FileExporter extension
* Viewing the page as administrator
Change-Id: I2d1255442abf5fa4bac2de1b084d0bcacbba7d0f
The <div> was introduced in aba11a7b but this is not valid in HTML 5.
This change ommits the <div> and attaches the background image to the
existing <span>.
Cached HTML with the <div></div> does not matter for the result.
Bug: T169551
Change-Id: I04f7032b6f6bafe10548fde690f55de66b56f61f
This change prevents that a middle click opens a new tab with the URL "#" and
prevents a wired outline around the button when selected of focused in Chrome.
The selector "> a" will be removed in a separate change which must get
deployed not before the HTML cache has expired.
Bug: T44241
Bug: T68388
Change-Id: I7255552d3bdec9e40727721b91630623ae24a08b
Show "Not logged in" message left or right (depending on language) of an anon
user's personal tools in case general edit permission is given.
The display of the message was previously done in MW core
(SkinTemplate::buildPersonalUrls, introduced by I6f44e3e5d), which needs to be
reverted first (done in I5cfa9b4e).
Bug: T127758
Depends-on: I5cfa9b4e
Change-Id: Ic560d3fd4e9f6ad194e6ff928c8749084af311b5
Also fixed files to match coding standards. (Checked against
tools/codesniffer v0.2.0)
Bug: T90943
Change-Id: I38dcb7a5389cf6986dc1247b9291bfb1ad3fca7d
MediaWiki has provided rel=archives for the History link since v1.15.0
(Introduced in r45988 / 4299d27956.). However Vector never used that
property until now.
Change-Id: I398828b62795955a73823decf00fdbf8496aaeca
A numeric string set as key of an array gets casted to an integer. Since
I458c0af3114754ddf3d721f6c374e249f482e4cf wfMessage does not except
integer as message key, therefore cast the heading name back to string.
Bug: T73639
Change-Id: I376fb49d03251a71372738c531a09f014540b958
When status indicators were added, backwards compatibility was unnecessarily
broken. This makes things like looking at old non-rebased branches, or running
git bisect, unnecessarily annoying. This change adds an is_callable to restore
backwards compatibility and removes the version check that was added in response
to this break.
Change-Id: Ia05aa73a1b027e667c52f54b6d6fdf6f42bbbadf
mw-navigation is a collapsed div because all of its children
are absolutely positioned, and it's in a totally useless
place. Instead, point to #mw-head, which is where we pointed
to originally before it was changed to #mw-navigation.
This reverts 75858d59d from when this code was still in MediaWiki core.
Bug: T78207
Change-Id: I5e1f0edbf80f6f5f330df73cb06e4b0ee4323905
Removing backwards-compatibility CSS from an earlier change.
Follow-up to Idf43d77dccff83ad81db776f3262e0ef12d25c92.
Change-Id: I2817c6e9eb52ffc785a04bb9d23b0802a553fd45