Commit graph

803 commits

Author SHA1 Message Date
Kunal Mehta 508ae30ea5 Remove @return bool from hooks that don't return anything
Change-Id: I21dcfdb63f0e84dfaee4e075eb26e0d5a6bf3f73
2018-04-19 23:17:20 +00:00
Kunal Mehta 90ed6468e2 Split MenuEntry to its own file
Change-Id: I2114141bf8f6d67671e063fae8c44044184688bd
2018-04-19 23:16:55 +00:00
Translation updater bot 98575bb33b Localisation updates from https://translatewiki.net.
Change-Id: I8ed13aea22705a2a4eb4fd3b07327be1d974fc1f
2018-04-17 22:03:33 +02:00
Kunal Mehta 4da5567bd9 Simplify SkinUserPageHelper constructor
Instead of requiring a full IContextSource object and only using the
Title, only ask for the Title in the first place.

Change-Id: I33034193140ca53919f29f847a03caf26250ce54
2018-04-15 16:38:50 -07:00
Kunal Mehta 04e61303c2 Add GPL file header to PHP classes
Change-Id: I2333507372c67ffb8e83777ca6f554aed690de9c
2018-04-15 16:23:10 -07:00
Kunal Mehta 71c9be5b0d Add COPYING
Change-Id: I614dfb18ee078bbc893bf68d95478cf0cec62d10
2018-04-15 16:13:17 -07:00
Kunal Mehta 1b1c56c862 Fix some file names to match their class names
Change-Id: Ib1a12f8073a2d737c40c0b4d1dd64f9e55738019
2018-04-15 16:12:45 -07:00
Translation updater bot f4cee34b19 Localisation updates from https://translatewiki.net.
Change-Id: I9b39e58593be8245081ae63973cf37fb7a8ebe11
2018-04-14 21:58:53 +02:00
libraryupgrader 44c99b6c66 build: Updating mediawiki/mediawiki-codesniffer to 18.0.0
Change-Id: I1f5c867e812ef384915dfb94deb86d8fd2a43893
2018-04-14 09:46:47 +00: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
Translation updater bot b4c0ecff62 Localisation updates from https://translatewiki.net.
Change-Id: I5520eefb4b61b964dd23cd4ff0406a8ae36bead2
2018-04-13 21:57:49 +02: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
jenkins-bot 612f9b4357 Merge "Only load notification icon (bell) CSS for logged in users" 2018-04-12 16:54:29 +00: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 f9ac17d94d Remove unused css rules
* language-selector can only appear in secondary actions so only
load rule on Main page
* .no-js-only not used in MobileFrontend or Minerva
* Remove last-modified-bar rules from ui.less that are repeated
inside footer less file
* #mw-mf-last-modified id is no longer used post-footer rewrite
* CSS rules for .mw-mf-banner are defined in Zero extension
* mw-mf-image-replacement is no longer needed after we turned off
the option to disable images in the mobile site

Change-Id: I7abdbac4d2d16b931e2b110fcebf0dfc82146753
2018-04-12 09:24:44 -07:00
jenkins-bot 1648c7752e Merge "multi-line, two-line and mw-ui-button-group only loaded where needed" 2018-04-12 15:57:46 +00:00
jdlrobson d228b2cbd7 multi-line, two-line and mw-ui-button-group only loaded where needed
The only usage of mw-ui-button is inside the SpecialMobileWatchList
class in MobileFrontend. Thus we needlessly load as
a render blocking CSS on all page views

multi-line and two-line are likewise only used inside
MobileSpecialPageFeed.php

mobile.special.styles is loaded on all Special pages
so let's load this instead here. This also allows us to use
the element on other special pages in future.

Change-Id: I2b363543d0356a18194a9d08922428a6cb944797
2018-04-11 21:50:53 +00: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
Translation updater bot ee2afb5220 Localisation updates from https://translatewiki.net.
Change-Id: I0ff41888c13a9a1e74bc9b10c800ef43a6c8f713
2018-04-11 22:21:13 +02:00
Translation updater bot 39a31f90ad Localisation updates from https://translatewiki.net.
Change-Id: I12782c378591a24762ba72db35e32049668988f5
2018-04-10 22:01:15 +02:00
Stephen Niedzielski b106ed3219 Fix: update edit button lock style state
When a user is allowed to make edits, show a normal edit button. When a
user cannot make edits, show the locked button.

This patch refactors edit button presentation logic into a new function,
updateEditPageButton(), which consistently updates the UI for both
enabled and disabled states. Additionally, in cases where the old code
only displayed the button via `$caEdit.removeClass( 'hidden' )`, the new
code now updates the state appropriately which is a functional change.
Finally, this patch sprinkles in some TODOs for future minor refactors
that were identified while creating this patch.

Bug: T190834
Change-Id: I083e91f0328cc057541ad42a27aae31b32b3d050
2018-04-09 17:40:00 +00:00
Translation updater bot 1eddc3af5e Localisation updates from https://translatewiki.net.
Change-Id: I0f979408dad170e56dab37fb2532c525ff434ddf
2018-04-08 22:17:02 +02:00
Ed Sanders f4658a4d0e Fixes for action=edit page styling
* Use box-sizing:border-box when adding textarea padding - before
the right side of the textarea did not align with the right side of
the bell icon. Now it does.
* Fix specificity of rule hiding cancel link and "editing help" which
appear at the bottom of the form.
* Fix height of noJS textarea (70vh)
* Remove some unnecessary extra margins and padding (the minor edit
and watch this page checkboxes will now show on the same line)
* Update specificity for oo-ui-fieldLayout-body so that it does not
apply to the summary form.

Change-Id: I8d3d61fdc51934a6ef0885cde94dac1e8c5e33ca
2018-04-05 23:13:49 +00:00
Jdlrobson 4335114fca Revert "Fix: check if user is blocked to show edit button"
The merged patch hid the edit icon completely for blocked users.
It should not do this but should show. I've updated the task
description to explain this behaviour better.

This reverts commit cb6bde03dd.

Bug: T190834
Change-Id: I28b2a6bfb1d0501668752faaf4cbd2ea8bf3398a
2018-04-05 22:23:58 +00:00
Stephen Niedzielski cb6bde03dd Fix: check if user is blocked to show edit button
Before showing an edit button, check that the user isn't blocked from
editing everywhere. Note: User.isBlockedFrom() internally checks whether
that includes user talk pages or not.

Bug: T190834
Change-Id: I9126dfef04333e15baa67e1d080b09f35548d58d
2018-04-05 22:02:40 +00:00
Translation updater bot ae39068260 Localisation updates from https://translatewiki.net.
Change-Id: Iec898b0606f78fbde7f7e73d7d7f551f0c17eae3
2018-04-05 22:06:45 +02:00
jenkins-bot 8b1bf1c6fd Merge "QA: Speed up browser tests by not unnecessarily opting into beta" 2018-04-05 14:37:02 +00:00
jenkins-bot 4ec598ef1d Merge "Use OverlayManager for SearchOverlay" 2018-04-05 13:35:42 +00:00
Jan Drewniak da7f08ad09 Use OverlayManager for SearchOverlay
Enables the SearchOverlay to be shown/hidden by the
OverlayManager, instead of managing the routing itself.

A special route is added to hide the search overlay on pageload,
so that the overlay can always be closed with history.back()

Bug: T189212, T102946
Change-Id: I1eaad36fe4ceca2d6f3e3345d987e2b32634446d
2018-04-05 15:23:36 +02:00
jdlrobson acb0051bcd QA: Speed up browser tests by not unnecessarily opting into beta
We only need to opt into beta to test the beta indicator displays.
There is no need to do this anywhere else in our browser tests.

For the categories test we will enable the feature flag in test mode
and not run it against the beta cluster.

Bug: T174018
Change-Id: I83b5f24236cef6ddd6fc1882bdfff3618a8bf599
2018-04-04 15:07:30 -07:00
Translation updater bot 5834d0735c Localisation updates from https://translatewiki.net.
Change-Id: I0b081cb0ef7c0e7c9597c97678fc856829711286
2018-04-04 22:19:15 +02: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
Translation updater bot 7263cabe22 Localisation updates from https://translatewiki.net.
Change-Id: I5123b97cc22536745c81cdc4d928fa42d8efc0f6
2018-04-01 08:28:07 +02:00
Translation updater bot 7eb27184a4 Localisation updates from https://translatewiki.net.
Change-Id: Ib6d349c7abbc04609b0b7360f0d4ad24634727a5
2018-03-30 08:58:56 +02:00
jdlrobson 8dad1703af Special handling for links without href attribute
The link change overrides link colors in last modified,
talk button and main menu. This approach was obviously flawed.

Rather than enter a specificity
war let's instead limit the styles to links which do not have
an href. Volker you were right...

* Revert "Last modified links should not be progressive blue"
This reverts commit bc045b78a2.
* Revert "Do not style links without href attribute"
This reverts commit daa6ad5145.
* Apply a not selector for links

Certain links (including links inside navboxes) render
links to themselves - for example the navbox on the San
Francisco article (provided it is not removed by
wgMFRemovableClasses)

These links should be visually distinguished from normal links.
The not selector has support from IE9 onwards and given our browser
matrix and the low impact of if this fallback fails this is a perfectly
acceptable usecase.

Bug: T181472

Change-Id: I61b05e3c223f2ba5314aecdf26b8a0ee8caa6524
2018-03-29 15:58:09 -07:00
jenkins-bot 121958bea1 Merge "Block reason messages escape HTML" 2018-03-29 21:34:34 +00:00
libraryupgrader d925a800ef build: Updating mediawiki/mediawiki-codesniffer to 17.0.0
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment

Change-Id: I036e37625f68b620f505a8d8be4202056fde09ff
2018-03-29 07:59:18 +00:00
jdlrobson ac1ffdb5f1 Restore search placeholder text
Bug: T190939
Change-Id: Ic42ed495b54f153c93ee32ac250dfe5d9233d1cb
2018-03-28 20:00:55 +00:00
jenkins-bot 75cfd47acb Merge "Last modified links should not be progressive blue" 2018-03-28 19:12:00 +00:00
jenkins-bot 94d0229b74 Merge "Fix: always show table of contents" 2018-03-28 19:10:20 +00:00
jdlrobson bc045b78a2 Last modified links should not be progressive blue
This regression was due to I9f842ae09751d299716d752328f747269597fbdb
Updated specifity of selector.

Additional change:
* Update comment per feedback from TheDj

Bug: T181472
Change-Id: I9534cce5f240009c9013b75e1367776519b00d81
2018-03-28 19:00:35 +00:00
Stephen Niedzielski e8b4559f5b Fix: always show table of contents
Do not conditionally render the table of contents. Note: the underlying
condition, MFTOC, appears to still be used by MobileFormatter so it was
unchanged.

Bug: T189699
Change-Id: I7088ccad75c2a8504bf435418d7dd62238b2135d
2018-03-28 13:36:17 -05:00
David Barratt 6bea4324c6
Block reason messages escape HTML
The block reason in the block message has escaped HTML. This
HTML should be rendered to the user.

Bug: T190901
Change-Id: Icda7c5d0c76aff7c22f3a6735d880a5ee49338ff
2018-03-28 12:36:43 -04:00
Translation updater bot 6cfa2c9380 Localisation updates from https://translatewiki.net.
Change-Id: I6d830ecf678c79ce2d6e46a56ec11bdab0d103fd
2018-03-27 21:55:14 +02:00
jenkins-bot 180b55d13b Merge "Do not style links without href attribute" 2018-03-27 18:42:41 +00:00
Zoranzoki21 441f5ac89d Remove unused $useHeadElement property from skins
Bug: T190575
Change-Id: I1ff60f683ba7186343408579d72303fc693b5a87
2018-03-27 17:18:53 +02:00
jenkins-bot da5e271e06 Merge "QA: Remove test not adding value" 2018-03-27 13:44:55 +00:00
Translation updater bot 096c02f100 Localisation updates from https://translatewiki.net.
Change-Id: Ia0cdf3eb9fe4229f7e301c9968db8314f89ab132
2018-03-26 22:06:18 +02:00