Commit graph

86 commits

Author SHA1 Message Date
bwang e6511ebe8f Add option for different icon sizes, reduce size of arrow icon in last modified bar
Change-Id: I494a02e5ba08cc7849cf1973f8f9163c672fccff
2023-07-31 14:18:49 -05:00
Jan Drewniak 11e09ea7b3 [Icons] Convert history/next status bar icons to Codex
Creates a new Icon.mustache file in favour of using
MinervaUI::iconClass.

Add a new icons.less file and the following icons:
- history
- expand (next) arrow.

These icons are used exclusively in the history
status bar at the bottom of most pages.

Bug: T319260
Change-Id: If81186418fe758d7be9c3e57cf5d2aa889517f2d
2023-07-28 16:56:24 -07:00
Daimona Eaytoy 1898a3ccab Replace deprecated MWException
And more generally remove `@throws` comment used for unchecked
exceptions, callers must not catch them.

Bug: T328220
Bug: T240672
Change-Id: I4768144d02feb6d4b6bae1a1ad39af6031f9613f
2023-06-08 17:16:36 +02:00
Bartosz Dziewoński c542b77a71 Use final action name when deciding to display navigation
Final action name can be different from the 'action' URL parameter.
This method was already used in several places in this code.

Bug: T334727
Change-Id: I803aec7c6d057616b88a8e3f4845ce8de399aa12
2023-04-17 18:54:48 +02:00
Func a5b815903d Remove jquery.tablesorter modules form the dequeue list
Preload via Skin::getDefaultModules() should be allowed to avoid
the separate load request in a fresh environment.

Also, cleanup the code and comments, 'sortable' => true is the default,
no need to specify again.

Bug: T233340
Change-Id: Icc04d2cd2dc85efab64e5c8de68e606cfad61480
2023-03-31 17:31:27 +00:00
jenkins-bot e1ebb4b196 Merge "Remove talk page tools" 2023-03-21 19:03:13 +00:00
Jon Robson b28d802693 Add languages to Minerva HTML
Bug: T331905
Change-Id: I55a25dfb8aba3d1b589a36ba4cba3bba0fe710a1
2023-03-17 20:37:32 +00:00
Bartosz Dziewoński 8c0f0c578e Remove talk page tools
Bug: T319145
Change-Id: Ib432564e1049f18334653e5eb3981f0f051582b3
2023-03-13 18:21:52 +00:00
ksarabia 973c9486d7 Remove onBeforePageDisplay for Minerva
Removes onBeforePageDisplay hook. This is no longer needed because module style is added through Skin::getDefaultModules via SkinMinerva->getSkinStyles

Bug: T281421
Change-Id: Ie0610735c96476e66629815a6611d6b34356707c
2023-02-13 13:22:35 -06:00
Bartosz Dziewoński 433458ba98 Tweak margins/paddings of Echo icons
On desktop, the "Alert" icon had more white space around it than the
"Notice" icon, and its popup displayed with a different offset.

On mobile, the combined icon jumped around while the page was loading.

Change-Id: Icdd5bc6e8478f3453b6461a35b7fb53e8ab014e9
2022-12-14 04:36:14 +01:00
Jon Robson f6f2c4f1e4 Show both Echo icons in desktop Minerva
For consistency with desktop Vector, Minerva should show two
icons. This also removes the duplicate #pt-notifications-alert
element in the skin.

Bug: T313609
Change-Id: I6449f0c29b52fd2092d63fbef23205ed8f57d50f
2022-12-14 02:08:44 +00:00
Jon Robson 028ab69a8b Echo icon should reflect seen status
Bug: T310358
Change-Id: I681a2540979ceeca677e576fca2efd91e1b80e15
2022-12-13 16:21:50 -08:00
Bartosz Dziewoński f8240fea6e Display correct numbers on the combined notification badge
Bug: T310559
Bug: T324690
Change-Id: If7568da5d34840853de43cd50a477a2aa9a18d0f
2022-12-12 23:39:25 +00:00
Ed Sanders c5976996d9 SkinMinerva.php: Improving naming and documentation of talk page overlay checks
Change-Id: Ie8bd5f591523f6eb0e1ef24cc2f61cc626fc478a
2022-10-24 00:00:42 +01:00
Jon Robson 44a93ed393 Enable associated pages tabs on Minerva
The logic to not show the "Special page" tab is no longer
needed as this is the default behaviour for this menu.

Change-Id: Ia7cd9fc699a9c4fb900b4592f0a5c5028380c7f7
2022-09-23 10:07:00 -07:00
Func 2b5b97a9ce SkinMinerva: Display generic history link when viewing deleted revision
The OutputPage->isRevisionCurrent() function would return true if
the revid is equal to 0, I think maybe it's for page preview.
I can't see any way to identify the page preview and fix in that
function, but Minerva won't display history bar during preview, so
simply check the revid should be fine.

Bug: T311341
Change-Id: I665ccebd4f048b406030057b090812448f2b01e3
2022-06-29 00:21:13 +08:00
jenkins-bot cd2fe930fb Merge "Replace Action::getActionName by IContextSource::getActionName" 2022-06-16 19:07:46 +00:00
Umherirrender 9fcc068a28 Replace Action::getActionName by IContextSource::getActionName
IContextSource::getActionName exists since 3fdfef9 and returns a cached
action name, while Action::getActionName determine the action name
every time it is called.

Change-Id: I1390e6b6ecb7606480618dd5792cb0c446e048c1
2022-06-16 18:03:54 +00:00
Jon Robson 4a71506f5c Notification icon should be localized
Bug: T310537
Change-Id: If7995350cb5d39f7d443dd922a589552b1abce3c
2022-06-13 11:42:27 -07:00
Jon Robson 31c317308c Do not use the SkinMinervaReplaceNotificationsBadge hook to add Echo
Based on work done in I7b9cf401936be2421d0ad4efe963486404d50e6a
we switch to the standard notifications menu for Echo generation

Bug: T301263
Change-Id: Id611cc07aebfb94e50bde8902cbc0627393fa926
2022-05-27 18:14:47 +00:00
Jon Robson 8c57c9c12d Enable special page tabs
For now this should be a NOOP as the existing "special" page tab
is removed, put it paves the way for using tabs on special pages.

Bug: T286466
Change-Id: Ic0b52b298d598c20987b172c81c732a31e409402
2022-05-18 21:41:00 +00:00
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
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
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
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
jdlrobson f9a8703a64 Minerva uses core page title handling
Bug: T265892
Change-Id: I2ffdedd64414ffb3c6e441391a75fd6e744847a4
2021-12-20 19:39: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
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
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
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 2be42b314f Refactor SkinMinerva::getSecondaryActions to match getPageActions()
Change-Id: Ia87fb08204be56e665cd97c57e6ac7df4cb1a02d
2021-10-26 22:24:04 +00: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