This fix was already applied to the main menu in change
Idc603ccaeeb42f60899059ebb51226e8a20a969d
Bug: T301056
Change-Id: Id31fa76f40aab44672efc51fb981d481c27f1ff8
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
Now whole area of last edited section (from edge to edge) is tappable
and linked to history page.
Bug: T163853
Depends-Onː I3d1f272a27c5c9b0b0928b5c0eaeb3f6e270532b
Change-Id: I3c35bbaafea3376cd2f9dccfd13bfe4845fd6823
Remove using of User:getOption since this method
will be hard-deprecated. Now it is soft-deprecated.
Bug: T296083
Change-Id: I9f762cf27d7c778c8c391cde1409b510bd3e4e67
In 894364a3eb we moved the section tag for data-logos outside Logo
but did not add it to the footer
Bug: T295773
Change-Id: I52c07e95ac8166e9e9d11aba7cb3130cc6a2f8d7
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
Follow up 7530f1c with some refactors
to remove the $pageActionsMenu and
$contentNavigationUrls properties by
calling once in getTemplateData
Bug: T293815
Change-Id: Ia7877abbecf41bbae7627ce7924d0f0871efa479
- Update SkinMinerva class to output data previously handled by MinervaTemplate.
- Update relevant templates with updated data keys.
Bug: T293815
Change-Id: I33df396b07c4d2d9c1c5743d90dc54cdbd3345af
This results in log events for clicking the following on a talk page:
* Read as wiki page
* Section headings
* the "add section" button
To test install WikimediaEvents and set
$wgWMEMobileWebUIActionsTracking = 1;
Bug: T294738
Change-Id: I8dbad7f4e72cfd081896480ba142b4e1e3029bcd
After this change, in desktop Minerva the copyright
text in the footer should match desktop Minerva.
In mobile Minerva the copyright text in the footer
is shortened and doesn't contain terms of use.
It should match Vector mobile
?useskin=vector&useformat=mobile
Depends-On: I3473908e08f643b4c60aafc470dd124516955323
Change-Id: I2895975aaa1d09d228f80aff74381e88034a0137
Bug: T289401
- Remove usage/references to MinervaTemplate::getHistoryLinkHtml, html-minerva-lastmodified
- Add data key for history.mustache template.
- Update footer template to use new data key.
Bug: T292554
Change-Id: Id5fbf61ba181a0088a25e77175b808362963c63b
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
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
* 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
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
* 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
Avoid indirection to QuickTemplate variable by using
SkinMinerva (SkinMustache) version.
To test:
* Create User:Admin/sandbox
* Create User:Admin
* Visit User:Admin/sandbox to see the breadcrumb "< User:Admin"
Change-Id: Icdd10bd1406ea047097309b6fcafba399170d019
Follow up to 27525d0bf
During task sign off Nick raised the concern that new HTML
can be served with cached CSS for up to 5 minutes after a deploy.
We decided to restore the class for one deploy cycle.
Bug: T172626
Change-Id: Ie5a2e45f31a468bbe425a27236ad1255950807a1
Content using `header` as a CSS class was affected by skin styles
in Minerva being insufficiently specific to the skin‑specific elements.
This changes Minerva to use `class="minerva‑header"`, thus avoiding
the conflict and matching what Vector does.
Bug: T172626
Change-Id: Id8fbe61b2d1d4a89ec11ddfdf7837be797b3bd20
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
Remove using of User::isIP since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T275602
Change-Id: I01a0c2ef4d750cf0e81a9345ee462787d4ee28da
While dropping support of smart logout in favour of core ready.js
logout, we noticed that the logout selector is a little bit too weak.
Editors could make a link on a page that would work as a logout
button. The easiest way to prevent this (and any other possible
problems) is to add `data-mw="interface"` attribute to all generated
menu entries.
Change-Id: I22611b9641d82328623beb3f693bf7cddb2289ff
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
* prebodyhtml is never defined
* isSpecialMobileMenuPage is never used and the Special:MobileMenu
page no longer exists
Change-Id: I6481ef08f9d88e9be3cb5568bfa6693b1b3f1b8f
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
This reverts commit ae8e3ad58b.
Reason for revert: This led to T260155 as the internal class uses
isSubPage which is not available on LinkTarget
Bug: T260155
Change-Id: I783f41e70cf1cf3b91737bce9cbf9ac729a778df
SkinUserPageHelper::__construct() should be able to consume a LinkTarget
too as NamespaceInfo::getSubjectPage() method returns a LinkTarget and
the Title::getSubjectPage() is deprecated.
Change-Id: I08bfc9bb21772b450798b6354bee2ab09d5dba4d
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 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
Rather than rely on something being set on MinervaTemplate go
straight to the source of the license message
This change will allow us to deprecate usage of
SkinTemplateOutputPageBeforeExec inside MobileFrontend
Bug: T60137
Depends-On: Id83ef2f2cba1dce940f89125b5cd26a29421ee48
Change-Id: I5317cd707418350847085d406c3749f19106d6ba