Mooeypoo has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/376862 )
Change subject: Always place items outside menu if there's less than two of them
......................................................................
Always place items outside menu if there's less than two of them
Bug: T174927
Change-Id: I5a30cf4d5cdc3e7ea9ea7b0536e015de8825f785
---
M modules/ui/mw.echo.ui.NotificationItemWidget.js
1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/62/376862/1
diff --git a/modules/ui/mw.echo.ui.NotificationItemWidget.js
b/modules/ui/mw.echo.ui.NotificationItemWidget.js
index 475b695..f553e7e 100644
--- a/modules/ui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationItemWidget.js
@@ -130,7 +130,17 @@
// prioritized explicitly, *except* for items inside a
bundle
// (where all actions are inside the menu) or there are
more than
// two prioritized actions (all others go into the menu)
- isOutsideMenu = !this.bundle && urlObj.prioritized !==
undefined && outsideMenuItemCounter < mw.echo.config.maxPrioritizedActions;
+ isOutsideMenu = !this.bundle &&
+ (
+ (
+ // Make sure we don't
have too many prioritized items
+ urlObj.prioritized &&
+ outsideMenuItemCounter
< mw.echo.config.maxPrioritizedActions
+ ) ||
+ // If there are only two items
or less, they all go outside
+ // the menu
+ secondaryUrls.length <= 2;
+ );
linkButton = new mw.echo.ui.MenuItemWidget( {
type: urlObj.type,
--
To view, visit https://gerrit.wikimedia.org/r/376862
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a30cf4d5cdc3e7ea9ea7b0536e015de8825f785
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits