Services MUST NOT vary their behaviour on global state, especially not
WebRequest, RequestContext (T218555).
Change-Id: I4b73ef713166d8b254023c1eebbb45c963880a99
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I1eec0823b7af97ea5031ff00b111e0c88b45a155
Removes a `display: inherit` that was causing issues with the alignment of these two items in the menu. In addition, correctly sets display to none for jsonly-specified list items when client js is disabled and rename the class to make it more specific to the menu items
Note: this will have a visual impact as it is fixing what is currently a visual bug. The jsonly hiding will also not work with cached content, but since it's currently broken we figured this was acceptable
Bug: T346670
Change-Id: I56d2c4fcba09d199a0fd6aad2f1621509bbfaba5
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I5a540772aafd2c4686e02f748b5fc61155920397
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
Minerva shows a watchstar for anonymous users.
Follow up to
I3c9d59f49f1b939981a7b2b450448db6736d5958
Bug: T348336
Change-Id: I36afb86f0c89c30dcb7695e1409f7c20d3dc31d1
- Removes 'mw-ui-icon-with-label-desktop' as that is now the default behavior for icon only buttons in Minerva
- Removes icon flushing classes, use codex mixins instead
80 Visual changes relating to minor icon/button subpixel changes in the heading, edit section links, and page actions
Bug: T319260
Change-Id: I503b643d33e43196483af4b5f9dd312237322ac8
In I1ccda3878a658d4251429ae65ebee04c09d81243, core decided
to technically allow temp. users to have watchlist access,
but have it disabled on permission level
(viewmywatchlist / editmywatchlist) instead of by isNamed() checks.
Minerva expects the watchlist permissions to be assigned to everyone,
but actual watchlist access to be available only to named user.
This is an incorrect assumption. Make a clear difference between
"page is watchable" concept (watch icon should show) and "user has
permission to watch" (if not, CTA to log in should show).
There is one additional step to fix, which is ensure
temp users receive the T330518 drawer. That is not a bug
in MinervaNeue, but in core -- mediawiki.page.watch.ajax.js uses
e.stopPropagating(), which means Minerva's CtaDrawer doesn't get
a say. Ideally, mediawiki.page.watch.ajax.js would know whether
the user has permissions to edit their watchlist. Alternatively,
it could have an interface to allow extensions to add their own
error handling. See T344925 for details.
Bug: T344870
Change-Id: Id1757fb4fb433fe39cf4d5c6e1e9c65ab5abae14
Legacy icons shouldn't have the minerva-icon class as this is meant
to be reserved for Icon template (Codex icons)
Bug: T342908
Change-Id: I63556fe42c8650bc5f0d6e5a0c5328b3f29d75f3
Use the Button.mustache partial in the
PageActionsMenu.mustache template.
This converts the page actions menu to use the Button
template in a way that doesn't change the existing HTML.
The mw-ui-icon-element and mw-ui-icon-with-label-desktop
classes are placed onto the Button.mustache markup.
Bug: T342908
Change-Id: Ib5dadd929eea2e72a24e061c4174348615890617
Updates the menuGroup.mustache and ToggleListItem.mustache
templates to include the IconLegacy.mustache template partial.
These templates are used by the main menu and dropdown menus
(logged-in user menu and advanced mobile contributions 'more' menu).
This should result in no visual or HTML changes.
Bug: T342908
Change-Id: Idfad10b48c9ee9e833509e3c4063c6a4b014a31b
Use the SingleMenuEntry constructor rather than the static create
method so that items can not only supply class names, but also with
array to string normalization.
This is useful so that extensions can add links with JS interaction,
such as with Ib3fe1063187
Bug: T242467
Change-Id: Ice909aab7f9ce49f36a954ac1bfce5eef14d30fc
This was inadvertently added in
I3c08e804cbb778f025f45a184801cd7b1738c035 and is without
an icon.
Bug: T336838
Change-Id: Ie6a588297a586328faee514074e096e78989547d
Follow up to 13d536a26
The current behaviour is unexpected and led to T336838. It also
seems like at some point the instrumentation for these menu items
also broke.
Going forward it would be easier to simply show any menu item which has
an icon. Also make sure that all menu items have a data-event-name
attribute so clicks to these menu items are captured.
Fixes:
* Contribute link is now not shown for anonymous users
as it was before
Changes:
* Ordering of menu items changes - settings is now below username
which is consistent with user
* All menu items are now tracked via event names consistent with
desktop.
Bug: T321746
Bug: T336838
Change-Id: I3c08e804cbb778f025f45a184801cd7b1738c035
And more generally remove `@throws` comment used for unchecked
exceptions, callers must not catch them.
Bug: T328220
Bug: T240672
Change-Id: I4768144d02feb6d4b6bae1a1ad39af6031f9613f
Make it behave just like the normal page actions menu, taking
its data from the core toolbox definition. This will allow it to
be extensible by extensions who declare an icon field for their
menu item.
Follow up to Ifd10da690a33e7fc5790a7b444b62fbfd1b95d98
Depends-On: I6881785676e2909434991b633ac181d05a272352
Bug: T335603
Change-Id: I88ac38acf22fbce0c3e0a4f4c6efcaef4ca49907
Adjust the behaviour so the existence of an icon is all that is
needed to populate this menu. This will allow discussion tools
to extend the menu with their own item(s)
Depends-On: If2972da4456705f4a2f0cea90e73d0207a36a306
Depends-On: Ia9a9a08c68be652c16692db30e0efbe02fbfba0d
Depends-On: I2b85b9ac6997d07ed4ff995693f083d0ad1216dc
Bug: T332730
Change-Id: Ifd10da690a33e7fc5790a7b444b62fbfd1b95d98
After refactoring and simplifying the menu building, the Nearby option wasn't getting inserted into the Group.
Bug: T312864
Change-Id: If52ac42f64154e015eab8f97393e4255db23473f
Hard deprecated the Group::insertAfter() function because it is not used in the Mediawiki codebase
Bug: T311894
Change-Id: I209d3fd492713425a2727fd48c5870f983a39f9b
Added the "Change block" and "Unblock user" to the array of possible menu entries for the overflow menu. These buttons will only appear when a user is already blocked.
Bug: T308570
Change-Id: I987083cfeb20a0c691d3fc631a9c844647fec9bf
Depends-On: If60a1194d63fff2b7b5ae1565be25a3b7b44fdf1
* Created a buildMenuEntry function
* Replaced all Group::insert() functions with Group::insertEntry()
* Added a trackable parameter to check if a menu entry will be trackable
* Removed the MenuEntry class
* Removed the MenuEntryTest class
* Removed the Group::insert() function
* Changed tests in GroupTest to test Group::insertEntry() function
Bug: T221004
Change-Id: I39bed4e9a9b09f904cb3e5d78ccb3e6e175981a8
- Remove cached HTML relating to heading change
( I2ffdedd64414ffb3c6e441391a75fd6e744847a4)
- Update invalid instruction for selector in footer (I0bfc7f977cdaf5ce8873103346c64121d704b86c)
It appears this rule cannot yet be removed.
- Update classes for contributions icon on user pages
(I6c908acd70c0dca5bcb1754d1b25d3da2389feb8)
Change-Id: I271abf3d29dfcfd19d654514fb3f6d6e257505ab