Commit graph

22 commits

Author SHA1 Message Date
Thalia 53b524fbd3 DefaultMainMenuBuilder: Use UserIdentityUtils for temporary user check
Use instead of UserNameUtils, which has more dependencies.

Change-Id: I32ca33acf2511048a8c307c20a1f1a73c9fc3cf4
2023-07-27 18:02:36 +00:00
bwang d977c8d940 Update personal tools for temp users, add icon for temp users
Bug: T335546
Change-Id: I56315440016cde3aad051b37895f713fbb5dd239
2023-06-20 13:19:55 -05:00
Jon Robson ffbcf9e2eb Fixes: Sandbox link should not show in main menu
This was inadvertently added in
I3c08e804cbb778f025f45a184801cd7b1738c035 and is without
an icon.

Bug: T336838
Change-Id: Ie6a588297a586328faee514074e096e78989547d
2023-06-12 15:21:23 +00:00
Jon Robson 567dd022ae Move to exclude list rather than include list
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
2023-06-09 23:06:39 +00:00
Daimona Eaytoy 1898a3ccab Replace deprecated MWException
And more generally remove `@throws` comment used for unchecked
exceptions, callers must not catch them.

Bug: T328220
Bug: T240672
Change-Id: I4768144d02feb6d4b6bae1a1ad39af6031f9613f
2023-06-08 17:16:36 +02:00
Santhosh Thottingal 13d536a26d
Show Contribute menu item in main menu when Special:Contribute is enabled
Bug: T336838
Change-Id: I32662dcb244a019bc8878c8b98f46370d4156eda
2023-05-25 13:27:39 +05:30
Func e1c51814ac Remove unused constructor params of MainMenuDirector
The code was simplified in commit 1f94dbb, and these params become
unused.

Change-Id: Ie830200dd5b5fa3472300a27abc77cf88a2be324
2023-02-26 20:30:07 +08:00
bwang d5d94e6b6f Add settings menu item for anon users
Bug: T307696
Change-Id: Ib875bae5796ef021a06310582a4bbc41abb26555
2022-05-23 22:36:36 +00:00
bwang 79d4130fcc Hard deprecate MobileMenu Hook
Bug: T303309
Change-Id: Ice45416c4af4e8fd4bcda158c5f9b81e6c8c9491
2022-04-27 12:38:03 -05:00
jenkins-bot 6d4558de86 Merge "Deprecate MobileMenu hook" 2022-02-28 22:09:18 +00:00
Umherirrender 3dd1fd841a Use new namespace for MediaWiki\SpecialPage\SpecialPageFactory
MediaWiki\Special is alias since 1.35

Change-Id: Ifb8a64c5fe7e413178f94ecc89b7a960d04064b2
2022-02-26 22:31:38 +01:00
Jon Robson dc422a3def Deprecate MobileMenu hook
Bug: T291568
Depends-On: I2c75e210ac914ee4d63969314c82451fc8172da0
Change-Id: I00c3e0d4178447c547f25be580c5b99ee65bef60
2022-02-22 18:18:42 +00:00
Jon Robson 0659e174c9 Allow msg key to be overridable
Minerva already overrides the text label for the Home menu item.
To allow other extensions to override it again, we can also consult
the msg key.

Bug: T291568
Change-Id: I3107a6d1e6ace26c7ab9c49c49768d2adcda8792
2022-02-17 16:44:37 +00:00
Jon Robson d8a1942808 Handle unexpected data coming from MediaWiki:Sidebar
Bug: T301003
Change-Id: I27fbd952f3c6139b00e8793a55044f451446a867
2022-02-04 13:16:40 -08:00
Jon Robson 0b3d21d58d Main page definition come from MediaWiki:Sidebar
Bug: T291568
Depends-On: Ia54d01eb5d8d9c33d067f61c73203f9fec4569a6
Change-Id: Ia9998780dc0a5f51af52d928499b51d5566cf29d
2022-02-02 00:44:56 +00:00
Jon Robson 6e297a7a9b [Refactor] Use core definitions for personal menu icons
Rather than hardcoding the icons for all our menu items
let's use the definitions in core.

This also makes it easier for us to deprecate the
MobileMenu hook in future.

Rejoice at all the code this removed!

Bug: T291568
Change-Id: I69b5ca13aee018982a5ea28677d4a37e663235d4
2022-01-19 00:33:16 +00:00
Thiemo Kreuz 31659edf3d Use more narrow UserIdentity interface where possible
There is still a lot of places that need either an Authority or still
an actual User object. This patch changes the usages that can be
changed right now (almost) without any codechange.

The only additional change is the removal of an unused constructor
argument.

Change-Id: I0fbb3c2cc4cea7fba135d92b04421b0563c0f0c8
2021-12-17 18:16:49 +01:00
bwang ef4aa95ae2 Remove primary/secondary menu items, instead add a separate log out menu item
Bug: T293041
Change-Id: I9f73fdba1856dd9e0ea7120df0fb18061337961a
2021-11-18 19:51:33 +00:00
James D. Forrester 592e1151b7 Use User->isRegistered(), not deprecated isLoggedIn()
Bug: T270450
Change-Id: I60f714f42848898cf27aa83da92ac1c691fe5ead
2020-12-17 19:09:15 -08:00
jdlrobson 2e450e104e Donate link should be in a separate group in main menu
Bug: T219793
Change-Id: I7501c87eaa799e4c8a9052f5e3f650a89f376d1b
2020-06-29 14:38:34 -07:00
Vas Jaremchuk f4e3c8f9d9 Mobile web donate link
Add the Donate link with a heart icon in Mobile menu.

Bug: T219793
Change-Id: I65d1d7408e2df7b3ae307736ac6d498b1d7f7197
2020-06-25 11:00:44 -07:00
Reedy d12308e38d Move some more classes to AutoloadNamespaces
Bug: T187154
Change-Id: Ia78f963a08cec1490aaff462b9787f7a826bf62c
2020-04-18 16:09:42 +00:00