Commit graph

32 commits

Author SHA1 Message Date
jdlrobson
530de7b362 BaseTemplate::getFooterIcons is deprecated
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
2020-12-03 16:22:02 +00:00
Ammar Abdulhamid
4f9b64bd97 Remove ULS extension and anon placeholder hacks.
The anon placeholder is now provided by core.
The ULS extension hack is no longer needed.

Bug: T263382
Change-Id: I008511f5fc326bca10f2c2bf4e03b2df3561b56e
2020-09-23 21:32:48 +01:00
Ammar Abdulhamid
7f3581f05c Drop MonoBookAfterContent hook
Also removed is the helper deprecatedHookHack() method.

SkinAfterContentHook should be used instead.

Bug: T259400
Change-Id: I3818cf1ea26444f3736af2b48aabf8b67815008a
2020-09-14 11:08:32 +01:00
Ammar Abdulhamid
058fef6bf6 MonoBook: Rename searchGoButton -> searchButton
Bug: T255791
Change-Id: I9ced97b55cf5d6fb675a925825a28458ab7278db
2020-07-25 03:18:49 +01:00
Ammar Abdulhamid
cc55b0d822 MonoBook: Remove usage of $wgUseTwoButtonsSearchForm config variable
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
2020-07-11 08:51:14 +01:00
jenkins-bot
3b8d36160a Merge "Drop MonoBookAfterToolbox hook" 2020-06-26 14:07:22 +00:00
jdlrobson
cd99a29f77 Languages portal should be at the bottom of the sidebar
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
2020-06-22 16:09:48 -07:00
Ammar Abdulhamid
e93aa477aa Drop MonoBookAfterToolbox hook
SkinAfterPortlet hook should be used instead.

Bug: T255315
Change-Id: I0c8e2f69fc3debcfcbc3b8c82796193277329a3a
2020-06-22 14:47:58 +01:00
Ammar Abdulhamid
91cb084117 Drop MonoBookTemplateToolboxEnd hook
This hook was deprecated 6 years ago and is no longer in use.

Bug: T253783
Change-Id: Iabcb77eb1a4f0667dd667fd5bfc346b8d1188dea
2020-06-12 21:44:34 +01:00
Ammar Abdulhamid
5fa6a6a339 MonoBook: Drop SkinTemplateToolboxEnd hook
This hook is not in use in any deployed code.

Bug: T253783
Change-Id: I5b636f005bdcdafabbb22ea3c5acef2a49c7c5c5
2020-06-05 20:29:18 +01:00
jdlrobson
833d93500c Show after portal links when languages is empty
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
2020-06-02 00:43:56 +00:00
Ammar Abdulhamid
191aa61755 Monobook supports SidebarBeforeOutput hook
Bug: T253783
Change-Id: If8ed1ccd17b4eedea18c77d721ee45ed0d67b7fc
2020-06-01 01:08:34 +01:00
AronDemian
1587cdfb60 Add .mw-footer CSS class & replace #footer selector with it
`#footer` kept for backwards compatibility with user styles and gadgets.

Bug: T248137
Change-Id: Ied8e79c5895f8fe383b1ca743a31890549cc8d86
2020-04-24 02:28:15 +00:00
libraryupgrader
c21a70208c build: Updating composer dependencies
* mediawiki/minus-x: 0.3.2 → 1.0.0
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.9.1

Change-Id: I0cd1840109e0cdde8bce1510e1970098edc5e868
2020-01-26 18:22:20 +00:00
libraryupgrader
9879ec956a build: Updating mediawiki/mediawiki-phan-config to 0.9.0
Change-Id: I14024466c38bd61f75ac2185ea3a5372cb91c054
2019-12-15 18:07:49 +00:00
jenkins-bot
6a32ca83c0 Merge "Enhance the 'MonoBookAfterToolbox' hook by passing the class instance to the hook subscribers" 2019-07-21 18:11:17 +00:00
Jack Phoenix
9ade7fcbe6 Enhance the 'MonoBookAfterToolbox' hook by passing the class instance to the hook subscribers
That way hook subscribers can use RequestContext and whatnot instead of having to resort to globals.

Change-Id: I1e4be7156aaea12fef75169bd0216140b9d50388
2019-07-21 18:03:37 +00:00
James D. Forrester
147550142d build: Upgrade phan-taint-check-plugin from 1.5.x to 2.0.1
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
2019-07-10 17:12:44 +02:00
jenkins-bot
fa1deee55e Merge "Move DataAfterContent outside of main content block" 2019-07-08 21:18:35 +00:00
Timo Tijhof
896f88e740 Use array_merge() instead of manual assignment loop
Change-Id: I0acd669658720ec95e724fd91ef41060560b4888
2019-06-20 19:22:42 +00:00
Isarra
c86558a8b4 I have no damn clue!
Change-Id: Icf173be114856897c0663b04c1a4e19aada0e74b
2019-06-20 19:06:08 +00:00
Isarra
1e0aa01470 Move DataAfterContent outside of main content block
Bug: T226199
Change-Id: I367302e528a4df7c4b53c93caa5b4ba2bfd30e33
2019-06-20 17:43:25 +00:00
James D. Forrester
f8b08d09d3 build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0
Change-Id: Ic32748529c65b8e75fbb93cd88c0fd70edaeaf6d
2019-05-19 18:59:48 +00:00
Kunal Mehta
1c67fac1b4 Upgrade to newer phan
Change-Id: Idb1940b42d85afb80422c4f10a50942464c3afba
2019-03-20 19:43:14 -07:00
Fomafix
20109df332 Use \u{00A0} instead of  
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0)
instead of the HTML/XML entitiy  .

Bug: T154300
Change-Id: I610c8c6a70c7561c46f80e40614f69ccedab5194
2018-11-03 00:02:35 +01:00
Edward Chernenko
73ad6a7835 Missing 'class' in "newtalk" notification
MonoBookTemplate incorrectly calls getIfExists() for newtalk/undelete:
attributes of wrapper <div> must be under the 'parameters' key.

Change-Id: I5392477d493174b0b5598927bfbcec2029b0987e
2018-06-20 10:56:52 +02:00
Timo Tijhof
6dccc0d96e Re-implement and improve mw-jump links with pure CSS
* Improve their accessibility by giving both links a full label
  ("Jump to x" and "Jump to y" instead of "Jump to: ", "x", "y").

  This also makes things better for localisation.

* Use pure CSS for the toggling of the visibility on focus,
  instead of relying on JavaScript. Especially given the
  JS came from core's 'jquery.mw-jump' module, which is
  considered technical debt per T195256.

* Use plain <a> links in the HTML instead of wrapped in a <div>.
  This solves the long-standing problem whereby the margin
  between #contentSub and #mw-content-text had to be awkwardly
  negated and overridden.

Bug: T195256
Change-Id: I40a769ee3a822a5a9167ec1d144e6b151eb8e141
2018-05-24 01:30:55 +01:00
Isarra
70d426d4fd Responsive support, noJS version
* Add screen-mobile.css with basic mobile styles
* Force loading of screen-desktop on IE8- due to lack of
  @media width support
* Add some new divs and a set of spoof cactions for jumping
  around the page (what's js?)
* Replace cactions label with a more descriptive string (was
  previously set to display:none regardless)
* Also add a set of icons for fixed widths for tabs and things
  (icons-source.svg is the source file for the set, and includes
  a few others that ultimately weren't used here)

Cutoff 850px. Desktop styles should remain unchanged, with
mobile remaining stylistically consistent.

Change-Id: I737a7447db1e44e0d6abaa4c07813295a5ac73a6
2018-05-02 22:20:54 +00:00
Max Semenik
0a882121e4 Don't use deprecated Sanitizer::escapeId()
Change-Id: I8df63140691db63c37c11f55212e17854f6cdb6c
2018-04-13 16:08:27 -07:00
Isarra
10c0aeaa88 Convert rest of MonoBookTemplate to build giant string and echo once
More helper functions, general refactoring.

Output structure is all the same, all existing attributes
maintained. Some new ones are added:
* p-personal now rendered via getPortlet; has extra attribs
  according to all others rendered with it
* footer rendered with slight variant of getFooter out of
  BaseTemplate; has extra language attribs according to that

Change-Id: I462d1222b0166956d3dce17fbceccf386e179e8d
2018-04-11 02:44:38 +00:00
Isarra
cbc6e46f68 Refactor MonoBookTemplate helper functions to return output
instead of just spitting it out directly

Also rename all of said functions accordingly, add documentation,
and start trying to make an actually cross-compatible version of
getPortlet() for BaseTemplate...

Output should be structurally the same. All existing attributes for
output elements are maintained; some may have new attribs added due
to more consistent render method (getPortlet). (Essentially, if one
item had it, now they all have it.)

New attribs include:
* id
* lang
* dir
* aria-labelledby

Change-Id: I0a7ca1b95c2ad03273ed9c713be0da694c94a176
2018-04-03 04:58:46 +00:00
Isarra
57106ab179 Restructure files according to modern skin practices
Also delete unused images, since even if something is
somewhere using them anyway (looked, couldn't find
anything), it wouldn't be able to find them in the new
image location regardless.

Wiki.png, magnify, and link are all part of core and have
been for some time.

Change-Id: Id7a02155a5f1b207908c9c0c8f7519b6d3f9a886
2018-03-21 21:56:55 +00:00
Renamed from MonoBookTemplate.php (Browse further)