Commit Graph

62 Commits

Author SHA1 Message Date
Timo Tijhof 64134bd8a6 Remove minerva.less from global import path
Use local imports instead given all relevant files are within the
same repository, and don't vary by configuraion.

Bug: T140807
Depends-On: If3edac9a35b346af0320c12f70c0d978a6346201
Change-Id: Ife3cc345a63aff452e93accbe0a593fbaa358732
2018-05-29 12:19:00 +00:00
Timo Tijhof 91a3adacb7 Move remaining Minerva skinStyles from MobileFrontend
To be removed in MobileFrontend by If3edac9a35b346a.

Bug: T140807
Change-Id: Ifb073d1e67602b80e0e9b45f338806f5b9cb675b
2018-05-29 09:30:48 +00:00
jdlrobson f7e8df65b2 Merge profile icon with user-avatar icon
Both are the same but different variants - so use the variants
ResourceLoader module to keep this modules consistent in color
and form.

Change-Id: Ib75e1ff741fa46ad9698e89c4433b6edbad4d376
2018-05-08 23:35:44 +00:00
David Barratt f51cf7db7b
Use a Drawer for Block Notices
When a user is blocked, the toast message provides insufficent information to
the user. To provide more information, as well as a better design, the block
message will be moved into a drawer.

Bug: T165535
Change-Id: Ib025db3a8a4d1fd7bd05b69f9b5326943288372f
Depends-On: I926918d0bd7f2176f188a2154dc5e99f6a8a7ad1
2018-05-08 13:20:00 -04:00
Kunal Mehta e07e5103a4 Move skin metadata keys to top of skin.json
The keys that form the credits (name/description/url/etc.) are usually
on top, and manifest_version is typically on the bottom.

Change-Id: I1767b1e176c9cf892c1f627db4f5891fa6aade18
2018-05-07 18:19:40 -07:00
jenkins-bot f11c4e44f5 Merge "Restrict gallery styles to only pages which need it" 2018-04-20 21:19:57 +00:00
Kunal Mehta 90ed6468e2 Split MenuEntry to its own file
Change-Id: I2114141bf8f6d67671e063fae8c44044184688bd
2018-04-19 23:16:55 +00:00
Kunal Mehta 1b1c56c862 Fix some file names to match their class names
Change-Id: Ib1a12f8073a2d737c40c0b4d1dd64f9e55738019
2018-04-15 16:12:45 -07:00
jdlrobson 1f7de003ef Restrict gallery styles to only pages which need it
The mediawiki.page.gallery.styles module is only loaded
when needed, yet inside hacks.less we load gallery
styles unconditionally.

The hacks.less file is also only meant for css that overrides
template styles, so it didn't belong there anyway.

Change-Id: I4afc91ad7f67ae66544708d25541b3e8dd247873
2018-04-13 17:26:46 -07:00
jdlrobson 86238c64c2 Restore last modified active link color
In I7abdbac4d2d16b931e2b110fcebf0dfc82146753 I accidentally
removed the active link color (I meant to /move/ it from the
critical path since it requires JavaScript)

Change-Id: Ie86c3c9d03a0ed130a86c50bb548c9b47db6def6
2018-04-13 10:19:31 -07:00
jdlrobson 5036c91e04 Hygiene: No need for un-prefixed icons any more
These were added in I93264024f4915fc910c792b1905b89cdc6b8b546
for cached HTML but are no longer needed.

Change-Id: I008856c0c5e26270ed82d02a5413576495920bac
2018-04-12 12:01:04 -05:00
jdlrobson 2e453edd23 Only load notification icon (bell) CSS for logged in users
* The notification-count style is only needed if you are logged
in. Given a small percentage of our users are logged in, we
load a lot of render blocking css unnecessarily.
* The bell icon is not needed for anonymous users so pull that
out from skins.minerva.icons.images which is loaded for all users
into a module only used by logged in users (skins.minerva.icons.loggedin)
* Simplify the user-button rule - it is overly specific - probably for
historic reasons.

Additional changes:
* Simplify isAuthenticated helper

Change-Id: Ia72e7e45d276e8aac1ff5471bf6158705c7b5f99
2018-04-12 09:27:01 -07:00
jdlrobson 19ceaea732 span.mw-ui-icon is defined in core
Depends-On: I3d1ed6e4a165f48244e760752342c712047a07d8
Change-Id: Ifc576bbb6ec461ed30b01ae27f02620fdf8105c1
2018-04-11 13:50:03 -07:00
jenkins-bot 68df48ddf0 Merge "Convert custom LESS var from global to local" 2018-04-02 23:41:18 +00:00
Timo Tijhof ba0419fcbf Convert custom LESS var from global to local
Avoid the 'ResourceLoaderGetLessVars' hook, which registers a
global LESS variable exposed to all modules (inc. core/extensions).

Instead, use a FileModule subclass to provide the variable only
to the modules that need it.

Using this approach, also has the benefit of being tracked by
the version hasher, so that changes to the configuration actually
result in timely invalidation of module caches.

Bug: T171367
Change-Id: I7c7d13c83004edfc852a9b7dbfc4169617ab9f64
2018-04-02 23:28:58 +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 69053d13d3 Make dependency to jquery.cookie explicit for mobileRedirect code
Change-Id: I9ecdf9b507df6a9ec04933981ec5960c524e2323
2018-03-01 16:27:00 -08:00
Kunal Mehta e196a20e9d Use SPDX 3.0 license identifier
SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: I957eec9c5df224e367233c9ce23b9631f04c7458
2018-02-16 10:40:37 -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
Tulsi Bhagat 4419975fb0 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I79d2efce6d734b041be7a2c9d514d809ad6f450c
2018-02-12 20:12:07 +00:00
jdlrobson d783eb934d Flag that Minerva now depends on 2.1 of MobileFrontend
The changes to the FeatureManager mean that MobileFrontend
2.0 and Minerva are now incompatible.

Change-Id: Ia5ccb3b66bee2fb99e58c297f1ca91df642323af
2018-02-06 22:23:27 +00:00
jdlrobson 3047f3e0fa Merge remote-tracking branch 'gerrit/master' into specialpages
Change-Id: I1bc48ac546865f515df65e9d7f0c75e7f5c6d684
2018-02-01 11:35:11 -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
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 dede844830 Minerva should use FeatureManagers class
Bug: T182362
Depends-On: I6cc4a2ebcd75c054294daf329d94d35a02e50f8e
Change-Id: I6ba5bf49b9060c31ad2224a437072b3426a45619
2018-01-09 14:38:33 -08: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 6598c1e7c3 Merge branch 'master' into HEAD
Change-Id: I220fbc57ee20d2a6717b39dba809401de2207ce0
2018-01-02 13:21:27 -08:00
jdlrobson 1146cef6b1 Optimise Special:MobileOptions for tablet display
Bug: T180095
Change-Id: I0ef0ce914a360848f8f66b39c40588f3fa04647c
2017-12-05 14:20:11 -08: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
Kunal Mehta 74b3faf580 Move class_alias out of skin initialization
Use the standard way of doing it by adding an autoloader entry, and putting
the class_alias() call into the same file as the class.

Change-Id: I93e19ebcf3dd7d9815623de5e24861949fd0269a
2017-11-08 00:20:00 +00:00
Volker E 29026b75bb Align icon variants with WikimediaUI color palette
Follow-up to I067973dca580eddc09b770362183d7a5b1634b7c

Bug: T146799
Change-Id: Idd02de3883c8c5a971dff657d002f4c9e09c88eb
2017-11-06 21:25:30 +00:00
jdlrobson 58729578ae BetaOptin now managed by MobileFrontend
Depends-On: I83dc2165081332453cd6fc586ae7a3ba04bd3416
Change-Id: I11200f0ff90b359e363ea7a95bf4f3b9e92a67b4
2017-10-30 17:23:41 -07:00
jdlrobson d3318a9f85 Remove MobileFrontend's font changing code from Minerva
Fontchanger code now runs on all skins under the `mobile` target.
All the code will now live in MobileFrontend meaning developers
can operate inside one code base.

Depends-On: I857cfe2d9be9fe49c04c860bc234384c787239b2
Change-Id: I2759455cb6d7ddf13798e94452cb74baf502bafe
2017-10-30 19:11:16 +00:00
jdlrobson 5cb46fe9d2 Hygiene: Minerva owns PointerOverlay
The only usage is inside Minerva so we will move this module here.

Change-Id: If6859f0c8f855c6b116b254c58a6814f54b7c36d
2017-10-30 18:00:02 +00:00
jenkins-bot accb0c6609 Merge "Minerva owns BacktoTopOverlay" 2017-10-26 20:40:18 +00:00
jdlrobson 038103299a Minerva owns BacktoTopOverlay
Not used in MobileFrontend so it is moved here from that repo.
t r
Change-Id: I97e6010026daf4c6610bcfbedf140fb2a45b1130
2017-10-26 16:34:16 -04:00
jdlrobson 12b49a70ad Notification icon should not show NaN for persian Wikipedia
Bug: T172755
Change-Id: I2884c8daed3fe0e0d05c746ec6319956b7426957
2017-10-26 20:27:12 +00:00
jdlrobson 45a1b3b423 Add feature flagged DownloadIcon
Shortcut for print. Disabled by default and controlled by
wgMinervaDownloadIcon

Note that with lazy images enabled, images will not appear
in the printed article. This can be easily addressed inside
the onClick function in a later patchset with a few modifications
to the Skin class.

Currently the flag when enabled will show on all browsers. There
are some open questions on the ticket about how we want to limit
the feature. This shouldn't block review or merging.

Bug: T177215
Change-Id: I49f1736870c743990b3fb9916247e07a597b2f59
2017-10-23 18:12:20 +00:00
jdlrobson b93b7eda7c Render add discussion button in PHP not JS
The talk page JavaScript progressively enhances an
existing button in the page.

Remove the frontend logic and rely entirely on whether
the button is in the page or not.

Additional change:
* The browser tests incorrectly suggest a user needs
5 edits to be able to use the talk feature. This is not
true. They just need to be logged in. Update that logic.

Bug: T167728
Change-Id: Iacedea30bdd0775b3d785db5b143abafd7a18b39
2017-10-16 22:35:11 +00:00
jdlrobson 7b8530a2b2 Standardise on MinervaNeue's skin name (minerva)
We will standardise on the key "minerva" and the styles
in MediaWiki:Minerva.css for desktop since this is what is
used for mobile. The name will however appear as MinervaNeue
to be consistent with the skin repo name (not the code).

Please merge I5fdb21243e0b599b07aa228107fd4b8c306c696c
shortly after merging this to remove the remaining logic
relating to this from MobileFrontend as otherwise two skins
will appear in user preferences.

Any existing users of MinervaNeue (key minervaneue on desktop)
will be thrown back into the Vector skin and will need to opt
into the MinervaNeue skin again. This is a minor disruption
given the low amount of users and instability of the skin.

Bug: T171644
Change-Id: Ieffb6334168047dcf05dcb60281865ab47056dc0
2017-10-12 15:04:13 -07:00
jdlrobson 8729f0b654 Hygiene: Minerva uses skin instance defined by MobileFrontend
The global events for resize and throttled will also be defined
inside MobileFrontend.

Depends-On: I8503c26bd064ae0d203f95a35031468c7c678ac1
Bug: T173454
Change-Id: I00d361ad504ab90f2bf80a53a7c76269f1116207
2017-10-11 23:43:57 +00:00
jenkins-bot 9bb62a254d Merge "Collapse amboxes in edit view" 2017-09-28 16:11:43 +00:00
jdlrobson 0dd994edda Prepare to break the server side MobileFrontend dependency on Minerva
Changes:
* Minerva now maintains a MinervaUI - a simplified version of
MobileUI that provides iconClass and buttonClass helpers.
* Minerva now maintains its own ResourceLoaderParserMessageModule

Remaining issues:
* Main menu links to '#'
* Unknown dependency errors are thrown due to the missing
JS libraries e.g. mobile.watchstar
thus JS based UI components are unusable e.g. search autocomplete,
and edit button
* Language button navigates to a missing special page without
MobileFrontend (see T104660)

Bug: T169569
Change-Id: I89e2e15faabab73b0cba91afc2f2c5e785edef29
2017-09-27 21:21:59 +00:00
jdlrobson b19997a970 Collapse amboxes in edit view
In edit mode various amboxes are shown which push the editor area
below the fold.

We solved this problem already for "page issues" in normal page views
so we should apply the same solution here.

"Editing help" message will show under the heading. When clicked
information will show in an overlay.

Change-Id: Ia6e478f289267d22adc55532221cba2aae16ff36
2017-09-27 21:04:36 +00:00
jdlrobson 0ee78ce0cb EventLogging modules should be soft dependencies
Change-Id: Ibc546a89b11360769c9c50dc52cb9b7b5e433100
2017-09-27 20:52:15 +00:00
jdlrobson c323c6858a Hygiene: Merge skins.minerva.print.styles with skins.minerva.base.styles
We no longer need to keep this as a separate entry point now we do not
feature flag our print styles

Please enter the commit message for your changes. Lines starting

Change-Id: I6bf12980aa929e84f239931beb0a505809231830
2017-08-31 19:09:03 +00:00
jenkins-bot 7c1be417b0 Merge "Remove special page resource module handling" 2017-08-28 16:21:52 +00:00
jdlrobson f394cae753 Use mw-ui-icon-large and ResourceLoaderImage module for user page
Bug: T143264
Change-Id: I34b37c4c20f4d6612198096f83dbc509a795ae6d
2017-08-23 15:09:23 -05:00
jdlrobson 61ba76efdb Remove special page resource module handling
This is handled by MobileFrontend now, just as it should do.
We rely on skinStyles where possible.

Depends-On: I665f6fe60939475249786fdc951149c38473fda6
Bug: T173597
Change-Id: I0fe9efcf98bbd8e188d91a29d4cfda897d47808d
2017-08-18 19:37:08 +00:00