Page MenuHomePhabricator

BUG: Notifications tray (mobile) - margins and borders
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

There are several minor issues with the notifications tray on mobile.

  1. There is a 4px gap between the top border and the first gray cell
image.png (1×750 px, 195 KB)
en.m.wikipedia.org_wiki_Main_Page(iPhone 6_7_8).png (1×750 px, 71 KB)
  1. The gray cells should not have borders on the right and left
currentcorrect
en.m.wikipedia.org_wiki_Main_Page(iPhone 6_7_8) (1).png (1×750 px, 170 KB)
en.m.wikipedia.org_wiki_Main_Page(iPhone 6_7_8) (2).png (1×750 px, 170 KB)

Developer notes

  • Points 1 and 2 above can be achieved by:
    1. Removing margin-top: 1px from .notifications-overlay .overlay-content and accounting for the 1px border (e.g. using margin-top: -1px;}
    2. Adding border-left-with: 0; border-right-width: 0; to .notifications-overlay .mw-echo-ui-notificationItemWidget

See also: T227624, T226125

QA instructions

  • While logged in, visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Spain. Click on the notifications button in the header (will be either a bell icon or a circle with a number). When the notifications drawer opens and assuming you have > 0 notifications (if not register as a new user and you will have a notification), ensure that the gap (depicted in the task description) between the notifications header and first item is not there anymore. Also ensure that there are no borders on both sides of each item.

Event Timeline

@alexhollender: Which codebase is this task about? MobileFrontend? Notifications? Could you please add a project tag? Thanks!

phuedx triaged this task as Medium priority.Jun 7 2019, 7:26 PM
phuedx updated the task description. (Show Details)
phuedx moved this task from Needs triage to Triaged on the Mobile board.
phuedx moved this task from Triaged to MobileFrontend specific on the Mobile board.
phuedx subscribed.

… gIven that the bugs are minor.

Jdlrobson renamed this task from Notifications tray (mobile) - minor bugs to BUG: Notifications tray (mobile) - margins and borders.Jul 9 2019, 10:02 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)

Change 521777 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Adjustments to Notification tray margins and borders

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

Jdlrobson subscribed.

While analysing this, I split out several subtasks where it is more appropriate to fix. I wrote a patch as the remaining work involved was trivial.

ovasileva set the point value for this task to 2.Jul 16 2019, 4:49 PM

So it turns out the fix to T195795 is also the fix to this (so I've pulled that one into the sprint)

Change 521777 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Adjustments to Notification tray margins and borders

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

@Jdlrobson looks like the borders are gone. The gap is now 1px instead of 4px. It seems like it's coming from the margin-top on .notifications-overlay .overlay-content

image.png (724×937 px, 262 KB)

l

In T225260#5367720, @alexhollender wrote:

@Jdlrobson looks like the borders are gone.

Just to confirm, you are happy with this outcome, correct?

The gap is now 1px instead of 4px. It seems like it's coming from the margin-top on .notifications-overlay .overlay-content

The negative margin top was intentional and is to allow the border to display but I don't consider it a gap (but maybe my understanding of what you mean by a gap here is the problem).
Removing it results in this:

Screenshot 2019-07-26 at 11.40.42 AM.png (210×1 px, 41 KB)

The header is 54px height, with a bottom border of 1px.
The margin-top accounts for the 1px border at the bottom of overlay-content to make sure the content sits underneath the border.

Note when a row is coloured (e.g. hovered) there is a 1px border around the row in addition to the background.

This rule might help visualise:

.mw-echo-ui-notificationItemWidget-unread:hover {
    background-color: red;
}

Screenshot 2019-07-26 at 11.57.05 AM.png (387×996 px, 67 KB)

I think this will require us to sync today and get on the same page.

In T225260#5367720, @alexhollender wrote:

@Jdlrobson looks like the borders are gone.

Just to confirm, you are happy with this outcome, correct?

correct

Regarding that gap: thanks for clarifying and sorry for the lack of specificity here. It seems that the gap is only present at screen sizes below 720px, which is when the notifications tray becomes fullscreen. Perhaps we can remove the css rule for that case?

below 720pxabove 720px
image.png (336×432 px, 39 KB)
image.png (476×510 px, 52 KB)

Change 526190 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] There is no reason for notification overlay header to be static

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

Change 526190 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] There is no reason for notification overlay header to be static

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

alexhollender_WMF removed alexhollender_WMF as the assignee of this task.
alexhollender_WMF updated the task description. (Show Details)