Move away from User, and use Authority instead. The only exception is
isBlockedFrom, which still requires a User object, so inject a
UserFactory for that.
Simplify the test accordingly, and also remove implicit assumptions as
to what certain user groups are or aren't allowed to do (e.g., watch
pages).
Also avoid using TestUser as it needs a DB connection.
Change-Id: Idfff8fd00f7b01df1dc6ec509dfc0cbd10ce7ce0
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
Applying central Codex design tokens in new architecture.
This replaces all existing MN `z-index` tokens and comments on
replacement choice.
Bug: T285592
Change-Id: I23d794566898946a500c10713802d8dfaad993d1
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
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Removing calls for 'mediawiki.skin.variables.less' in favor for
'minerva.variables.less' for consistency.
Also
- replacing several static values with new Codex design token featuring
skin variables of `background-color`, `color`, `border-*` and
`transition` categories
- renaming several Less variables to variable naming standard
- moving a small number of MinervaNeue specific variables into
'minderva.variables.less' file. Those should be replaced in mid-future
by Codex design tokens
Please note, that this patch is not replacing all values with
possible Codex tokens. It's just applying them on selected
categories for consistency for now to keep the patch easier reviewable.
Further replacements will be done in follow-up patches.
Bump MediaWiki core required version to >= v1.41.0.
Bug: T319381
Bug: T332541
Depends-On: I98c8cc27527533e2efb3b987ee34bc403e988b75
Change-Id: I86c5a35377541a784552c29456e0b8b507b3ee9c
Final action name can be different from the 'action' URL parameter.
This method was already used in several places in this code.
Bug: T334727
Change-Id: I803aec7c6d057616b88a8e3f4845ce8de399aa12
Preload via Skin::getDefaultModules() should be allowed to avoid
the separate load request in a fresh environment.
Also, cleanup the code and comments, 'sortable' => true is the default,
no need to specify again.
Bug: T233340
Change-Id: Icc04d2cd2dc85efab64e5c8de68e606cfad61480
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
Removes onBeforePageDisplay hook. This is no longer needed because module style is added through Skin::getDefaultModules via SkinMinerva->getSkinStyles
Bug: T281421
Change-Id: Ie0610735c96476e66629815a6611d6b34356707c
Use a UserFactory instead of getting an id and the user objects on
second request
Also replace another deprecated User class and use the injected factory
Bug: T325687
Change-Id: Id610ee39e0ef865b97f7ae8506188eea04a86ac5
On desktop, the "Alert" icon had more white space around it than the
"Notice" icon, and its popup displayed with a different offset.
On mobile, the combined icon jumped around while the page was loading.
Change-Id: Icdd5bc6e8478f3453b6461a35b7fb53e8ab014e9
For consistency with desktop Vector, Minerva should show two
icons. This also removes the duplicate #pt-notifications-alert
element in the skin.
Bug: T313609
Change-Id: I6449f0c29b52fd2092d63fbef23205ed8f57d50f
Changed the PreferencesGetLayoutHook parameters so thatit no longer passes a Skin variable. Now, the hook willpass an additional string variable with the skin name and an associative array with extra skin properties the hook might need.
Bug: T322781
Change-Id: I200aec586dbe8613e9a9c762db8d9bcbdc69a35b
Use mobile layout in Special:Preferences
Bug: T320586
Depends-On: I468481b66bf96880d1779cd11a46e18745e2c894
Change-Id: Ic6aa01e6e8806d1f2be8e07ca6c83decd62bc641