Why:
Minerva uses watchstar both as a client to action=watch
and as a CTA prompting users to create a new account.
To prevent error messages about permissions from being
displayed when logged in as a temp account (or not logged in
at all), the API requests should be only sent when users
actually has watchlist permissions.
This patch fixes that by only passing data-mw=interface when
the watchstar is actually used as part of MW watchlist interface,
ie. when user is logged in. That means the `mediawiki.page.watch.ajax`
module in core can avoid the watchstar element when it is not meant
as a watchstar, but as a "sign up" CTA button.
What:
* Make it possible to change (or omit) data-mw in SingleMenuEntry
by a new constructor parameter.
* Make ToolbarBuilder::createWatchPageAction omit data-mw when
user does not have watchlist permissions.
Notes: Based on coversation with Krinkle in
Ia0acdaf4dea5aa6788f89fdd73c5dba9af9f1ed7.
Bug: T344925
Change-Id: Id9d6d9e7394b52d11ac6ce0b7d33319b3a761789
empty() should only be used to suppress errors
When the type of the variable is array,
a falsy check is the same (checks for null, false and empty array)
Found by a new phan plugin (T234237)
Change-Id: If24015795219f6ff4f155c0d667472dc52a04d43
This reverts commit 2696ced732.
Reason for revert: Icons should be defined by the extension
providing them. The icon is already incorrectly defined in
that extension but can easily be corrected.
Depends-On: Iff3aa23604442011062a67a8e165fc4a1b5b2d47
Change-Id: I22a114d41e2cadb97d46c299709496cd04299cf6
Why:
- The recently-introduced "Report" menu item in Extension:ReportIncident
needs a flag icon
What:
- Register the "flag" icon in the wikimedia icons group
Bug: T348455
Change-Id: I4caa3a84583349a19603a2ad86471d79671f4b6a
Minerva shows a watchstar for anonymous users.
Follow up to
I3c9d59f49f1b939981a7b2b450448db6736d5958
Bug: T348336
Change-Id: I36afb86f0c89c30dcb7695e1409f7c20d3dc31d1
Currently the last modified bar icon appears black rather than
white. This is because the last modified icon shares icon CSS
with the page actions in AMC.
Untie these by giving the icon in this context a different selector,
taking care to support cached HTML.
Change-Id: I98443b0dcb88911a5314092216809387b4fb80dc
Partial revert of I192c6d4235c57f69cf48dcd67aa6c4810df62dfa
The deprecation notice seems incomplete. The two functions are not
equivalent and we have various usages elsewhere in the codebase.
Bug: T346685
Change-Id: I063daa217708c3bebac97af7be9eedab01f5217b
Most of these are captured in other bugs
The anon talk message style doesn't do anything.
Bug: T344022
Change-Id: Iba1fce98ea05931fe07b2b20f07c62d198039d1b
These are newer elements but they have similar user agent defaults to
img/video/audio etc.
This should fix the usage of imagemaps, which use frameless figures
and currently have excessive margin in minerva
Change-Id: If9f995401b771baffe221e474991cf1e3fbc7f76
Fixes "[1.40] Use of PageGateway is a NOOP and deprecated. Please remove this call."
Fixes Use of "navigate" is deprecated. use navigateTo instead
Change-Id: I192c6d4235c57f69cf48dcd67aa6c4810df62dfa