Commit graph

304 commits

Author SHA1 Message Date
Sam Wilson df14b078c0 Fix style of clock icon in changes lists
Override core styles for the watchlist expiry clock icon in
Recent Changes and Watchlists.

Bug: T261415
Depends-On: I621b1571b57686beb9fb5802533b1e70d293bc2a
Change-Id: Iefdd271aeb6135771aae832e930fe02c73248110
2020-09-23 10:47:45 +08:00
Sam Wilson e9ad028a5b Center and align the expiry dropdown in watchstar widget
Move the watchlist expiry dropdown list to be aligned in the
centre, and its contents to be left-aligned.

Bug: T261990
Change-Id: I3073618606636c78e6afb5bf19726c7b3973292b
2020-09-21 13:24:03 +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
Peter Ovchyn 402aaad6ff Move css styles related to lazy-image-placeholder to skinStyles
`lazy-image-placeholder` is needed only when MobileFrontend is enabled.
So it makes sense to move those styles to mobile.init css. See more details here: T199351#6380240

Bug: T260406
Change-Id: I16ca734af33fb0f3c4c67f20bbca8631279d7778
2020-08-18 16:51:02 +00: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
Ed Sanders 13449aed52 Remove styles moved over to Echo
Bug: T258936
Depends-On: I72bedc3c3d633e8898c93d5e7d570b8ee7b6a1ff
Change-Id: Ic9b03bab0db39ccbed5b05c89577be18bb17c8de
2020-07-28 09:49:33 +00: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
jdlrobson de595ccf04 Disable donate link
After checking with Alex the donate link is in the wrong place
because of a mix up on the phabricator ticket. Disabling for now
while we reposition.

Change-Id: Icd12026f9e7c617bac8b7d6b4143a634948422a8
2020-06-25 13:45:40 -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
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
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
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
Volker E bb6827122c Naming convention using 'skin' as entrance point
Similar to Ief1c469724d4ffe238d307407c3ddb46f2e1abfa

Change-Id: Ibca2473b14ef258f92e71524489298e2f53ed873
2020-05-29 14:32:12 -07:00
jdlrobson ceb23e3738 Update Minerva's contributors
I want to reflect the contributions of the
existing members of the team that
maintain the skin.

All the added names are listed as the main contributors
on the github with consistent contributions
of at least 2 years
https://github.com/wikimedia/mediawiki-skins-MinervaNeue/graphs/contributors

Alex has overseen much of the effort in our mobile skin over the recent years
Although we don't traditionally add designers to the authors section I think
it makes sense that he should be listed.

Change-Id: Ia2a37a6988a2712151ae0c21f9e31a11310a8a53
2020-05-06 18:04:12 +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
Volker E 73c7d817b9 Use standard palette color Base20 for icons
Bug: T240500
Change-Id: I31302acb6dded8b367cff87e35df2ccbc30b4749
2020-04-20 20:27:13 -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
Volker E 0246446196 Bump MediaWiki version requirement to v1.35.0
Change-Id: I0743756cc97bbdb31b4b533f1647211fea845063
2020-04-17 16:14:29 -07:00
jdlrobson 2e32f41fd3 Drop skins.minerva.icons.image module now cache has cleared
Bug: T244444
Change-Id: I181d41f60481efa904d5e951cf08480bbae82015
2020-04-10 17:36:46 +00:00
jdlrobson 8d1576aaaa Drop unused upload and logoWikimedia
Change-Id: Iaaa1a3455b0157475945c9721bcf71aa3c561d9c
2020-04-02 16:53:18 +00:00
jdlrobson 276ae636fe Use standardized icon classes and fix some missing icons
The icon pack wikimedia.ui was strangely using a non-standard
icon class using empty strings as a way to disable the default behaviour
of setIcon. Instead of fighting APIs - use the methods available.

The icon pack is also renamed to reflect what it's actually used for -
providing icons for overflow menus and it is no longer loaded as a dependency
by skins.minerva.scripts

Fixes issues with:
* History icon with AMC disabled and user is logged in
* Table of contents icon
* Language icon when it appears in overflow menu on user pages
when logged in where AMC is disabled
* listBullet appears in 2 modules as it is used in 2 places - the AMC
overflow menu (log icon on user overflow menu) and for table of contents
(JS only)

Bug: T232383
Change-Id: I05220ffa56195be6a594e3a8a57ae16858088444
2020-04-02 01:37:33 +00:00
Volker E 98d3225fc8 Rename several icons to WikimediaUI naming
Renaming to WikimediaUI standard naming and adding to module
skins.minerva.icons.wikimedia which is loaded via addModuleStyles
 'edit' → 'editLock'
 'edit-enabled' → 'edit'
 'toc' → 'listBullet' (already included in wikimedia.ui module)
 'mainmenu' → 'menu'
 'language-switcher' → 'language'
 'clock' → 'history'

Icon `page-actions-overflow` which is only needed on AMC is moved out of the stable icon
pack and added to skins.minerva.mainMenu.advanced.icons temporarily which is loaded on AMC pages only:
 'page-actions-overflow'

Additional changes:
* Renaming 'clockIconClass' to 'historyIconClass' to stay on name.
* Module `skins.minerva.icons.images` is deprecated and shipped for old
HTML markup. It will be removed in 2 weeks.

Bug: T232383
Change-Id: Ia3bafc74a85293c2414c0ef4ccf3bb20c75135d1
2020-03-31 11:48:57 -07:00
jenkins-bot 8a85cd2ae6 Merge "Remove unused 'talk' icon" 2020-03-28 23:28:46 +00:00
Volker E 0f5f376b64 Remove unused 'talk' icon
Bug: T244444
Change-Id: I42f60785c4693da7542a61e0ad415850175cb0f5
2020-03-27 18:06:37 -07:00
Volker E cc05fb9aca Use 'download' icon from OOUI
Bug: T244444
Change-Id: Ic65303b42c7b37c4017b98897139273f15ee1598
2020-03-27 17:01:51 -07:00
jdlrobson 6b6c6b8d6e Menu items added via addPortletLinks should look like other menu items
Requires `I4c477c88ce48484960e40609cd243e63639175bc` to function.

Bug: T236711
Change-Id: I331912a1cd6cd4293c22a1a48bb32cdec48bd37d
2020-02-29 00:11:28 +00:00
Volker E c2bed81acd Remove unused 'warning' icon
Has been introduced in I8d11e655cc and after removal of
cleanuptemplates.js left behind.

Bug: T244444
Change-Id: I47ba73bc528241d98e8f593dcaec3948273fc819
2020-02-25 11:29:40 -08:00
jenkins-bot e838fcec22 Merge "Deprecate wgMinervaCustomLogos in favor of $wgLogos" 2020-02-20 00:29:22 +00:00
jdlrobson 51a348097d Deprecate wgMinervaCustomLogos in favor of $wgLogos
Testing:
```
// Start with no Minerva config and no wgLogos defined in LocalSettings.php

// Set $wgMinervaCustomLogos
// Should trigger deprecation warning.
$wgMinervaCustomLogos = [
	'copyright' => 'https://en.m.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-fr.svg',
	'copyright-height' => 40,
	'copyright-width' => 120,
];

// Set wgLogos without wordmark
// Should trigger deprecation warning as $wgMinervaCustomLogos is still
// defined.
$wgLogos = [
	'1x' => 'https://en.wikipedia.beta.wmflabs.org/static/images/project-logos/enwiki.png'
];


// Set wgLogos['wordmark']
// No deprecation warning. $wgMinervaCustomLogos will now be ignored
// in favor of the new wordmark key.
$wgLogos = [
	'1x' => 'https://en.wikipedia.beta.wmflabs.org/static/images/project-logos/enwiki.png',
	'wordmark' => [
		'src' => 'https://en.m.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-fr.svg',
		'height' => 40,
		'width' => 120,
	],
];

// You can now safely drop $wgMinervaCustomLogos.

```
Depends-On: I66a971631c623cc94b58eb0e5e5bad804789bf1c
Bug: T232140
Change-Id: I013bd0904fe8c55efa49d14e84cf06ec1412896f
2020-02-19 23:59:28 +00:00
jdlrobson 7f47dff5e5 Use icons in skins.minerva.mainMenu.icons from OOUI
For all mainMenu icons pull from OOUI icon packs.

We make the necessary changes to Definitions.php, ToolbarBuilder
and LogoutMenuEntry to ensure to update icon glyph names.

There are caching implications for icons that show to anonymous users -
these have been fixed for grade A browsers running JS by appending the
new class to impacted elements.

Grade C browsers being served cached HTML will not benefit from this
emporary fix as available solutions are costly.
As a result these users will not see icons until the cache
expires (maximum of 4 weeks but likely 1 week) or is flushed via
action=purge.

This is acceptable given the amount of impacted users and the fact that
icons are not essential for using the main menu.

Note: The communityportal.svg icon while in the resources folder was
not referenced anywhere in the codebase so its removal is safe.
Please note the same icon in skins.minerva.mainMenu.advanced.icons which
is used for the community portal menu item.

Bug: T244444
Change-Id: I0f929f2f3b11362e02f0d02f57b90b34b5c93d24
2020-02-17 20:36:28 +00:00
jdlrobson a3179d8fff Use user sandbox icon from OOUI
It's called 'markup'. Since this icon only ever shows to logged in
users there are no caching implications.

Bug: T244444
Change-Id: I75f5365ccb5a41f1c0628532e81b5ec63804a2a8
2020-02-07 03:39:08 +00:00
jdlrobson 041091864d Remove duplicate icon loading
"login", "watchlist" and "logout" in skins.minerva.personalMenu.icons
are already defined inside skins.minerva.mainMenu.icons which is
loaded on all page views via CSS so we are loading this icon twice for
no obvious reason. This is why ResourceLoader modules should never reference
files outside their own module folder!

Change-Id: I2097802cc2d42483ef4bdd1ccfa05e0f7b1bcad4
2020-02-07 10:53:35 +08:00
Phuedx 6e4c6c99bc Revert "Reduce 'userContributions' icon code"
This reverts commit 7b4b65a30f, which
caused a regression in the user menu part of Advanced Mobile
Contributions mode.

Bug: T244436
Change-Id: Ifce627dac35b2cd05e1c5ebe658534b6b8d0de88
2020-02-06 11:05:26 -08:00
jenkins-bot b216b8187f Merge "Dev: Address some FIXMEs" 2020-02-05 00:24:25 +00:00
Volker E 7b4b65a30f Reduce 'userContributions' icon code
Also rename it to unified DSG/OOUI name and add standard XML declaration.

Change-Id: I6c908acd70c0dca5bcb1754d1b25d3da2389feb8
2020-02-04 09:54:22 +08:00
jdlrobson 1e64fc8f3d Dev: Address some FIXMEs
* Drop non-existent pointer-overlay selector
* Drop redundant icon class for arrow
* Drop unnecessary !important
* Drop transparent-shield class
* Reword an existing FIXME about a contensious decision and
add a new FIXME for moving some code to a more appropriate place.
* Move an image into a ResourceLoaderImage module (test with
`mw.notify('error', { type: 'error'} )`)

Change-Id: I6e38f07772afae6f13c4851ca17a67d52ca7d331
2020-02-03 08:43:18 +00:00
jenkins-bot 4c6875a793 Merge "Reorganise stylesheets" 2020-01-29 10:05:50 +00:00
jdlrobson 1f584195de Reorganise stylesheets
All stylesheet-only ResourceLoader modules now have a single entry point
rather than multiple files. This eases compilation of the content of
those modules by all toolchains, which will be useful when introducing
the bundlesize tool.

Change-Id: Ic38a3e51db2f419fe68efd23a2c48ee69218a526
2020-01-29 09:46:18 +00:00
jenkins-bot f090ffa321 Merge "Ordered lists per default receive correct numerals (finally)" 2020-01-28 20:16:24 +00:00
jdlrobson c42f4d3450 Ordered lists per default receive correct numerals (finally)
This makes use of the ResourceLoader change in
I1c1e2b912a41d29565e45e9e536c68ac46deb0e1

Bug: T217616
Change-Id: I30632a8c12abf634fc8031ac588c36a412c7abbd
2020-01-24 12:05:26 +00:00
jdlrobson 2bf442db12 Diff styles for moving paragraphs and empty lines
* Fix styling of empty lines - cover full width
* Disable the pseudo element shipped in core
* Move styles from mobile.special.mobilediff.styles into mediawiki.diff.styles
since the latter is always present, the former isn't if MobileFrontend is not
available.

Bug: T242310
Bug: T243235
Change-Id: Ic7d12fe890622e7b3ccc7bc56765f505ac0ab651
2020-01-20 22:08:53 +00:00
jdlrobson db29aa53bd Make MobileFrontend dependency a soft one
This extends the work in Ie29a1eb7746d56f7d8c99b74e5e3c213c30fdcf2

Bug: T171000
Change-Id: Ib125e1bdaace1893804892909c27a9f328445835
2020-01-17 14:02:23 -08:00
Ammar Abdulhamid 7728b0b743 Upgrade skin.json schema to manifest_version 2
Bug: T242505
Change-Id: Iccc217fe695270c5a04811fdca5bd65c26ae6609
2020-01-11 06:10:35 +01:00
jenkins-bot acb42e4fad Merge "Simplify menu code" 2019-12-19 22:34:52 +00:00
jenkins-bot 357c9599ab Merge "CtaDrawers no longer stay behind in DOM" 2019-12-19 20:59:01 +00:00
jdlrobson 3c5edfa5cd Simplify menu code
Now the main menu is not using JavaScript we can simplify
the menu code to apply only to the Echo navigation drawer.

Bug: T225213
Change-Id: If4831fc700c7df3a2a389b5f95b6fbaea4b7d954
2019-12-19 12:14:13 -08:00
jdlrobson 48adb2c5bf CtaDrawers no longer stay behind in DOM
A new controller is added - drawers.js with methods for controlling
display and removal of drawers. The existing code in references is
moved there and extended to support scroll to hide behaviour

Console warnings will disappear with this change.

Additional changes:
* Standardise the page issues element selector - should be the container
not a link inside it (was a red link so triggering wrong behaviour)

Bug: T214045
Change-Id: Id4719b5209dd7647775e2959e46dbae0c3dde3ac
2019-12-19 19:56:02 +00:00
Jan Drewniak f5bef2ea5c Main menu button works without JS
Converts the main menu button to work without JS using the CSS-only
"checkbox" hack, using the ToggleList module from the dropdown menus.

Bug: T225213
Change-Id: I0eff0439f7284ec74f6304324fab409e8a1b6245
2019-12-19 19:55:39 +00:00