Commit Graph

143 Commits

Author SHA1 Message Date
jdlrobson 922f4a09e4 Remove unnecessary file for gallery styles
This should have been removed back in 2015.
See I0ef5c2d5a9019355aa3a158f9e489df02975e0af
Gallery styles come from mediawiki.page.gallery.styles

Bug: T190215
Change-Id: I87713164e1c3906b341a4fb17be424307f8fa428
2018-03-20 22:12:04 +00:00
Volker E 759590873b Replace `#toc` selector by `.toc`
Replacing id CSS selector by lower specific class selector.

Bug: T187808
Depends-on: I7f3a9df7f9fd1178986112b5265b1ae7c991d5b7
Change-Id: Ib1a874b644e80a26ff415003684f6ce54fd2b7e6
2018-03-20 01:49:43 +00:00
jdlrobson cfd5fbbde8 Add icons for all the types of issues
More hackery!
This adds some tests and ensures that our own icons are mapped to the
existing template icons.

Bug: T187916
Change-Id: I49073f22995c6730369235d6039939915ba2079c
2018-03-15 15:02:05 -07:00
jdlrobson eaa2692da0 Use jsdoc for generating Minerva documentation
Given the level of documentation in this repo is extremely
low now seems a good as time as any.

The resulting documentation is a vast improvement on before
grouping functions to an owner and introducing module names.

We can iterate on the documentation over time.

Bug: T138401
Change-Id: I9e787d40931d3d72a7037ce07d3ab0db8e72d825
2018-03-15 15:01:41 -07:00
Volker E 19d9a6367b Replace abandoned color variables
After having aligned vast majority of color variables to WikimediaUI
color palette and/or transformed to use central variables, these
seem abandoned leftovers.

Change-Id: Ic20b445975e920259c808b7a20c6100575c99f82
2018-03-14 17:53:56 -07:00
jdlrobson 0100dc33a4 CSS tweaks to issue overlay
* Remove CSS rule updating the padding of issue-notice
(this is no longer necessary after
I1b880c46fa3debfc5b68d8b416ca642cca98ce7e which defines its own padding
for the element)
* Overlay title is updated to read "Page issues"

Bug: T187916
Change-Id: I7e41d6f03c4cf9fa7563f2f608eec5be89c04a31
2018-03-14 17:54:50 +00:00
jdlrobson 888129478b Generalise search trigger mechanism
Allow content to trigger it.

Bug: T189316
Change-Id: Ie9a66b001b3ea4f79e465747b80b181df948cd34
2018-03-12 20:49:25 +00:00
jdlrobson 71bf8604ab Move error handling inside Minerva
ReferenceDrawer
Instead of doing this inside the ReferenceDrawer component
itself, we'll do this here.

To be backwards compatible we check the value is truthy.
When I5a7b23f60722eb5017a85c68f38844dd460f8b63 is merged
this can be removed.

For NotificationBadge we pass the onError option which
is now available and allows us to clean up the NotificationBadge

Change-Id: I47db11fa945a05f3b2a9a43c3cf053ca489a38fa
2018-03-08 20:03:22 +00:00
Stephen Niedzielski 41a43c5ce1 Hygiene: remove window.location use from overlays
Bug: T173539
Depends-On: I158dd7883be2846cf0d48bbd7e89fe2cd64a57d3
Change-Id: I87741667ca06cc701e5265aff13ba0492501de26
2018-03-07 17:13:59 -06:00
Stephen Niedzielski 27bc7e7212 Chore: move window.location use to client
Move window.location manipulation from ImageOverlay view to MinervaNeue.
Also, don't leave a hanging empty URL fragment when closing the overlay.

Bug: T173539
Related: I292c0578716ff56e0e069aa8006f840025d78a88
Change-Id: I56ba9217aa9cd4e0a925c623060022392e3021c7
2018-03-06 08:35:48 -06:00
Jan Drewniak 3b83933b57 Removing tap-highlight override for iOS
Bug: T188043
Change-Id: I78558b0badc3ecdaf4eb99ab1ed2a17fac3dd9e1
2018-03-01 19:04:13 +00:00
jenkins-bot eb8b6d492f Merge "Hygiene: move CategoryAddOverlay window use to client" 2018-03-01 18:22:53 +00:00
Stephen Niedzielski 9431e9a6e3 Hygiene: move CategoryAddOverlay window use to client
MinervaNeue should be solely responsible for controlling the flow of its
own UI. This patch puts the responsibility for changing the add category
dialog state when a category has successfully been added onto
MinervaNeue.

Bug: T173539
Related: Ic61ac46e21f510e5b168d7d98b68a59429eb7044
Change-Id: I5010d5ad1a27f09c1c5b0b4188dcec445cc3229f
2018-03-01 18:17:34 +00:00
Jan Drewniak aa7e20f8c3 Passing currentPageTitle option to TalkSectionAddOverlay
Passing in a new currentPageTitle option to TalkSectionAddOverlay.
Since `title` param has spaces instead of underscores,
`pageTitle` also gets spaces by using `M.getCurrentPage().title`
instead of mw.config.get( 'wgPageName' )

Bug: T184273
Change-Id: I68a46e512fde0c6c15e888bd3b57da21417b1085
2018-02-28 21:08:00 +00:00
jdlrobson 3bfc4c7f48 Remove unused userpage icon from repo
This was removed in Ia3fb34250714fe4ccb10c32a7027fda167e06a16
It is no longer referenced anywhere.

Bug: T187222
Change-Id: I14d486d962cfd1e4277a82d78084a785093d679d
2018-02-15 08:36:44 -08:00
jdlrobson 196fb20836 Restore Minerva specific userpage styles for all user pages
In T182162 these were removed incorrectly. They should only have
been partially removed.

Bug: T187222
Change-Id: Ia3fb34250714fe4ccb10c32a7027fda167e06a16
2018-02-13 16:14:54 -08:00
jenkins-bot 45e3f024e0 Merge "Remove main page toggle check" 2018-02-12 19:22:54 +00:00
jdlrobson 6ab5944b09 Pages that do not exist cannot have issues
Bug: T185359
Change-Id: I4d2adcd31d31761c178cbb8df8db696f654a795d
2018-02-08 22:09:49 +00:00
jdlrobson b0970a4a7e Remove main page toggle check
This is redundant.
page.getLeadSectionElement() will return null if the main page
is special casing and sections have not been wrapped.

Removing this check also allows toggling to work on pages where
users want to treat main pages like any other page.

Bug: T177337
Change-Id: Ic52fd1c9f6cc4f727ca52c871f29c76997e47f1d
2018-02-07 09:10:47 -08:00
jdlrobson 4389b67989 Explicitly use LESS variable for breakpoint defined in mediawiki ui
$wgResourceLoaderLESSVars is deprecated. Let's not use it anymore.

Change-Id: If28ab6884668700bc46533c8e2c377f17e6be696
Depends-On: Ib9f843147db4473ce5590741e0fb490384b0007e
Bug: T171365
2018-02-06 22:23:32 +00:00
jdlrobson 3047f3e0fa Merge remote-tracking branch 'gerrit/master' into specialpages
Change-Id: I1bc48ac546865f515df65e9d7f0c75e7f5c6d684
2018-02-01 11:35:11 -08:00
jdlrobson 326ec90cd5 Disable download button on Chrome like browsers
Add Dolphin, Opera and Maxthon to whitelist

Bug: T182059
Change-Id: I39bf9d016aba189016b2ce5b42a2e95b58cb33ce
2018-02-01 10:59:18 -08:00
jdlrobson 6b801b8c5c Console recruit message has been moved to MobileFrontend
Change-Id: I48eb8ac7471f7e17ed10ac326230cf2ffed467d1
Depends-On: I3ee0c34139ec658566e8d324a3c8c28a80e930fd
2018-02-01 00:48:13 +00:00
jenkins-bot af9db025df Merge "Remove horizontal line from popups preview in MinervaNeue skin" 2018-01-30 19:18:58 +00:00
Alangi Derick 3c81e0c717 Remove horizontal line from popups preview in MinervaNeue skin
A horizontal line shows in popup previews in the MinervaNeue skin
just above the setting icon due to a css rule that affect all footer
elements. Removing this effect to apply only for the MN skin.

Bug: T184560
Change-Id: Idb0c40c3fc24e4ec2d32cb2de9520952448da77a
2018-01-30 20:06:42 +01:00
jenkins-bot fcc759ee19 Merge "Fix editing of non-mobile-formatted pages" 2018-01-29 21:05:31 +00:00
jdlrobson 6cdcc8ddfa Fix editing of non-mobile-formatted pages
Template pages do not run the MobileFormatter
(see MFMobileFormatterNamespaceBlacklist).

As a result page.getLeadSectionElement() will
return null

When this happens do not change the edit icon to point
to section 1. Instead give them the non-JS editor.

After this patch, the feature remains as:

* Page with lead section get the JS edit overlay for section 0
* Page without lead section but with other sections gets the JS overlay
  editor for section 1
* Pages that didn't run through MobileFormatter don't modify the edit
  link and just link to the fallback editor (useful for Template pages
  at this moment)

Bug: T172948
Change-Id: Icee96e12f62ec13a1cbd3169c687fa4b3af70754
2018-01-29 20:56:31 +00:00
jdlrobson 1e56e46724 Fix download icon spinner
Regression, introduced in
I6e474562ba5f2c704364c9d7b49f982f7bab8a18

Bug: T182162
Change-Id: I56464d42e437a94b2008338b00f49b4e0b086561
2018-01-29 20:08:04 +00:00
jdlrobson c5d09c0288 Prefix icons in Minerva
Changes:
* MinervaUI will now prefix any icons with `minerva`
* Update definitions in skin.json, retaining selectors for cached
HTML for icons that are rendered via PHP.
* In I9021c53c2c04bdd7ce395eed33d89986acbfea6d watch and watched
and arrow are moved to MobileFrontend so are removed from the RL module
skins.minerva.icons.images.scripts as they are not
used directly in this repo. user and anonymous are no longer used
so also removed.
* Presentation of userpage now belongs to MobileFrontend. Icons
are styles were moved there in depends on. They are retained in
skin.json to support cached HTML as user pages are subject to
cache. They can be removed in a week.
* In code review we noticed the anonymous icon was badly named. We
rename to login. No caching implications.
* Main menu icons are now prefixed with minerva rather than mf to
reflect where they come from.

Depends-On: I9021c53c2c04bdd7ce395eed33d89986acbfea6d
Bug: T182162
Change-Id: I93264024f4915fc910c792b1905b89cdc6b8b546
2018-01-19 15:30:03 -08:00
jdlrobson fe3ac29fe7 Merge branch 'master' into 'specialpages'
Change-Id: I167f03477fd79e5ea0c7fa5cdf5df71bb8da31c2
2018-01-19 11:00:55 -08:00
jenkins-bot 80f51c4d5d Merge "Fix infobox styles to work well with multiple column infobox rows" 2018-01-17 20:04:02 +00:00
Piotr Miazga 4ca5666c06 Show Download button only on Android >= 5 & Chrome >= 41
Changes:
 - moved DownloadButtton checks & initialization to separate function
 - introduced supportedNamespaces variable for better readability
 - reorganized huge if(){} statement to set of smaller if's with
 nice comments why this configuration is not supported
 - introduced getAndroidVersion and getChromeVersion helper functions
 - added check to not allow Android < 5 or Chrome < 41
 - added unit tests

Bug: T182059
Change-Id: Ib5064459ee56aed68179389f37b4bc3b5c2c4492
2018-01-16 22:15:07 +01:00
David Sn 5d46c576bb Fix infobox styles to work well with multiple column infobox rows
I used the fix provided by TheDJ and tested out locally
on Firefox 57 and Chrome latest, but I couldn't test out
any grade C browser as on Linux it's really hard to find
such an outdated browser like Internet Explorer on Windows.

Bug: T168716
Change-Id: I8e03610e4eb3c93b80bb757592c2fb3079a68412
2018-01-16 17:19:39 +00:00
Piotr Miazga 3c4f3a0ddd Send events when user taps download icon
To track "download" button interactions we have to notify
EventLogging that button was clicked. The easiest approach is
to use mw.track() and then in WikimediaEvents subscribe to the
`minerva.downloadAsPdf` events and track page impressions.

Bug: T181297
Change-Id: Iecbebe37c165dda3f26af47906662f6e5a81321d
2018-01-11 18:50:31 +00:00
jdlrobson 09a1f98ab3 Merge remote-tracking branch 'origin/master' into HEAD
Change-Id: Ia1a520d983be096e29cfe725f619be0423f9d110
2018-01-08 16:37:44 -08:00
jdlrobson a807fd6fed Avoid OOUI/download icon nameclash
Short term fix to ensure icon doesn't change
when oo-ui is loaded.

Prefix with 'mf-' (we do this in main menu) to avoid nameclashes

Bug: T182162
Change-Id: Ia6ceb620ed2710d97387a326b74f1a02236cd0d0
2018-01-04 20:47:42 +00:00
Jdlrobson fc54446a40 Revert "Fix infobox styles to work well with multiple column infobox rows"
This reverts commit b3dc650f15.

Change-Id: I18b4cfd30d0703844748a2b4fb934f5824537970
2018-01-02 22:02:12 +00:00
jdlrobson 6598c1e7c3 Merge branch 'master' into HEAD
Change-Id: I220fbc57ee20d2a6717b39dba809401de2207ce0
2018-01-02 13:21:27 -08:00
David Sn b3dc650f15 Fix infobox styles to work well with multiple column infobox rows
I used the fix provided by TheDJ and tested out locally
on Firefox 57 and Chrome latest, but I couldn't test out
any grade C browser as on Linux it's really hard to find
such an outdated browser like Internet Explorer on Windows.

Also, I am unsure whether it will work in production
with the example article from the task, wasn't able
to recreate the article fully on my local devwiki.

Bug: T168716
Change-Id: Ied7c15f7a254228c23111df79da44d6167f1baac
2017-12-23 00:35:06 +00:00
jdlrobson 1146cef6b1 Optimise Special:MobileOptions for tablet display
Bug: T180095
Change-Id: I0ef0ce914a360848f8f66b39c40588f3fa04647c
2017-12-05 14:20:11 -08:00
jdlrobson c986db6c0e Always render taglines unconditionally and update styles
Adjust tagline margin per Nirzar:
https://phabricator.wikimedia.org/T180095#3801719

Note, this will  enable the tagline everywhere.

Change-Id: I3bce2a3472ab2e53261965c953572f35cc740eed
Bug: T180095
2017-12-05 00:27:11 +00:00
jenkins-bot 01d6c5ed21 Merge "Pages with only forms should take up entire page" into specialpages 2017-11-30 18:35:21 +00:00
jdlrobson 7c34b47993 Fix broken QUnit test
Correct some options names and make minor adjustments to the
constructor function

Bug: T181348
Change-Id: Ia9fe9d2923b895d3dc530280e3987e27c88d3282
(cherry picked from commit 89909ccf53)
2017-11-30 18:29:02 +00:00
Volker E eaeea5dd5e Replace unique color with standard subtle print color
Replacing `#9aa0a7` with standard subtle `#999` print color.
Also clarfiying LESS variable naming and removing unused variable
`@printBorderColorLight`.

Change-Id: I2c1b36099935aa99d63a3316b3a107a23ffa0afd
2017-11-30 17:44:25 +00:00
jdlrobson eaa4dae5af Disable download button in all namespaces except main
The MinervaDownloadIcon config option is replaced with a
more specific wgMinervaDownloadNamespaces config option.
If the list is empty then the download button will not be
shown.

Since the download icon is enabled everywhere in production now
this is good as it means Minerva reflects the production value.

Bug: T181152
Change-Id: Id78c1de9e8e9013530106bc0d45d3cf0297897b5
2017-11-29 20:29:12 +00:00
jdlrobson b6e91de90e Pages with only forms should take up entire page
On Special:MobileOptions we want to make the form take up the full
width but pad the fields in the form
(per https://phabricator.wikimedia.org/T180095#3795514)

This change is harmless but is necessary as soon as we port
the page to OOjs UI (I70f68df9d2d305126444319b05675702af75de87)

Bug: T180095
Change-Id: I1dda3eb4d0e7ebbec544dc0f5763b079e38f5cc8
2017-11-29 19:58:09 +00:00
jdlrobson 89909ccf53 Fix broken QUnit test
Correct some options names and make minor adjustments to the
constructor function

Bug: T181348
Change-Id: Ia9fe9d2923b895d3dc530280e3987e27c88d3282
2017-11-28 11:46:55 -08:00
jdlrobson 9826055afc Clear spinner after window.print
Looks like window.print may block so keep the spinner until
it's finished execution.

This may or may not fix the larger issue being discussed in the bug
but is harmless so why not.

Bug: T181261
Change-Id: I927d4bc8c96d74c14463f71b7ce6dec62618a485
2017-11-27 12:33:14 -08:00
jdlrobson b05da8d49d Load all images during print action
When the print button is clicked, load all images from the page
before calling window.print

Add a timeout to make sure the user doesnt wait too long.

Change-Id: Ie922d239f9c5b5757237dc10b673fb500ff203ad
Depends-on: Id7f21606be3db22fe8dfde2db675f9905547cfea
Bug: T180058
2017-11-21 15:27:36 -08:00
Volker E 8497d6d259 Unify SVG markup
Align SVG markup across Foundation products by:
- unifying XML declaration,
- adding `width` and `height` attributes where missing,
- removing all unnecessary `g` group elements where applicable,
- putting attributes in order,
- removing unnecessary ids and
- unifying whitespace.

Bug: T178867
Change-Id: I6860c9259553e0e41f7656f9e98534db8e02bbc2
2017-11-14 21:44:40 +00:00