Changes in HTML markup that fix various bugs and lead to consistencies
with other skins:
* firstHeading now has `dir` attribute
* `tagline` message no longer parsed - plain text only - this is consistent with
other skins
* printfooter now child of #bodyContent
* #ca-view is outputted (but hidden with CSS)
* Order of attributes on #p-search-label changed
* Search input form elements are no longer self closing
* The #mw-searchButton element gains class mw-fallbackSearchButton
* The generated-sidebar class is no longer present on sidebar portlets,
consistent with other skins
* The print link disappears when ElectronPdf is installed so there
are not two print links.
Changes in functionality:
* Previously (in getCactions) a nomobile class would be added if
less than 2 tabs.
If not 1 tab, more would be appended. This is dropped.
Bug: T285989
Change-Id: I03d0dc1dad23894e7e64ceeb8956692316265144
MonoBook supports two modes - one that is responsive and one that
is not. To do this it adds 3 modules. These can be reduced to 1
module by loading all the code and adding client side checks to
determine whether to use it.
The skin--responsive class is added by core for responsive skins so
can be used to make that check.
This does lead to additional download for all users (particularly
the addition of oojs-ui.styles.icons-alerts) but given the default
behaviour is to load these, and non-responsive skin requires an opt
in I don't see this as a problem.
Thanks to gzip the increase in render blocking styles is minimal:
Before:
skins.monobook.styles: 15.21KB
skins.monobook.responsive: 16.14KB
After:
skins.monobook.styles: 16.63KB
See bug for QA plan.
Bug: T285492
Change-Id: I76bb644145539c8ec0220704c8fe9a78a4819c03
This was moved to a core preference as part of T285402
The migration was handled by a #user-notice
Bug: T285402
Change-Id: I25fe3d32ad929924034db06b5a95bab6a3a3a727
If the general skin-responsive setting is set, let it overide
monobook-responsive preferences
Eventually remove monobook-responsive when the affected users
have migrated to the general pref (or they're migrated, if necessary)
Bug: T285402
Depends-On: I4e567199a92c0492dac0561a5c7844f6c5c239e6
Change-Id: If6e405eaf1e4c3ac396fdcf2da31501ea3f65b53
For consistency with other skins, its easier to see how hooks are
invoked when they are separated from the skin.
The skin is also updated to use namespaces and modern skin registration
which has been available since MediaWiki v1.36.
Change-Id: I1c93d4e817b53c93eba47ee9086c86c5d75443e5
* Removes the class from site notice - this provides no styling benefits
inside MediaWiki and is inconsistent with other skins. If site styles
need to target this element they should use the siteNotice id
* Replaces mw-body-content class with monobook-body and adapts existing
styles. The mw-body-content class will soon be applied to
$this->get( 'bodytext' ) instead. The core change
I3a91b294fcb3724cd46743e497dff723de0490a6 will shift this class to the
child element. There are no styles outside Monobook that rely on this
class and only 45 Monobook specific site/user styles that could be impacted.
The new class is prefixed monobook to avoid confusion with classes that
originate in core that are prefixed `mw-`
Bug: T279388
Change-Id: I90d85c21f4a62e6697f24e3ce388445a0a53c2b0
For callers calling `$this->getFooterIcons( 'icononly' );`
`$this->get( 'footericons' )` can be used instead.
Note the output HTML should be identical.
BaseTemplate::getFooterIcon
will unset any items that are not arrays, but upstream changes
have made this unsupported. Using SkinTemplate::getFooterIcon
will also ensure that all icons have width and heights if not
defined which is better for performance.
Bug: T267447
Change-Id: Ia5278884a10173a509b7ae50b8407774c5d8719b
The anon placeholder is now provided by core.
The ULS extension hack is no longer needed.
Bug: T263382
Change-Id: I008511f5fc326bca10f2c2bf4e03b2df3561b56e
Also removed is the helper deprecatedHookHack() method.
SkinAfterContentHook should be used instead.
Bug: T259400
Change-Id: I3818cf1ea26444f3736af2b48aabf8b67815008a
Having module definitions living inside SkinMonobook makes them
less discoverable. It also shouldn't be necessary - even if there
are soft dependencies on other modules.
A new file resources/optional-enhancements.js is added which will
load the two optional dependencies based on whether they have been
installed on the client.
Bug: T203023
Change-Id: If9a88db52deb0cc91d58cbb40693d4cd448eabbc
I6e69b482cdbc adds a viewport with the same value as MonoBook.
Bug: T258290
Depends-On: I6e69b482cdbc49c09adc6f7cee54f5e17b7c92c4
Change-Id: Iae529da5dba07a2eee91a1fa7b29e4bdc163aa40
The search form no longer changes based on this config variable.
Note that the variable has always been true since its introduction and
there's no way for users to turn it off, so probably the single button
search form has never been shown.
Bug: T256568
Change-Id: I86fde4f89cff553966614d725bbd6ba14d4ab1a4
Per discussion on T254546 the language portal is so long in most
articles that it pushes down other boxes rendering them inaccessible
for this reason make sure Monobook outputs it last.
Bug: T254546
Change-Id: Ib80fa6414e220fbc3c1b6e3527c32fb28b994376
Various extensions reveal the language portal when empty by appending
a link. Monobook needs to check this now itself, to avoid these links
disappearing - for example the Wikidata edit link.
Bug: T252841
Change-Id: If2cf64f6b7ba313d3e437e9da63afa886fee5d11
Currently one has to click save on "Special:Preferences" to reveal
the monobook responsive design option. As of
Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377 we can reveal this conditionally
when the Monobook skin is selected.
Depends-On: Idd06bcfe7935e16732a6a95c1253dbf95c8aca2e
Bug: T246296
Change-Id: Ibd74cc03f3ccbdc0042163c18ab0f71b6aa556f6
Since MonoBook is never cached on Wikimedia wikis, we don't need
to do anything about both modules being loaded in cached HTML.
There should be no differences before and after this change.
The change must apply to skins.monobook.styles and skins.monobook.responsive
as these modules never load at the same time (see setupSkinUserCss).
Bug: T242177
Change-Id: I5e69cd7f37f7b7a2b6325177b6688a426d92d57f
That way hook subscribers can use RequestContext and whatnot instead of having to resort to globals.
Change-Id: I1e4be7156aaea12fef75169bd0216140b9d50388
Add `@param-taint $contents escapes_htmlnoent` annotation to
MonoBookTemplate::getBox(). The method will escape the $contents
parameter if it's an array, but it will not if it's a string; Phan
can't distinguish the types, and assumes it always escapes. Use
escapes_htmlnoent to suppress warnings about double-escaped output.
Change-Id: Id8ef73f2efbe8d4d5510917d55dbac4e41b2b3a1
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0)
instead of the HTML/XML entitiy  .
Bug: T154300
Change-Id: I610c8c6a70c7561c46f80e40614f69ccedab5194
MonoBookTemplate incorrectly calls getIfExists() for newtalk/undelete:
attributes of wrapper <div> must be under the 'parameters' key.
Change-Id: I5392477d493174b0b5598927bfbcec2029b0987e