Commit graph

93 commits

Author SHA1 Message Date
Jon Robson 952789bc17 Switch Minerva button template to use Codex and remove mw-ui-button
- Removes 'mw-ui-icon-with-label-desktop' as that is now the default behavior for icon only buttons in Minerva
- Removes icon flushing classes, use codex mixins instead

80 Visual changes relating to minor icon/button subpixel changes in the heading, edit section links, and page actions

Bug: T319260
Change-Id: I503b643d33e43196483af4b5f9dd312237322ac8
2023-08-24 15:57:01 -05:00
Martin Urbanec 0109b17483 watchlist: Don't assume only named users have watchlist access
In I1ccda3878a658d4251429ae65ebee04c09d81243, core decided
to technically allow temp. users to have watchlist access,
but have it disabled on permission level
(viewmywatchlist / editmywatchlist) instead of by isNamed() checks.

Minerva expects the watchlist permissions to be assigned to everyone,
but actual watchlist access to be available only to named user.
This is an incorrect assumption. Make a clear difference between
"page is watchable" concept (watch icon should show) and "user has
permission to watch" (if not, CTA to log in should show).

There is one additional step to fix, which is ensure
temp users receive the T330518 drawer. That is not a bug
in MinervaNeue, but in core -- mediawiki.page.watch.ajax.js uses
e.stopPropagating(), which means Minerva's CtaDrawer doesn't get
a say. Ideally, mediawiki.page.watch.ajax.js would know whether
the user has permissions to edit their watchlist. Alternatively,
it could have an interface to allow extensions to add their own
error handling. See T344925 for details.

Bug: T344870
Change-Id: Id1757fb4fb433fe39cf4d5c6e1e9c65ab5abae14
2023-08-24 14:12:43 +00:00
Umherirrender 4ce42dd5cb Use namespaced MediaWiki\Html\TemplateParser
Bug: T321681
Change-Id: I7cec363ce0f4a6d5797a3f176b5cb766930a84fe
2023-08-20 02:48:10 +02:00
gerritbot fd2fe83a0c Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I236a14b07bd78141f82e86d7ea872d24b6cd88eb
2023-08-19 19:36:46 +02:00
Jon Robson 0c6ac2926d Edit icon uses template parser
Bug: T344007
Change-Id: I772f2c8be7e4f48e9d67a5d1d7d3ef9e6af17851
2023-08-10 22:04:11 +00:00
Jon Robson ded6430b47 Echo uses Button template
Changes
* Update FIXME in userMenu.less to merge selectors
* We replace minerva-user-notifications class with minerva-notifications
to short-circuit Echo's code so that it no longer replaces the Minerva
notification badge with its own.
* We update resources/skins.minerva.scripts/initMobile.js to introduce
our own wire up code - this is responsible for opening Echo overlay
and reseting the counter. The code in Echo will be removed in a follow
up (see <I2f923e509d24524a2375ffbe6b3ef336487574bb>)
* We update skinStyles/ext.echo.styles.badge.less with styles from Vector 2022
so that Minerva desktop remains consistent with desktop Vector 2022 experience.
* We clearly mark technical debt relating to the special mobile version.

Testing:
* Pixel.js has a group echo that covers all the different variants.
Make sure to update to latest main branch before running these.
* Desktop should behave the same for Minerva as Echo.
* On mobile only when a user has unseen notifications a red circle
is shown. Otherwise a bell icon is shown, never with number.
* On mobile a single button is visible that combines alert and count
numbers.
* With Echo disabled a bell shows that links to the user talk page

Visual changes:
* Previously the red circle became a transparent/gray circle on click. Now
it will always be red.
* Minor aligment changes to red circle and bell icon are expected as
the change prevents MobileFrontend/Echo updating the icon to use
Codex.

Bug: T342907
Change-Id: I55c18cf723a32f80b93a01dd0687e005162c4e93
2023-08-08 15:44:38 +00:00
Jon Robson 3da423f219 [Icons] Main menu, secondary actions and search icon are built via templates
Bug: T342908
Change-Id: I30195583b35d3966d5f221241e21a0ef165a450e
2023-08-01 14:21:11 -07:00
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