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
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
* 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
* 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
* Adds alt attribute with a value of the `mobile-frontend-sitename`
(previously called `mobile-frontend-footer-sitename`). The message was
changed because this affects both the footer and the header's logo.
* Adds a `minerva-footer-logo` class to the logo in footer.mustache in
preparation for changing that element from an h2 to a div. Given caching
issues (old CSS with new HTML; new CSS with old HTML are both
possibilities), we need to do this in two separate deploy cycles.
Bug: T288362
Change-Id: I3ecbf8fdcae72a0ded7f60c559259f312b8ef15d
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
The hook lets us hand off the decision of whether to suppress this to
DiscussionTools, which has a slightly complex set of feature-tests to do
before deciding. It seems better to leave this disabled only when DT
will actually be stepping in.
Bug: T280051
Change-Id: If6b70fb6d801ac04fa3b70c153a2136d2e302f28
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
Allow Users with the needed permissions to delete, protect or move pages in Minerva on mobile version.
Bug: T231291
Change-Id: I1e438b7d3683d288a8a6c5a9f5dcea6b3b3d9f71
As of db3c8ea16b3 the mediawiki.toc.styles module is no longer
loaded by the skin, so Minerva no longer needs to remove it.
Bug: T252774
Change-Id: Ia2df978e2d0349a55620ef45f8c0827134b7c74d
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle
The following sniffs now pass and were enabled:
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
Change-Id: Ib605f800c2ae0e521c034c1f49d98cbca546b720
The data already provided by SkinMustache makes the existing
Minerva code redundant.
* html-after-content functionality equivalent to dataAfterContent value
* Rename license and last modified to have html-minerva prefixes and promote
to top level data object. This allows us to distingusih Minerva values from core
values.
Note: previously the logo used srcset to ship a 1x logo but these
were dropped during the desktop improvements work.
Bug: T256083
Change-Id: I7b2cd5181eae67b345f6686e3389a76a12e3b1a1
This begins the migration of Minerva to SkinMustache with the smallest
possible change.
In future, we'll be able to eventually wean ourselves off of the
MinervaTemplate class and considerably reduce the code in Minerva
Bug: T256083
Change-Id: Id0f617cfdb698754addc79b26491b9d846513c87
I6e69b482cdbc adds a viewport with the same value as defined by Minerva.
Bug: T258290
Depends-On: I6e69b482cdbc49c09adc6f7cee54f5e17b7c92c4
Change-Id: Ie8ed80f734b20a16bc1c70a94d40290909180c3b
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
OutputPage has similar method and they are being used
interchangeably here. Let's stick with one.
Bug: T257992
Change-Id: Ia5a0fbf114f6a1fec6fb85e01a408edae8a5badb
This means dropping usage of Skin::addToBodyAttributes method from
parent Skin class to pave way for its deprecation/removal.
Bug: T255698
Change-Id: Idab13c37002ac5663f292e4f4b4ff51eb7573fda
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
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
The MobileFrontend section numbers that were used here only count
top-level sections, but this value was passed to code in
MobileFrontend's TalkSectionOverlay#onSaveClick, which uses an API
expecting the standard MediaWiki section numbers.
Extract the section number from the section edit link, like we do
in mobile.init/editor.js in MobileFrontend.
Also, disable the special talk page view unless we're viewing the
latest revision of the page. That could also lead to posting in the
wrong section, as sections are often added and removed, which changes
the numbers.
Bug: T252828
Change-Id: I553a508658804dd8672f2268b7118f77458a9dba
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