* Add type hints where possible.
* Add initialization values to properties where needed.
* Remove @var block if redundant to type declaration.
* Use single line /** @var type $var */ instead of multi line.
Change-Id: I35236c5c1a2abb49e8ea2da090df3d655206195f
* Add type hints where possible.
* Add initialization values to properties where needed.
* Remove @var block if redundant to type declaration.
* Use single line /** @var type $var */ instead of multi line.
* Add improvements to avoid Phan warnings.
Change-Id: I8e391700dcbfbbcc88cceb589dc3a36fb8e3b357
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
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
- 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
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
* 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
* Prefer Title::makeTitle in unit tests where the title is known,
this avoids title parsing and can improve the test performance.
* Use Title::makeTitle for the user page like done in User::getUserPage
Change-Id: I3901a6ed208a5ff90b216d01d3c4962cdcb48db1
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
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
For consistency with other methods, a mechanism for overriding
the home page icon is provided.
Bug: T291423
Change-Id: I7fb2e23cf10a75ed37e333f166f93111283f7f3e
Placing the text overflow on the span instead of the anchor element
prevents issues like T287522#7272991 from occurring.
Additionally:
* Uses the `text-overflow` mixin on every toggle list item label instead
of just the user link item as it simplifies the logic and presumably
we'd want any text that overflows the menu to be handled the same.
* Changes the anchor element to use flexbox/align-items to vertically
center instead of relying on `vertical-align` both the span and the
icon. Eventually, this should be put into core (see
I029f97ba9d5e7f46c8aa175d9a6bbb45ef9615df) but we have to remove all the
overrides that use vertical-align first.
Bug: T287522
Change-Id: Ie0fbff9dfaf8444c76125df52931a687730b4ad1