Commit graph

346 commits

Author SHA1 Message Date
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
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 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 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 d138fa5cdb Merge "Restore title to mobile skin without logo" 2021-10-21 16:22:40 +00:00
jdlrobson 894364a3eb Restore title to mobile skin without logo
Bug: T290525
Change-Id: I6eb120a08d15b308d2a4df99900ab86042612b0c
2021-10-21 15:16:14 +00:00
Vadim Kovalenko adc4f899d8 Move skins.minerva.content.styles into skins.minerva.base.styles
Remove redundant skins.minerva.content.styles option

Bug: T266361
Change-Id: I8cb20024b648b4a266dd4af9623a896d16bf22da
2021-10-20 15:29:48 +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
DannyS712 de0f2fed40 Inline single use module skins.minerva.icons.images.scripts
Only used in one place, as a dependency of skins.minerva.scripts,
and only used to collect other dependencies. Does not need its
own entry point, merge into user.

Bug: T266361
Change-Id: Icc9ecaaec81730d30d7d8b45f1c70764a97de300
2021-09-29 02:59:32 +00: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
jdlrobson 8c1afd97a3 Minerva uses centralized link styling colors
Making Minerva use the `elements` feature is not
practical at the current time. In lieu of that, we
update the link colors to use the core definition.

The red links and external link colors
can come from the "content-links" module.

This also adds support for the underlining user link preference
and better plain link support.

Bug: T274717
Change-Id: I600257e6f4430f166331c4ea4f3a72d87aa377d8
2021-09-02 14:55:24 +00:00
jdlrobson 9fa0f3a64d Use MediaWiki UI version 2 from core in Minerva
Depends-on: Ibc136a17662ae839f90babb21e0f7e8f27b7a7d5
Bug: T191021
Change-Id: Ifdc3a3273aa93129177a11814651ec811c20f49c
2021-07-20 11:59:23 -07: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
jenkins-bot fb18094a40 Merge "Move skins.minerva.content.styles into skins.minerva.base.styles" 2021-06-22 18:44:03 +00:00
jdlrobson c764cc62d4 Category feature not ready for logged in users
When removing the category overlay this for AMC
as part of Id8c7493a525844b43c1628a1f4f09ae716ece2ba
the feature was enabled for logged in users unintentionally.

Bug: T246049
Change-Id: I1be90b22afa1f6ad5094131485b38253d422cb11
2021-06-21 13:57:12 -07: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
jenkins-bot 8900f58e2f Merge "Replace categories button with HTML rendering" 2021-06-07 08:58:44 +00:00
jdlrobson 4a6dbd3f29 Enable wgMinervaApplyKnownTemplateHacks by default to reflect production
This will give consistent bundle sizes across CI

Bug: T283182
Change-Id: Ife597ad5e6f160e4fa576041caffc672f3bfcf55
2021-05-27 20:37:53 +00:00
Jdlrobson 8651df02bb Replace categories button with HTML rendering
Bug: T246049
Change-Id: Id8c7493a525844b43c1628a1f4f09ae716ece2ba
2021-05-14 20:34:59 +00:00
mainframe98 87934a3034 Use content-body skin feature
This styles parser errors, which were previously unstyled.
It removes the need for the clear for the table of contents
on stub pages

Additional change:
* The base styles module increases with this change
* While testing bundlesizes I noticed that the bundlesize for the
content styles is outdated and have updated it (this is unrelated
to the inclusion of the new feature)

Bug: T281228
Change-Id: I8e099b18f0866201cba378f6110913cdab478c4c
2021-05-14 15:42:19 +00:00
Alexander Vorwerk 9494e1dc80 Drop unused class and style
Droping the unused .navigation-full-screen class and the unused MobileMenu Skin style. This is a follow-up work on: I30b1af8b88dd146d62f0de7a6352c4117a7cdd90

Bug: T252005
Change-Id: Ia1698b5477a159f17a16a6591ee774920f403b79
2021-05-02 17:42:43 +02:00
DannyS712 c3be4716fc Bump required version of MediaWiki to 1.37+
Needed to be able to use the new WatchlistManager methods

Bug: T281187
Change-Id: Ide0cb084fd11aba5bce6f7e70d5f514309fa533f
Follow-up: Ib6f21b41b0a82ab4c48db6eb36d4417c05f30637
2021-04-28 19:01:16 +00: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
jenkins-bot 9436b533dd Merge "icons: Put reference variant only on external link icon" 2021-04-26 08:02:59 +00:00
jdlrobson 685387220f Message box styles for Minerva come from core
Just as before styles for message boxes will be
kept off the critical path of most page views and
loaded on special pages, old revisions and action= URIs,
however unlike before the CSS will come from the definition
in core.

It must also be loaded in JavaScript for compatibility
with the use of warnings in JavaScript, for example 
MobileFrontend overlays.

This change will allow us to remove the
mobile.messageBox.styles module in MobileFrontend
I8b6bdfceaf33b9527dbe6790d2a39e335fb692b2

Bug: T233160
Change-Id: I7d8d1d34621c36c26ec03a3773d4d1e67bd14f2e
2021-04-12 21:45:53 +00:00
Volker E 01302c6285 icons: Put reference variant only on external link icon
Change-Id: I94587e0695b211b6a92ddf155ab1dd2991c17739
2021-03-24 03:59:42 -07:00
Volker E 3b1dc8b431 icons: Update to latest 'search' icon and remove obsolete code
Removing historically grown code and icon and replace by latest
'search' icon. It is slightly smaller 18x18dp on 20x20dp canvas, and aligns with 
icon guidelines of Design Style Guide.

Bug: T213580
Bug: T275563
Depends-On: I752ea81aaff51059af942daa008a1b898dbc2d06
Change-Id: Ia7f50ec7534e303dcfd311b301a764936f7729df
2021-03-09 08:21:23 +00:00
Piotr Miazga (polishdeveloper) 5a2527d71d Drop smart logout handling in favor of core ready.js
MediaWiki core added support of overrideLogoutSelector skin
config variable which allows us to define the logout button
selector. Thanks to that we do not have to ship our
custom/duplicated smart logout handler as we can use the
one shipped with ready.js.

Depends-On: Id313337c85229a5e8d0aada3a67d722048709597
Bug: T259200
Change-Id: Ie0192a176dfa8be994a544221aa71de75028d502
2021-02-11 17:26:47 +00:00
yash9265 b14d4e04af Add max-width limit to empty watchlist page
On the Watchlist, when there are no results, the page uses .info and
.empty-page classes. This results in text running without max-length.

Add max-width rule to contain it.

Bug: T222872
Change-Id: I768f800a49e756da1ad2c123c842c37d18fa3310
2021-01-21 19:49:32 +00:00
DannyS712 ac6aaa1920 Bump required version of MediaWiki to 1.36
Bug: T252774
Follow-up: Ia2df978e2d0349a55620ef45f8c0827134b7c74d
Change-Id: Idd8243fbe261661e1d3cb3bce53c1c3cce3da1d3
2020-12-09 17:18:38 +00:00
Florian 557529546e Change default of showing sitenotices to true
Wikimedia-related configuration (false) now lives in mediawiki-config
which allows us to move this value to the default of true, which should
fit most other wikis better.

Change-Id: I8060ed5e67370e35f7552b3191f2864fbeb6418e
2020-12-02 16:54:57 +00:00
Volker E 32724f8183 styles: Implement mediawiki.skin.variables.less for MinervaNeue
For now, only define:

- @font-family-sans (unused in MinervaNeue, but for possible future use)
- @border-radius-base

With current implementation before this patch, MinervaNeue is relying on core's default
`@border-radius` which is set to `0` to be close to HTML default. 
MinervaNeue is currently not applying correct skin's `border-radius`.

Bug: T263270
Change-Id: I9a149eefd15efede27416ada4db07072e53628ec
2020-11-02 17:56:40 +00:00
jdlrobson ed0222b0d0 Remove client side error counting
Bug: T266359
Change-Id: I5350c801e7ecb7b8b28e54410cc57fd3b548b2ef
2020-10-23 11:09:22 -07:00
jenkins-bot c4fe18bd4b Merge "Fix style of clock icon in changes lists" 2020-10-06 17:15:02 +00:00
jenkins-bot aeaa20d88f Merge "watchstar: Add temp-watched css class when expiry is present" 2020-09-25 06:49:42 +00:00
Dayllan Maza 0fc40f71c5 watchstar: Add temp-watched css class when expiry is present
MobileFrontend extension is currently tracking watched/temp-watch
css classes and applying animations to the "watch" event.
This patch starts adding temp-watched accordingly now that the
expiry is part of the event's data.

Note: this patch does not fix the lack of animation when transitioning
from half-star to empty-star or on page-load when the page is
temporarily watched but it fixes the awkward angle the half-star
icon was left in when transitioning from a full-star to a half-star

Bug: T262862
Change-Id: I1c8cb9c33cda76b87b6a9f15e408d88edbf61d93
2020-09-24 12:21:33 -04:00
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