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:

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:

Event Timeline

Pginer-WMF updated the task description. (Show Details)
Pginer-WMF raised the priority of this task from to Needs Triage.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 5 2016, 8:53 AM

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.
SBisson set Security to None.Feb 10 2016, 7:58 PM
SBisson added a subscriber: SBisson.

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

Etonkovidova added a subscriber: Etonkovidova.EditedMar 1 2016, 9:32 PM

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.

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).

@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?

Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptMar 2 2016, 2:55 AM

Sounds good to me.

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.

Mooeypoo claimed this task.Mar 5 2016, 12:59 AM

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


When this message is displayed as a cross-wiki message - all four actions are moved into the dotdotdot menu

  1. 'User right change' message


  1. 'Mention'

jmatazzoni closed this task as Resolved.Jul 5 2016, 6:31 PM

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. )