Commit graph

905 commits

Author SHA1 Message Date
Inductiveload c4e5cbc9a7 Make missing links in tabs red like all other skins
It's extremely annoying to not know if the link you're about to click in
a Minerva tab is a link to an existing page or not.

So, make the new link red, as is customary in all other skins.

Bug: T236608
Change-Id: I3445f91fe0bcf1ddb305f8c350753e10c2dda0b0
2021-10-19 11:33:42 +01: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
jdlrobson 3a88911209 Remove whitespace to right of search input in overlay
Bug: T292107
Change-Id: I1143747600a1ffb25dcfe8600c5cd352afb25159
2021-10-12 16:26:53 +00:00
jenkins-bot 30e8b34702 Merge "Remove non-standard components folder" 2021-10-08 23:09:57 +00:00
jdlrobson d990f99b9e list-header styles should be specific enough to override h2 styles
Change-Id: I83e6992b0a63f456e1c2f7d17c87cbfc903d9c60
2021-10-06 23:56:37 +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
Derk-Jan Hartman c0c9a82851 Rework the Minerva ToC
- reserve space for the icons
- break long urls in the ToC
- fix right margin on the ToC
- support without JS

Bug: T292338
Change-Id: Ic279047f297fa132b87b77b6d7127b797015f92a
2021-10-06 10:47:56 +00:00
jenkins-bot 7f9bbebf8c Merge "Search header should be vertically centered, not top aligned(take 2)" 2021-09-29 17:56:02 +00:00
Jdlrobson e09a336500 Search header should be vertically centered, not top aligned(take 2)
The 27525d0bff change renamed header to minerva-header, but neglected
the fact that this class was being used in the Overlay as well.

Bug: T292071
Change-Id: I05c1589723b68cf07c874f299f1960548f53e8ff
2021-09-29 16:21:34 +00:00
jenkins-bot 70bebc20d9 Merge "DownloadAsPdf follow ups" 2021-09-29 09:16:20 +00:00
jdlrobson 511cabfadf DownloadAsPdf follow ups
Follow up to
9833b2d853

- Rename timeout to printSetTimeoutReference
- Remove redundant function
- update documentation to mention side effects

Change-Id: I4c1b356da3ba53e805d126642f0b2da915b988e5
2021-09-28 10:49:58 -07:00
jenkins-bot d305a11a30 Merge "Change footer logo from a heading element to a div" 2021-09-28 17:31:00 +00:00
jdlrobson 9833b2d853 Fix the download link to use addPortletLink
Bug: T291739
Change-Id: Ice79e1d5745116c0bf4b292371f4b43edbcc054c
2021-09-27 21:54:17 +00:00
jdlrobson e9e336a679 Enhance icons of previously added items
If addPortletLink is called prior to setup.js only the last
link will be enhanced. To avoid this problem, check existing links
when registering the hook.

Bug: T240910
Change-Id: Ifd46b26401b8eb20686882577edf404a15eaf155
2021-09-27 21:52:08 +00:00
Nicholas Ray 6067d2689b Change footer logo from a heading element to a div
Also, remove old CSS selector that was preserved for caching.

Bug: T288362
Change-Id: Iab3531229b64e0b9ee9268f6480a1417872d6107
2021-09-27 15:04:55 -06: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
Nicholas Ray 6df49e3da4 Add alt attribute to logo
* 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
2021-09-22 02:01:42 +00: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
jenkins-bot b6010a97da Merge "Minerva uses centralized link styling colors" 2021-09-14 15:25:08 +00:00
bwang 54a691e37f Remove font-weight bold from links in MainMenuFooter
Bug: T282315
Change-Id: Id62ea6c3f137986bb5f79036b0a656e6cb357017
2021-09-02 21:12:12 +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
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
Nicholas Ray cb79cbb010 Add max-width to AMC user menu
Note: This menu already has text-overflow: ellipsis, but didn't have a
max-width applied.

Bug: T287522
Change-Id: I51fd7f4b822410190290bef6c962997bb5e47e4f
2021-08-03 17:02:17 -06:00
jdlrobson ca18ad75d3 minerva-header class is now in cached HTML, remove old header class
This completes the migration from header to minerva-header

Bug: T172626
Change-Id: Ibb86359e683e08d86091f855e3813a99e0ad2cee
2021-07-20 18:36:39 +00:00
ExE Boss 27525d0bff Fix style conflict with content using class="header"
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
2021-07-16 20:39:24 +00:00
jdlrobson 4f2f1bb349 Drop duplicate styles in Minerva
These styles are also applied inside MobileFrontend as they should apply
to all skins, not just Minerva.

Several styles for desktop Minerva are amended with a comment.

Bug: T253370
Change-Id: Ib23024d192f331ef76007dbd9ef54596cc1adb0c
2021-06-28 12:26:12 -07:00
jenkins-bot fb18094a40 Merge "Move skins.minerva.content.styles into skins.minerva.base.styles" 2021-06-22 18:44:03 +00:00
jdlrobson 18ad3fa457 Address some FIXMEs in styles
A comment says that the line of code can be removed after cached
HTML is not a problem. This code for ui.less was added in April 2019, so is
not a problem. The code for footer.less was added in April 2020 so is also
not a problem.

Another comment says external link unsetting can be removed after
a ticket has been resolved, which has been resolved and I can confirm
is no longer needed.

The header > div a rule only matches the link wrapping the logo
inside the branding-box. It no longer matches the hamburger or notifications
icon  which make use of nav elements, and to make matters worse
interferes with the goal in T282473

Bug: T285261
Change-Id: Ie7777b4b53355cf0dc48d6447f63299156254b6c
2021-06-21 17:56:48 +00: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
Clare Ming cc2fd8d66f Remove SearchLogger
Remove the searchLogger as part of the bigger cleanup to remove MobileWebSearch schema in MobileFrontend

Bug: T282167
Change-Id: I13db335859adc93d92acf3228bf381fc4c81898d
2021-06-10 15:50:57 -06: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
Derk-Jan Hartman 9524dae241 Set a fixed table header text-alignment
This is important, as text alignment is inherited and often
overwritten in wikicode by the table element, with the expectation
that the header alignment remains, as other skins have the text
alignment for headers as a fixed property.

Bug: T240106
Change-Id: Ifc6a2bbc47ce8c6d5b1fa9d98a4d3278716993d2
2021-05-06 08:50:49 +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
Volker E 28394a1367 build: Upgrade 'svgo' to latest and re-crush SVGs
Upgrading to SVGO v2.3.0 and changing over to new JS config.
Also amending svg check shell script and re-crushing
all SVGs.

Bug: T278656
Change-Id: Ic52d7eb595073e5bde166e5cf5767772c5eb60ce
2021-04-20 17:45:18 +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
Cormac Parle 8b55462bc0 Read default search page from the existing search, pass to MobileFrontend
Bug: T279057
Change-Id: Ib2661f5bf335aef819b80ebd691c57e2508571a0
2021-04-01 17:36:18 +01:00
Volker E 9de2b0101a styles: Remove obsolete -moz- vendor prefixed properties
Bug: T278670
Change-Id: I60dcd4873a2e4acd2f23148907321d1b8581743d
2021-03-29 03:12:57 -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
jdlrobson 5d6ffe7072 Table of contents should not trigger reflows in layout
Make sure the table of contents doesn't change size when it is
enhanced by JavaScript.

Take opportunity to fix alignment of table of contents based on
20x20 icons (previously 24x24) and icon/heading alignment.

Bug: T268787
Change-Id: I4ac26068687579484381af5b08e680e3a65f8f1e
2021-02-18 22:19:35 +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
jdlrobson 99a78e6fae Avoid errors on malformed URIs when loading media viewer
Previously overlay manager required an Overlay or Deferred return
type, now it must be an Overlay.

On top of this, the media viewer must consider URIs that cannot
be decoded, so a try/catch is required.

Bug: T262703
Change-Id: Iac4bcfedba87c61021d7887155612c451f8e83b4
2020-12-04 19:34:51 +00:00
jdlrobson a7db7341ca Last modified bar should not show external link icon
A new rule resetting padding-right and background-image on
a.external inside footer is added.

Additional change:
* Merge all styles relating to the last modified bar into a single
component file for consistency with Vector and easier lookup.

Bug: T267464
Change-Id: I558f0756264e92ca757a99e47a53564c3ecd8b71
2020-11-17 03:36:01 -08:00
jdlrobson 1b9ec30472 Apply workaround for iOS menu bug to next 9 minor versions of iOS
Bug: T264376
Change-Id: I569e7dd5eae888de42f81f3973a23fb832b2c942
2020-11-04 14:38:03 -08: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
Volker E e6370e9aec Amend blockquote spacing to Design Style Guide
Also ensure not to inherit whitespace on blockquote children.

Bug: T265947
Change-Id: Id92746233c6e888a543c4d97db25f79df61ec99d
2020-10-30 13:28:51 -07:00
jdlrobson ed0222b0d0 Remove client side error counting
Bug: T266359
Change-Id: I5350c801e7ecb7b8b28e54410cc57fd3b548b2ef
2020-10-23 11:09:22 -07:00
jdlrobson 12940ac3eb Special handling for hash fragments we cannot decoded
Bug: T264914

Change-Id: Ie0aa321b5a267728881f75c498fa75929afcc972
2020-10-20 12:26:54 -07:00
jdlrobson 02ebb84ea0 Hot fix: Use display for hiding/showing sidebar on OS 14_0
Note, this removes a visibility animation.

Bug: T264376
Change-Id: I3589c615a8739e5ece6538acf42ff1292be84d71
2020-10-06 15:58:41 +00:00
jenkins-bot aeaa20d88f Merge "watchstar: Add temp-watched css class when expiry is present" 2020-09-25 06:49:42 +00:00