Page MenuHomePhabricator

For items with more than 2 actions, hide the rest under the "..." menu
Closed, ResolvedPublic

Description

When notifications have 3 or more actions, they look too crowded, and push the timestamp to a new line making it misaligned:

cluttered-notifications-item.png (184×524 px, 31 KB)

We should not show more than two actions directly. Those notifications requiring more than two actions will show them behind a "..." menu. In that way the actions and the timestamp can be aligned and actions remain secondary respect to the main information piece:

mention-proposed.png (80×452 px, 10 KB)

Event Timeline

Pginer-WMF raised the priority of this task from to Needs Triage.
Pginer-WMF updated the task description. (Show Details)

This is what prioritized is for. prioritized: true makes it appear *not* behind the menu.

TODO:

  • Decide what to do when three or more are prioritized: true
    • Show it like this to force us to make an explicit decision which to put behind the menu.
    • Put one behind the menu anyway.
  • Use prioritized appropriately.
  • Make sure this is implemented correctly.

Change 273531 had a related patch set uploaded (by Catrope):
MentionPresentationModel: Remove pageLink from secondary links

https://gerrit.wikimedia.org/r/273531

The fact that mention notifications had three secondary links was a mistake. The attached patch removes the page link.

Change 273531 merged by jenkins-bot:
MentionPresentationModel: Remove pageLink from secondary links

https://gerrit.wikimedia.org/r/273531

The fix removes pageLink from secondary links.

Now, Mention on wikitext user talk page comes as Alert with two secondary links - a user page of a user that did Mention and 'View changes' .
In the example below, a user ET70 mentioned the user ET58 on the user talk page of ET60.

Screen Shot 2016-03-01 at 1.19.20 PM.png (203×600 px, 39 KB)

Mention on Flow user talk page comes as a Message with two secondary links - a User page of a user that did Mention and the page where the Mention happened.
In the example below, ET70 mentioned ET58 on his own user talk page (User talk:ET70).

Screen Shot 2016-03-01 at 1.19.43 PM.png (259×640 px, 48 KB)

@Mattflaschen has laid out logical steps to implementing this feature. Thanks Matt. HOWEVER, at the present time, I am unaware of any notification type that has been specified with more than two secondary links. If you know of one, please speak up.

In the meanwhile, I will move this to the backlog, where it can remain in readiness until we need it. Sound reasonable?

Sounds good.
Once we have expandable bundles (T114356), since they add a new "expand" action, we may find some cases where 2 action notifications turn into 3 action ones.

Change 275142 had a related patch set uploaded (by Mooeypoo):
Limit 2 secondary actions outside the menu

https://gerrit.wikimedia.org/r/275142

@Mattflaschen has laid out logical steps to implementing this feature. Thanks Matt. HOWEVER, at the present time, I am unaware of any notification type that has been specified with more than two secondary links. If you know of one, please speak up.

To clarify, this works fine as long as only two prioritized: true are specified. The others will go in the ... menu as expected. So that part is already implemented (not by me).

Change 275142 merged by jenkins-bot:
Limit 2 secondary actions outside the menu

https://gerrit.wikimedia.org/r/275142

Checked in betalabs - all secondary links (actions) are moved to the dotdotdot menu.

Examples:

  1. "Your post was edited" message - 'View changes' and 'Mark as read' are in the dotdotdot menu

Screen Shot 2016-06-30 at 4.26.16 PM.png (268×712 px, 57 KB)

When this message is displayed as a cross-wiki message - all four actions are moved into the dotdotdot menu
Screen Shot 2016-06-30 at 4.27.53 PM.png (460×755 px, 104 KB)

  1. 'User right change' message

Screen Shot 2016-06-30 at 4.45.04 PM.png (457×760 px, 101 KB)

Screen Shot 2016-06-30 at 4.27.16 PM.png (559×819 px, 140 KB)

  1. 'Mention'

Screen Shot 2016-06-30 at 4.26.59 PM.png (509×773 px, 131 KB)

This makes sense, though the post-edited example above should not actually have three secondary links (as far as I'm aware, there are no notification types that legitimately have three. I will file a separate ticket to correct post-edited. )