Commit graph

25 commits

Author SHA1 Message Date
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 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
jdlrobson 2794ea10dc Allow overriding of icon
For consistency with other methods, a mechanism for overriding
the home page icon is provided.

Bug: T291423
Change-Id: I7fb2e23cf10a75ed37e333f166f93111283f7f3e
2021-09-20 12:51:56 -07: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
Nicholas Ray 46ac6048d7 Use text-overflow: ellipsis on .mw-ui-icon-before span elements
Placing the text overflow on the span instead of the anchor element
prevents issues like T287522#7272991 from occurring.

Additionally:

* Uses the `text-overflow` mixin on every toggle list item label instead
of just the user link item as it simplifies the logic and presumably
we'd want any text that overflows the menu to be handled the same.

* Changes the anchor element to use flexbox/align-items to vertically
center instead of relying on `vertical-align` both the span and the
icon. Eventually, this should be put into core (see
I029f97ba9d5e7f46c8aa175d9a6bbb45ef9615df) but we have to remove all the
overrides that use vertical-align first.

Bug: T287522
Change-Id: Ie0fbff9dfaf8444c76125df52931a687730b4ad1
2021-08-12 14:04:46 -06:00
Derick A 4009065cea
Menu: Add "unprotect" action when current user is an admin
Accidentally via T231291, a regression was introduced such that,
in AMC mode, when a page is protected to be edited only by admins,
a corresponding unprotect action is not avaiable to reverse the
protect action.

This patch fixes that regression. Have tested locally and it works
as expected.

Bug: T285567
Change-Id: Ie20ca5d9c43fa54dff5d699eb59679585283bdb5
2021-06-30 20:51:57 +01: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
libraryupgrader e9a4bec57c build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: I325e6aabd1cd89cf5893ea8e85202765ed46a57e
2021-05-04 12:26:23 +00:00
Cindy Cicalese 818d79ce9a Replace usage of deprecated User watchlist methods
Bug: T281187
Change-Id: Ib6f21b41b0a82ab4c48db6eb36d4417c05f30637
2021-04-27 17:12:22 -04: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
Umherirrender ae03d13735 Use ::class for class name
This works also for non-existing classes,
because it is resolved on compile time

Change-Id: I84a9fc3c9f6c0ed3556b927e02e4ec9a5fef9cc2
2021-04-08 20:58:17 +02:00
James D. Forrester 592e1151b7 Use User->isRegistered(), not deprecated isLoggedIn()
Bug: T270450
Change-Id: I60f714f42848898cf27aa83da92ac1c691fe5ead
2020-12-17 19:09:15 -08:00
MusikAnimal 4a3e1fa9e8 Show half star for temporarily watched pages
This does not complete watchlist expiry support in MinervaNeue. It only
instructs the skin to show a half star instead of a full star on page
load if the page is being temporarily watched.

Bug: T251690
Change-Id: Ib5c479dcfe49041152ba662c56cc630c32eb220e
2020-08-27 11:57:13 -04:00
jdlrobson 2e450e104e Donate link should be in a separate group in main menu
Bug: T219793
Change-Id: I7501c87eaa799e4c8a9052f5e3f650a89f376d1b
2020-06-29 14:38:34 -07:00
Vas Jaremchuk f4e3c8f9d9 Mobile web donate link
Add the Donate link with a heart icon in Mobile menu.

Bug: T219793
Change-Id: I65d1d7408e2df7b3ae307736ac6d498b1d7f7197
2020-06-25 11:00:44 -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
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 2d7150125c Fix PSR12.Properties.ConstantVisibility.NotFound
Bug: T253169
Change-Id: I35b646522df6f0ec14ca8fee718937cc8cf44ce9
2020-05-19 22:59:27 +00: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
jenkins-bot 0aa5b43469 Merge "Rename $glyphPrefix to $iconPrefix to better reflect variable value" 2020-04-30 17:08:31 +00:00
Volker E b35fdfe9eb Rename $glyphPrefix to $iconPrefix to better reflect variable value
Aligning with other `$icon*` variables throughout MinervaNeue.

Change-Id: I18cbd06bdd44d127093655577ba4daeb69dbe8ec
2020-04-29 15:14:59 -07:00
Volker E 96132669fd [docs] Remove whitespace in 'WikimediaUI'
Change-Id: I24169651cb60c68ea1bc0d5c70ee6f44841382ab
2020-04-29 14:50:51 -07:00
Reedy 101a1430da Remove MediaWiki\Minerva\MenuBuilder
Move one more class to AutoloadNamespaces

Change-Id: Ib434c512bb4d85047ad7cd5f756c69802462bb48
2020-04-18 20:03:13 +01:00
Reedy d12308e38d Move some more classes to AutoloadNamespaces
Bug: T187154
Change-Id: Ia78f963a08cec1490aaff462b9787f7a826bf62c
2020-04-18 16:09:42 +00:00