Commit graph

210 commits

Author SHA1 Message Date
Thiemo Kreuz 73749969d6 Re-arrange getHistoryLink method for readability
Most notably: Bail out as early as possible.

Change-Id: Ibd22bd41e6d38a807edf45acdcd72c29537a0c06
2022-04-04 20:03:24 +00:00
Reedy b6685f9c4a Namespace SkinMinerva
Change-Id: I8f6bddac9f8cd060c551651e711ee987b8bbfbe3
2022-03-04 17:50:20 +00:00
Reedy 87bb746849 Namespace two more classes
Change-Id: Id32beb98df0f37ced858c17196517f65b64a041c
2022-03-04 16:33:46 +00:00
Jon Robson fade8ad2c2 Search icon should be part of search form for grade C browsers
Cached HTML friendly change which works by limiting styles to the new
HTML which is identified by the existence of the
minerva-search-form class

Bug: T301257
Change-Id: I61ba77a349a38e6a05f87f600ec31bcbf36f306a
2022-02-22 08:40:55 -08:00
Reedy e4bcb8f050 Remove SkinMinervaNeue alias
Bug: T301811
Change-Id: I71c02347e43f9e4744fb1aa0c6c8e24ab0790f16
2022-02-16 18:26:10 +00:00
Tim Starling 0bfcad1b1f Move the sidebar cache to core
This cache is unnecessary since I reimplemented it in core.

Change-Id: I31e5694bebb3c73b88c11827ff3cd953233269f4
2022-02-11 11:21:31 +11:00
jenkins-bot 46303db1cd Merge "Fix spacing between icon + text in toggle menu and JS" 2022-02-10 16:54:27 +00:00
Jon Robson a53509354c buildContentNavigationUrls will be made internal and private
Bug: T300284
Change-Id: Ic3011e2c9763b62a74e401b3f28e53e73a6ec7ab
2022-02-08 23:18:50 +00:00
Jon Robson c88a68b38a The warningbox class is deprecated
Bug: T300306
Change-Id: I178a01a457c26981301c5171f0293402fbf9d377
2022-02-07 18:54:19 +00:00
BrandonXLF eae59a8c86 Fix spacing between icon + text in toggle menu and JS
This fix was already applied to the main menu in change
Idc603ccaeeb42f60899059ebb51226e8a20a969d

Bug: T301056
Change-Id: Id31fa76f40aab44672efc51fb981d481c27f1ff8
2022-02-05 20:28:59 -05:00
Jon Robson 6e297a7a9b [Refactor] Use core definitions for personal menu icons
Rather than hardcoding the icons for all our menu items
let's use the definitions in core.

This also makes it easier for us to deprecate the
MobileMenu hook in future.

Rejoice at all the code this removed!

Bug: T291568
Change-Id: I69b5ca13aee018982a5ea28677d4a37e663235d4
2022-01-19 00:33:16 +00:00
Ammarpad 7ea7ed162d Remove usage of SkinTemplate::injectLegacyMenusIntoPersonalTools()
Bug: T298214
Change-Id: I9dc4c565419b38b557c0f22202ce58641bd210cf
2022-01-05 10:05:05 +01:00
jenkins-bot 9a9f3a72df Merge "Move the form element in Minerva's header and apply core checkbox hack consistently to toggle lists" 2022-01-04 22:16:04 +00:00
bwang 0bee6a1eb6 Move the form element in Minerva's header and apply core checkbox hack consistently to toggle lists
- Factors out Header and SearchBox partials

Bug: T294164
Depends-on: I16d1dfba1b6d0745afff14f1b79586bb17ecdd69
Change-Id: I997f3c2de5cf813db63220580e7cb3fe09aa6932
2022-01-04 11:01:17 -06:00
jdlrobson f9a8703a64 Minerva uses core page title handling
Bug: T265892
Change-Id: I2ffdedd64414ffb3c6e441391a75fd6e744847a4
2021-12-20 19:39:42 +00:00
Gagah Pangeran Rosfatiputra e49dd310e8 Make whole area of last edited section to be tappable
Now whole area of last edited section (from edge to edge) is tappable
and linked to history page.

Bug: T163853
Depends-Onː I3d1f272a27c5c9b0b0928b5c0eaeb3f6e270532b
Change-Id: I3c35bbaafea3376cd2f9dccfd13bfe4845fd6823
2021-12-20 16:31:42 +00:00
jenkins-bot 1b9d92e17d Merge "Wrap the sitenotice with div element as other skins do" 2021-12-15 21:35:58 +00:00
Func b4b2f4ded3 Wrap the sitenotice with div element as other skins do
Change-Id: Ifea461636f9000527556dc2881f83f00be5bff76
2021-12-10 11:20:35 +00:00
vladshapik 023c5046d3 Avoid using User::getOption
Remove using of User:getOption since this method
will be hard-deprecated. Now it is soft-deprecated.

Bug: T296083
Change-Id: I9f762cf27d7c778c8c391cde1409b510bd3e4e67
2021-11-30 12:54:03 +01:00
jenkins-bot f4b3b11053 Merge "Fix history link" 2021-11-29 23:36:42 +00:00
Clare Ming 11b703f616 Fix history link
- Show history link for view pages only.

Bug: T295772
Change-Id: I01b4aa6975543fbfe015ff9cd439f82b5baf3e5b
2021-11-29 13:34:09 -07:00
jdlrobson 76a12a2ad4 Restore logo to footer
In 894364a3eb we moved the section tag for data-logos outside Logo
but did not add it to the footer

Bug: T295773
Change-Id: I52c07e95ac8166e9e9d11aba7cb3130cc6a2f8d7
2021-11-29 10:59:23 -08:00
jenkins-bot a174538d21 Merge "Replace usage of the methods IContextSource::getWikiPage & canUseWikiPage that will be deprecated to WikiPageFactory usage" 2021-11-23 14:04:55 +00:00
Roman Stolar a0e560ffe6 Replace usage of the methods IContextSource::getWikiPage & canUseWikiPage that will be deprecated to WikiPageFactory usage
Bug: T275710
Change-Id: Ia5cff18a6d9417d8e6960f2d20f7b41174f97341
2021-11-22 12:50:11 +02:00
tacsipacsi aaf0159174 Don’t add any <h1> to main pages for anons
Main pages usually feature a welcome message on their own, and adding
the standard <h1> is redundant at best. (Or, if there’s no welcome
message, the lack of a page title also indicates that it’s the main
page.) Also, it has ever been the case since dd00aa5a601e that no page
title is visible on the main page (before 9a39d1e492, an empty <h1>
was present, now nothing will be added).

Bug: T296109
Change-Id: I1e79dc385c4dbe8413bcb32a52b8675aabf8eea0
2021-11-20 12:57:57 +01:00
Clare Ming dddde1c208 Fix banners to show CentralNotice
- Restore init of banner array to include needed selector.

Bug: T296077
Change-Id: Id1cec46eadcd057062c791a30db8ca40b35224b9
2021-11-19 10:17:12 -07:00
jdlrobson dd52f75a13 Remove SkinMinerva class properties
Follow up 7530f1c with some refactors
to remove the $pageActionsMenu and
$contentNavigationUrls properties by
calling once in getTemplateData

Bug: T293815
Change-Id: Ia7877abbecf41bbae7627ce7924d0f0871efa479
2021-11-12 22:34:20 +00:00
Clare Ming 7530f1c145 Remove MinervaTemplate class
- Update SkinMinerva class to output data previously handled by MinervaTemplate.
- Update relevant templates with updated data keys.

Bug: T293815
Change-Id: I33df396b07c4d2d9c1c5743d90dc54cdbd3345af
2021-11-12 11:39:58 -07:00
jenkins-bot 280b7b28f7 Merge "Fix empty title for logged-out users using Minerva skin" 2021-11-12 16:32:29 +00:00
jenkins-bot 5f42f3f76a Merge "Instrument mobile talk page clicks" 2021-11-08 19:20:56 +00:00
jdlrobson 1acb3542a5 Instrument mobile talk page clicks
This results in log events for clicking the following on a talk page:
* Read as wiki page
* Section headings
* the "add section" button

To test install WikimediaEvents and set
$wgWMEMobileWebUIActionsTracking = 1;

Bug: T294738
Change-Id: I8dbad7f4e72cfd081896480ba142b4e1e3029bcd
2021-11-08 09:17:29 -08:00
xiplus 9a39d1e492 Fix empty title for logged-out users using Minerva skin
Do not set page title to empty string if user is logged out

Bug: T265892
Change-Id: I38172860a6e4b58f772cc6713a0fd07f5d8524ea
2021-11-08 12:17:24 +08:00
jdlrobson 1f2b7dff15 Minerva uses desktop footer for license
After this change, in desktop Minerva the copyright
text in the footer should match desktop Minerva.

In mobile Minerva the copyright text in the footer
is shortened and doesn't contain terms of use.
It should match Vector mobile
?useskin=vector&useformat=mobile

Depends-On: I3473908e08f643b4c60aafc470dd124516955323
Change-Id: I2895975aaa1d09d228f80aff74381e88034a0137
Bug: T289401
2021-11-03 18:38:44 +00:00
Sai Suman Cherukuwada 3a9f60cbeb Removed calls to MinervaPreRender hook.
Bug: T289281
Change-Id: Ied0d2069dd8bb6bad67233272365674840743062
2021-11-03 16:45:23 +00:00
Clare Ming b308c91b50 Fix spacing between icon + text in main menu
Bug: T292452
Change-Id: Idc603ccaeeb42f60899059ebb51226e8a20a969d
2021-11-01 16:33:07 -06:00
Clare Ming 55189058be Move history link data into SkinMinerva::getTemplateData and relevant template
- Remove usage/references to MinervaTemplate::getHistoryLinkHtml, html-minerva-lastmodified
- Add data key for history.mustache template.
- Update footer template to use new data key.

Bug: T292554
Change-Id: Id5fbf61ba181a0088a25e77175b808362963c63b
2021-11-01 21:04:12 +00:00
bwang 50a5253684 Remove whitespace from anon talk message warning
Bug: T284642
Change-Id: I65d03ffa5b3e8a7a855ba5adb3cc90e74c83ad96
2021-10-28 18:11:26 +00:00
jenkins-bot b4f947a625 Merge "Update anon talk messages to show on non-main namespaces" 2021-10-27 23:52:19 +00:00
bwang a2d065c062 Update anon talk messages to show on non-main namespaces
- Loads messageBox styles on non-main namespaces
- Add messageBox styles to 'skins.minerva.scripts' module for MobileFrontend's edit overlay page
- Prevent warning box from showing with empty message

Bug: T284642
Change-Id: I70d0d86671384210cc3ab43cb1d350ff2a862fd9
2021-10-27 21:29:42 +00:00
jenkins-bot 2ee31b0096 Merge "Refactor SkinMinerva::getSecondaryActions to match getPageActions()" 2021-10-26 22:49:16 +00:00
bwang 2be42b314f Refactor SkinMinerva::getSecondaryActions to match getPageActions()
Change-Id: Ia87fb08204be56e665cd97c57e6ac7df4cb1a02d
2021-10-26 22:24:04 +00:00
jenkins-bot 36729aafd8 Merge "Add yellow talk page message warning to non-main namespace pages" 2021-10-26 16:39:38 +00:00
bwang b4fd1498bc Add yellow talk page message warning to non-main namespace pages
Bug: T284642
Change-Id: I2895975efe1d09d228f80aff74381e88034a0137
2021-10-26 10:44:28 -05:00
jdlrobson b41c7ca7be Inline PageActionsMenu template
Avoid usage of an additional TemplateParser

Bug: T293813
Change-Id: I1cef873d8a3226c9180a0731834f0ecf961f7ece
2021-10-25 16:02:08 -07:00
jenkins-bot 2a60efef79 Merge "Remove MinervaTemplate::getSecondaryActions" 2021-10-25 19:32:53 +00:00
bwang 95abf6b9af Remove MinervaTemplate::getSecondaryActions
Bug: T291875
Change-Id: Iefff2007c561adfd5886f9c0521341b3922e7653
2021-10-22 14:11:54 -05:00
jdlrobson 17968826fa Move components files up one level into Skins directory
Follow up to I4c2e115451c0a76c742734730712814c1f1d838d.
This will allow us to load the templates directly into skin.mustache
via {{>PartialName}}

Templates partials can only be resolved relative to the folder given
to the TemplateParser.

Change-Id: I5783d49c25d2efcf4781dd912500bf8b413b8cb6
2021-10-22 18:45:38 +00:00
jdlrobson c407d92d5d Remove getPageActionsHtml and related methods
Bug: T293813
Change-Id: I90e45cac13a13c2ce18af16274e327d951868433
2021-10-22 07:42:56 -07:00
jdlrobson 5a7a9c9c31 Drop wgMinervaPageActions
Remove code per spike outcome (T226490#7438685)

- This configuration option is never used in Wikimedia production
- isTalkAllowed content body is merged into isAllowed. Resulting code
is more readable.
- isAllowed('talk') still returns false on main page for anonymous users
which is the current behavior. Even on sv.m.wikipedia.org where talk pages
are shown to anonymous users, we do not show the talk page on the main page.
Add a comment pointing to the associated phabricator ticket

Bug: T226490
Change-Id: I9f34817c5ad654a6a66fe6156850a3e3fee881a7
2021-10-21 17:25:37 +00:00
jdlrobson 894364a3eb Restore title to mobile skin without logo
Bug: T290525
Change-Id: I6eb120a08d15b308d2a4df99900ab86042612b0c
2021-10-21 15:16:14 +00:00
bwang c1ea154af8 Generate Minerva search HTML with SkinMustache data
Bug: T290525
Change-Id: I68cde34a41a610872a585f5548dbaf66e3515443
2021-10-18 10:44:15 -05:00
jenkins-bot 04e5372713 Merge "Revert "Generate Minerva search HTML with SkinMustache data"" 2021-10-15 23:06:19 +00:00
Jdlrobson f9214f8ad5 Revert "Generate Minerva search HTML with SkinMustache data"
This reverts commit ecd35774b1.

Reason for revert: Logo has disappeared on beta cluster.
The Logo template was using data-logos, and
the addition of the data-search-box section broke this. Given its
a Friday, probably best to revert the patch and reapply again.

Change-Id: Id517d32b20b6512b9b2e1fffab012522dfd7b618
2021-10-15 22:43:07 +00:00
jdlrobson a7b66f6f63 Remove MinervaTemplate::getContentHtml
* Move method to SkinMinerva
* Turn preparePageContent into a getter that returns the subject
page
* Use getSubjectPage in template

For mobile special pages this now means the page has two .content elements
On those pages I've disabled the initial content element. It also means
various .content <heading> and .content ul  rules now apply that need to be
disabled.

While testing several other issues were taken care of - for example
the h2 in errors

Depends-On: I7761396d6a33830f279742be01240796573556a7
Bug: T291871
Change-Id: I13bc4b5dae7aed86eca31ef306212365e1759481
2021-10-15 20:49:23 +00:00
bwang ecd35774b1 Generate Minerva search HTML with SkinMustache data
Bug: T290525
Depends-on: I175ae29310a7432212a7b9c1c68dac9923665536
Change-Id: I53ea154b815a52e1e2e80a2e7b7114e310e74d47
2021-10-15 10:15:58 -05:00
bwang 9a4caa7631 Use skin.json to define messages instead of MinervaTemplate
Bug: T290343
Change-Id: I8daef594ac9efb80f07437c5d8ef5459c37e2ff3
2021-10-12 15:30:58 +00:00
jdlrobson aba173efc6 Remove non-standard components folder
For skins, all templates should be in the same folder. This
is for security reasons, to limit access of templates to files
that are not templates. This also adds consistency with other skins
where templates are all in the same subdirectory. It also allows
us to reduce the creation of TemplateParser instances.

Note: All styles and scripts should be in the resources folder but this
is not rectified by this patchset. Will be done in follow ups following
more discussion.

This begins this work in the least disruptive way possible and drops
the README note to avoid this pattern growing.

Bug: T292558
Change-Id: I4c2e115451c0a76c742734730712814c1f1d838d
2021-10-06 20:13:48 +00:00
Nicholas Ray 6067d2689b Change footer logo from a heading element to a div
Also, remove old CSS selector that was preserved for caching.

Bug: T288362
Change-Id: Iab3531229b64e0b9ee9268f6480a1417872d6107
2021-09-27 15:04:55 -06:00
jdlrobson f49eefbf84 Improve support in Minerva for addPortletLink
* Use skin registration and set skin options as and when needed
* Set link text-wrapper
* Simplify addPortletLink hook
* Update modifications to apply to items added prior to the hook

Bug: T240910
Change-Id: Ic806adf3de6490ba9da11e8968a61b3d0acd93bc
2021-09-23 22:05:36 +00:00
Nicholas Ray 6df49e3da4 Add alt attribute to logo
* Adds alt attribute with a value of the `mobile-frontend-sitename`
(previously called `mobile-frontend-footer-sitename`). The message was
changed because this affects both the footer and the header's logo.

* Adds a `minerva-footer-logo` class to the logo in footer.mustache in
preparation for changing that element from an h2 to a div. Given caching
issues (old CSS with new HTML; new CSS with old HTML are both
possibilities), we need to do this in two separate deploy cycles.

Bug: T288362
Change-Id: I3ecbf8fdcae72a0ded7f60c559259f312b8ef15d
2021-09-22 02:01:42 +00:00
jdlrobson 5263b09397 Standardize use of buttons and icons in Minerva
* Adds button hover/focus states to all Minerva button icons
* Removes the deprecated mw-ui-icon-before selector

Depends-On: I4eb28eae4c4e23d58f1f85bc41c0caf77197d8a1
Bug: T288678
Change-Id: I490534f9f704a733191b459c8ee071848c436001
2021-09-17 15:36:54 +00:00
jdlrobson 3564c70994 Logo scales with font size
Bug: T207789
Depends-On: Ie86a5b59fbf93a400796a4cac3724207830092b5
Change-Id: Ibbdf8b75246367e60532626879f33c0876118fe1
2021-09-08 22:32:39 +00:00
Ammarpad f9ab46b917 Remove unused template data
* internalBanner
* prebodyhtml

Bug: T290342
Change-Id: Ibd4d3f07e120874160274ce3295c788fdd33a7a5
2021-09-07 06:37:20 +00:00
jdlrobson e42bfd1e96 [refactor] Use core template variable for subtitle
Avoid indirection to QuickTemplate variable by using
SkinMinerva (SkinMustache) version.

To test:
* Create User:Admin/sandbox
* Create User:Admin
* Visit User:Admin/sandbox to see the breadcrumb "< User:Admin"

Change-Id: Icdd10bd1406ea047097309b6fcafba399170d019
2021-08-19 12:40:13 -07:00
libraryupgrader 218151025e build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 36.0.0 → 37.0.0

npm:
* svgo: 2.3.0 → 2.3.1
  * https://npmjs.com/advisories/1754 (CVE-2021-33587)
* postcss: 7.0.35 → 7.0.36
  * https://npmjs.com/advisories/1693 (CVE-2021-23368)
* ws: 7.4.5 → 7.5.3
  * https://npmjs.com/advisories/1748 (CVE-2021-32640)
* trim-newlines: 3.0.0 → 3.0.1
  * https://npmjs.com/advisories/1753 (CVE-2021-33623)
* normalize-url: 4.5.0 → 4.5.1
  * https://npmjs.com/advisories/1755 (CVE-2021-33502)
* prismjs: 1.23.0 → 1.24.1
  * https://npmjs.com/advisories/1762 (CVE-2021-32723)

Change-Id: Idfecb28ef49b193ba78b3f7b1335d4d5cb2862cd
2021-07-23 18:37:41 +00:00
jdlrobson ca18ad75d3 minerva-header class is now in cached HTML, remove old header class
This completes the migration from header to minerva-header

Bug: T172626
Change-Id: Ibb86359e683e08d86091f855e3813a99e0ad2cee
2021-07-20 18:36:39 +00:00
jdlrobson 9dab685ac9 Restore header class for cached HTML
Follow up to 27525d0bf

During task sign off Nick raised the concern that new HTML
can be served with cached CSS for up to 5 minutes after a deploy.
We decided to restore the class for one deploy cycle.

Bug: T172626
Change-Id: Ie5a2e45f31a468bbe425a27236ad1255950807a1
2021-07-19 13:47:55 -07:00
ExE Boss 27525d0bff Fix style conflict with content using class="header"
Content using `header` as a CSS class was affected by skin styles
in Minerva being insufficiently specific to the skin‑specific elements.

This changes Minerva to use `class="minerva‑header"`, thus avoiding
the conflict and matching what Vector does.

Bug: T172626
Change-Id: Id8fbe61b2d1d4a89ec11ddfdf7837be797b3bd20
2021-07-16 20:39:24 +00:00
DannyS712 55206bd705 Remove SkinMinervaDefaultModules hook
Deprecated in core version 1.36

Bug: T266882
Change-Id: I99bd07dab4f27e2c119b80c1ca3383134740050d
2021-07-05 15:55:21 +00:00
Timo Tijhof 0d61c78f73 Move skins.minerva.content.styles into skins.minerva.base.styles
This could be made even simpler by not using a LESS varialbe for
hacks.less, but loading it conditionally through the moduel def.
But, as a first step we can merge the two as-is.

Given that the subject and target are always referenced together
in page views, there is no need to keep an alias around. However,
I'm keeping it anyway so as to not produce any
`/* {"skins.foo":"missing"} */` appendix to the stylesheet response
for these cached URLs.

Bug: T266361
Change-Id: I8578faab8ca32bd49be90711cbd5e182763b8065
2021-06-21 17:50:37 +00:00
David Lynch 5fb7c116b7 Add hook that allows suppression of the talk page overlay
The hook lets us hand off the decision of whether to suppress this to
DiscussionTools, which has a slightly complex set of feature-tests to do
before deciding. It seems better to leave this disabled only when DT
will actually be stepping in.

Bug: T280051
Change-Id: If6b70fb6d801ac04fa3b70c153a2136d2e302f28
2021-06-10 11:35:26 -05:00
Jdlrobson 8651df02bb Replace categories button with HTML rendering
Bug: T246049
Change-Id: Id8c7493a525844b43c1628a1f4f09ae716ece2ba
2021-05-14 20:34:59 +00:00
bwang 0071a28239 Ensure suppressed user pages look like unregistered users when viewed without proper permissions.
This patch removes the user page tagline (i.e. "Blocked joined 7 days ago"), updates the user page heading (i.e. "Blocked" becomes "User:Blocked") and removes user specific page actions (i.e. Contributions, User groups, the page actions submenu, etc) for certain user pages.

This patch also adds a new method to SkinUserPageHelper for use in the ToolbarBuilder.

Bug: T268961
Change-Id: I920e0770caa0a1b6d3323e2e3111e5df4f1f051d
2021-05-05 10:29:54 -05:00
ZabeMath 4cdd0af8bf Allow Users with permissions to do expanded actions in Minerva on mobile
Allow Users with the needed permissions to delete, protect or move pages in Minerva on mobile version.

Bug: T231291
Change-Id: I1e438b7d3683d288a8a6c5a9f5dcea6b3b3d9f71
2021-04-26 18:51:32 +00:00
Cormac Parle 4394d85e52 Update search form to use the default search page from the skin
Bug: T273979
Depends-On: I241a9cce679c7b42ff749c6236299d82b94db669
Change-Id: I646b002d837ec44244f02cafdc5f4e7f83209769
2021-03-24 14:24:20 +00:00
vladshapik 6da72c8099 Avoid using User::isIP
Remove using of User::isIP since this method will be hard-deprecated. Now it is soft-deprecated

Bug: T275602
Change-Id: I01a0c2ef4d750cf0e81a9345ee462787d4ee28da
2021-03-02 14:29:58 +02:00
Piotr Miazga (polishdeveloper) 82724b3c44 Add data-mw="interface" attribute to Menu elements
While dropping support of smart logout in favour of core ready.js
logout, we noticed that the logout selector is a little bit too weak.
Editors could make a link on a page that would work as a logout
button. The easiest way to prevent this (and any other possible
problems) is to add `data-mw="interface"` attribute to all generated
menu entries.

Change-Id: I22611b9641d82328623beb3f693bf7cddb2289ff
2021-02-11 20:35:40 +00:00
James D. Forrester 592e1151b7 Use User->isRegistered(), not deprecated isLoggedIn()
Bug: T270450
Change-Id: I60f714f42848898cf27aa83da92ac1c691fe5ead
2020-12-17 19:09:15 -08:00
libraryupgrader 68b3bcd63f build: Updating mediawiki/mediawiki-phan-config to 0.10.5
Change-Id: I69ee97acbdf8a1054b3be704ed9d7b87d3ed7152
2020-12-09 20:41:19 +00:00
jdlrobson 0e61c55ea1 Minerva no longer needs to remove mediawiki.toc.styles
As of db3c8ea16b3 the mediawiki.toc.styles module is no longer
loaded by the skin, so Minerva no longer needs to remove it.

Bug: T252774
Change-Id: Ia2df978e2d0349a55620ef45f8c0827134b7c74d
2020-12-08 14:16:54 -08:00
libraryupgrader 450f70d24b build: Updating mediawiki/mediawiki-codesniffer to 33.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle

The following sniffs now pass and were enabled:
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName

Change-Id: Ib605f800c2ae0e521c034c1f49d98cbca546b720
2020-11-05 16:18:11 +00:00
jenkins-bot 9c3e5c9299 Merge "Deprecate SkinMinervaDefaultModules hook" 2020-10-30 01:13:30 +00:00
jdlrobson d69de05807 Deprecate SkinMinervaDefaultModules hook
No longer used by anything.
So long... farewell...

Bug: T256086
Change-Id: Ic3439ca6f466351518d4b9e0feea405cb94e6c5e
2020-10-29 10:01:23 -07:00
jdlrobson c3b93e14b0 Simplify footer and logo generation
The data already provided by SkinMustache makes the existing
Minerva code redundant.

* html-after-content functionality equivalent to dataAfterContent value
* Rename license and last modified to have html-minerva prefixes and promote
to top level data object. This allows us to distingusih Minerva values from core
values.

Note: previously the logo used srcset to ship a 1x logo but these
were dropped during the desktop improvements work.

Bug: T256083
Change-Id: I7b2cd5181eae67b345f6686e3389a76a12e3b1a1
2020-10-16 23:41:34 +00:00
jdlrobson fabc333373 Drop unused template variable and property
* prebodyhtml is never defined
* isSpecialMobileMenuPage is never used and the Special:MobileMenu
page no longer exists

Change-Id: I6481ef08f9d88e9be3cb5568bfa6693b1b3f1b8f
2020-10-08 21:03:53 +00:00
jdlrobson 78839e00e8 Minerva should use the SkinMustache class
This begins the migration of Minerva to SkinMustache with the smallest
possible change.

In future, we'll be able to eventually wean ourselves off of the
MinervaTemplate class and considerably reduce the code in Minerva

Bug: T256083
Change-Id: Id0f617cfdb698754addc79b26491b9d846513c87
2020-10-02 13:35:08 -07:00
Volker E 1ae1c424e0 Add role=contentinfo to footer element
Mitigating an VoiceOver bug first identified in course of T66477 and
clarified in  T66477#6347019.

Change-Id: Ie6beb6ba0848bd08a3604974dfc8dada0fd445b7
2020-09-18 08:41:49 -07:00
Jdlrobson 74838b2fa2 Revert "ServiceWiring: Avoid usage of deprecated Title::getSubjectPage()"
This reverts commit ae8e3ad58b.

Reason for revert: This led to T260155 as the internal class uses
isSubPage which is not available on LinkTarget

Bug: T260155
Change-Id: I783f41e70cf1cf3b91737bce9cbf9ac729a778df
2020-08-11 15:50:44 +00:00
Derick A ae8e3ad58b ServiceWiring: Avoid usage of deprecated Title::getSubjectPage()
SkinUserPageHelper::__construct() should be able to consume a LinkTarget
too as NamespaceInfo::getSubjectPage() method returns a LinkTarget and
the Title::getSubjectPage() is deprecated.

Change-Id: I08bfc9bb21772b450798b6354bee2ab09d5dba4d
2020-08-08 14:07:48 +01:00
mainframe98 5857a9f909 Specify the responsive option rather than manually specifying viewport
I6e69b482cdbc adds a viewport with the same value as defined by Minerva.

Bug: T258290
Depends-On: I6e69b482cdbc49c09adc6f7cee54f5e17b7c92c4
Change-Id: Ie8ed80f734b20a16bc1c70a94d40290909180c3b
2020-08-03 21:14:29 +02:00
Peter Ovchyn 271fb28d99 Load mediawiki.page.ready on Minerva
Disable sortable and collapsible during mediawiki.page.ready initialisation

Add onSkinPageReadyConfig hook that overrides sortable and collapsible values.

Adds 1.74kb of JS to all page loads.

Bug: T257265
Bug: T250851
Depends-On: I0dc38e74052027f26a70d58b5f520e5830e0d55d
Change-Id: I81ff55d080c8c4a40f425ca7d0fc4fda322055dd
2020-07-29 20:57:52 +00:00
Ammar Abdulhamid 1a45b1409c Remove usage of deprecated Skin::getRevisionId()
OutputPage has similar method and they are being used
interchangeably here. Let's stick with one.

Bug: T257992
Change-Id: Ia5a0fbf114f6a1fec6fb85e01a408edae8a5badb
2020-07-29 16:09:47 +01:00
DannyS712 4e1284996f Deprecate the MinervaPreRender hook, unused
Bug: T256079
Change-Id: Ic4b4ee679d7b78a6fa48fca353f51c1de1ee8a48
2020-07-11 00:35:01 +00:00
Ammar Abdulhamid f9b5ca1f26 Minerva: Remove usage of two deprecated methods
* BaseTemplate::getToolbox()
* BaseTemplate::getPersonalTools()

Bug: T256272
Change-Id: I7de2be43e1fbe94c10cbe8bba49adc07692f9219
2020-06-26 12:43:27 +01:00
jenkins-bot 5e6e294083 Merge "Allow projects to disable Mobile welcome message" 2020-06-23 16:11:20 +00:00
Ammar Abdulhamid dbc3bdee1d Allow projects to disable Mobile welcome message
Bug: T255682
Change-Id: I62f2c798656005796d846067f67ad26812202e20
2020-06-23 10:44:13 +01:00
Ammar Abdulhamid 2bb3633530 Minerva: Use OutputPageBodyAttributes hook to add body attributes
This means dropping usage of Skin::addToBodyAttributes method from
parent Skin class to pave way for its deprecation/removal.

Bug: T255698
Change-Id: Idab13c37002ac5663f292e4f4b4ff51eb7573fda
2020-06-21 09:21:07 +01:00
jenkins-bot ea4ad9d5f6 Merge "Revert "Drop MinervaEnableSiteNotice"" 2020-06-04 22:59:24 +00:00
Jdlrobson 4f021c79f0 Revert "Drop MinervaEnableSiteNotice"
This reverts commit 33e5c1eb79.

I talked to Gergo (tgr) about this and he's convinced me
that probably I want to be more conservative 
and incremently roll the sitenotices
out first. With that in mind I'm going to revert this change
and do a config flag instead.

Bug: T254391
Change-Id: If0f214d23a012fb4ae3e1dff1728f746a22f142a
2020-06-04 22:39:36 +00:00
jenkins-bot b51d095001 Merge "Drop MinervaEnableSiteNotice" 2020-06-04 19:38:15 +00:00
jdlrobson 33e5c1eb79 Drop MinervaEnableSiteNotice
This will make site notices display across the site as intended. The config
flag doesn't seem warranted - site notices should display across all skins
as they may contain important information.

This is preventing wikidata page banners from displaying in Minerva.
If this is controversial I can do a config-only change for Wikivoyages

Bug: T254391
Change-Id: I34c5e762b967ea94e33025e87f3446e8e029bc91
2020-06-04 08:38:03 -07:00
Umherirrender 4f269d67b8 Explicitly format Message oject instead of string cast
The implicit in Mesage::__toString, as called when the object
is accepted by a method that needs a string, is to format
with parse(). Call that explicitly instead, or use escaped()
in places where it seems like elaborate wikitext isn't expected.

Change-Id: I9f1de3a0047d1f26d30c8607a0a79543d166176f
2020-06-01 20:52:33 +00:00
Umherirrender 1b5d9ea755 build: Updating composer dependencies
* php-parallel-lint/php-console-highlighter: 0.4.0 → 0.5.0
* php-parallel-lint/php-parallel-lint: 1.0.0 → 1.2.0
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.10.2
* mediawiki/mediawiki-codesniffer: 29.0.0 → 31.0.0
* mediawiki/minus-x: 1.0.0 → 1.1.0

Additional changes:
* Replaced "jakub-onderka" packages with "php-parallel-lint".
* remove taint-check, now bundled with phan-config

Change-Id: I202a48e1b0aab38181a402d6f2661d782ecd79e2
2020-06-01 19:43:05 +00:00
Volker E bb6827122c Naming convention using 'skin' as entrance point
Similar to Ief1c469724d4ffe238d307407c3ddb46f2e1abfa

Change-Id: Ibca2473b14ef258f92e71524489298e2f53ed873
2020-05-29 14:32:12 -07:00
Reedy 0267700d05 Fix function case mismatch
Change-Id: I0a3868e5fdc511b523c3839866d1c0b173670cea
2020-05-29 15:16:45 +00:00
jdlrobson 9118f25a5e Minerva should source mobile license without indirection
Rather than rely on something being set on MinervaTemplate go
straight to the source of the license message

This change will allow us to deprecate usage of
SkinTemplateOutputPageBeforeExec inside MobileFrontend

Bug: T60137
Depends-On: Id83ef2f2cba1dce940f89125b5cd26a29421ee48
Change-Id: I5317cd707418350847085d406c3749f19106d6ba
2020-05-27 22:09:58 +00:00
Reedy 2d7150125c Fix PSR12.Properties.ConstantVisibility.NotFound
Bug: T253169
Change-Id: I35b646522df6f0ec14ca8fee718937cc8cf44ce9
2020-05-19 22:59:27 +00:00
Bartosz Dziewoński a1e75213da Fix posting talk page replies on pages with subsections
The MobileFrontend section numbers that were used here only count
top-level sections, but this value was passed to code in
MobileFrontend's TalkSectionOverlay#onSaveClick, which uses an API
expecting the standard MediaWiki section numbers.

Extract the section number from the section edit link, like we do
in mobile.init/editor.js in MobileFrontend.

Also, disable the special talk page view unless we're viewing the
latest revision of the page. That could also lead to posting in the
wrong section, as sections are often added and removed, which changes
the numbers.

Bug: T252828
Change-Id: I553a508658804dd8672f2268b7118f77458a9dba
2020-05-14 22:57:00 +02:00
Volker E c9461c9dd8 Replace skins.minerva.mainMenu.advanced.icons with OOUI icons
Additional changes:
* Address a fixme relating to the overflow icon and move some AMC styles
out of the critical path for non-AMC pages

Note about ellipsis:
The class mf-mw-ui-icon-rotate-clockwise cannot be used as it's part of
MobileFrontend and loaded via JS. Minerva must work without MobileFrontend
and this rotation is needed without JS.

Bug: T244444
Change-Id: Ifd02c50305cf036dd6df640d778678668507e5eb
2020-05-01 12:18:35 -07:00
Reedy 01f824f684 Fix namespace of SkinUserPageHelper
Allows autoloading of file

Change-Id: Ife276b5802e3cdcfd5789a7a91684317c81d5bb3
2020-05-01 02:29:54 +01:00