Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

Notifications page: Notification bodies are not truncated
Closed, ResolvedPublic

Description

  1. Make a long title (or post a long message).
  2. A user, who watches the topic, views a properly truncated notifications in the Notifications flyout, but not on Special: Notifications page.

Some samples:

Screen Shot 2016-06-22 at 9.45.25 AM.png (443×1 px, 81 KB)

Screen Shot 2016-06-22 at 12.41.48 PM.png (641×1 px, 114 KB)

Screen Shot 2016-06-22 at 12.00.18 PM.png (717×1 px, 120 KB)

Event Timeline

Quiddity renamed this task from Notificaitons page: Titles and messages are not truncated to Notifications page: Titles and messages are not truncated.Jun 22 2016, 8:34 PM
Quiddity updated the task description. (Show Details)
Quiddity subscribed.
SBisson renamed this task from Notifications page: Titles and messages are not truncated to Notifications page: Notification bodies are not truncated.Jun 27 2016, 12:52 PM

There is a technical issue with making the body of a table-layout div (css) actually adhere to its width.

We can try and bypass this technically, but I think it also exposes secondary issues we should solve:

  1. Should we limit the width of the Special:Notifications page in general, even "step wise" depending on device screen size? (this will also fix the technical issue, as well as make things look better in general)
  2. Should we even truncate the body of messages at all in notification items front-end? We could instead have them wrap, given the relatively generous truncation that is done on the server.

@Pginer-WMF your input is needed.

Regarding 1, I proposed some max-width value in T137425. For very small screens we may want to hide the side filters into a popover menu, but that's worth a separate ticket.

Regarding 2, the idea of truncating the excerpt to one line is to keep items easier to scan by keeping them of similar heights. Excerpt is not intended to provide all the information, just enough context as the line allows.

Change 297447 had a related patch set uploaded (by Mooeypoo):
Set a fixed max-width to the Special:Notifications page

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

Mooeypoo moved this task from Untriaged to Needs Review on the Collab-Team-2016-Apr-Jun-Q4 board.
Mooeypoo added a subscriber: jmatazzoni.

I've added a temporary max-width of 700px to the notifications view in the Special:Notifications page, as per @jmatazzoni

We can change this to be more responsive with specific behavior for each screen size later.

Change 297447 merged by jenkins-bot:
Set a fixed max-width to the Special:Notifications page

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

As Moriel says, 700 px is a provisional spec, until Pau can come up with a responsive design or whatever he deems necessary. The width was based on an approximate reading width of 95 characters.

Change 297525 had a related patch set uploaded (by Mooeypoo):
Followup Iae32cbf82cdb: Set width to Special:Notifications

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

Change 297525 merged by jenkins-bot:
Followup Iae32cbf82cdb: Set width to Special:Notifications

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

As Moriel says, 700 px is a provisional spec, until Pau can come up with a responsive design or whatever he deems necessary. The width was based on an approximate reading width of 95 characters.

As I mentioned in T138433#2413789, there is a proposal in T137425.

If the 700px you mention are applied to the list of notifications, its not very different from what I proposed, but I'm not sure if those 700px already include the 300px-wide sidebar filter, in which case it seems too few to me.

Change 297594 had a related patch set uploaded (by Sbisson):
Followup Iae32cbf82cdb: Set width to Special:Notifications

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

I'm not sure if those 700px already include the 300px-wide sidebar filter, in which case it seems too few to me.

No, it's just the reading column. So, as you say, not that different from what you suggested. Unless you see a reason to switch back to 600, my observation is that the extra 100 px. might offer the benefit of allowing a few more headers to not wrap...

Change 297594 merged by jenkins-bot:
Followup Iae32cbf82cdb: Set width to Special:Notifications

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

Mentioned in SAL [2016-07-06T15:36:35Z] <thcipriani@tin> Synchronized php-1.28.0-wmf.9/extensions/Echo/modules/styles: SWAT: [[gerrit:297594|Set width to Special:Notifications (T138433)]] (duration: 00m 30s)

I'm not sure if those 700px already include the 300px-wide sidebar filter, in which case it seems too few to me.

No, it's just the reading column. So, as you say, not that different from what you suggested. Unless you see a reason to switch back to 600, my observation is that the extra 100 px. might offer the benefit of allowing a few more headers to not wrap...

700px is totally in a legible range. Since we are setting the upper limit is perfectly fine to go with that.

Checked in betalabs - messages with long titles/excerpts correctly fit into the area size (not responsive to the window resizing but it's not critical).

Screen Shot 2016-07-06 at 12.45.07 PM.png (706×1 px, 168 KB)
Screen Shot 2016-07-06 at 12.35.52 PM.png (598×1 px, 124 KB)