Page MenuHomePhabricator

Top alignment for Page Issues Modal
Closed, ResolvedPublic2 Estimated Story Points

Assigned To
Authored By
Nirzar
Mar 22 2018, 10:14 PM
Referenced Files
F16633017: image.png
Apr 3 2018, 5:11 PM
F16632877: image.png
Apr 3 2018, 5:11 PM
F16632950: image.png
Apr 3 2018, 5:11 PM
F16633022: image.png
Apr 3 2018, 5:11 PM
F16633007: image.png
Apr 3 2018, 5:11 PM
F16633011: image.png
Apr 3 2018, 5:11 PM
F16633019: image.png
Apr 3 2018, 5:11 PM
F16633013: image.png
Apr 3 2018, 5:11 PM

Description

T187916: Improve Page Issue modal
After we finished work on modal, we have 1 minor follow up tweak around this work

The top alignment for text and the icon

image.png (752×1,338 px, 176 KB)

Note: modal name should be "Page issues" (as is currently)

Developer notes

Can be seen here: https://en.m.wikipedia.org/wiki/Offset_printing

While tempting to add a top: -2px we should investigate the route cause - the HTML elements themselves are aligned but the paragraph o text gets top padding from somewhere. We should not incur tech debt as part of this change. We may need to look at the implementation of mw-ui-icon

Testing Criteria

  1. visit http://reading-web-staging.wmflabs.org/wiki/Infrastructure?useformat=mobile#/issues
  2. ensure that the top of the icon (orange circle) is aligned with the top of the text ("This article...")
  3. check on multiple browsers (mobile & desktop)
  4. repeat steps 1–3 with http://reading-web-staging.wmflabs.org/wiki/Rowing_(sport)?useformat=mobile#/issues

Related Objects

Event Timeline

@alexhollender to followup on these

I'm seeing "Page issues" as the modal title

IMG_0831.PNG (750×1,334 px, 87 KB)

IMG_0830.PNG (750×1,334 px, 142 KB)

Jdlrobson renamed this task from follow up fixes for Page Issues Modal to Top alignment for Page Issues Modal.Mar 28 2018, 1:41 PM
Jdlrobson updated the task description. (Show Details)
ovasileva set the point value for this task to 2.Mar 28 2018, 4:14 PM
ovasileva moved this task from Upcoming to 2017-18 Q3 on the Web-Team-Backlog-Archived board.

You can use the ::first-line selector and specify a line-height of 1 to achieve this. Not sure if that method is allowed.

Screen Shot 2018-03-28 at 12.22.26 PM.png (1,410×594 px, 155 KB)

Jdlrobson moved this task from To Do to Doing on the Readers-Web-Kanbanana-Board-Old board.

The empty p is probably the problem here...

Change 422464 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Issue line height makes icon and text vertically aligned

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

Change 422464 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Issue line height makes icon and text vertically aligned

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

This achieves the top alignment but appears to have the unintended consequence of the line-height being 1 for all the text in the modal

page-issue-modal-alignment.jpg (1,681×1,569 px, 552 KB)

(related to your comment above: when I delete that empty <p> tag from the HTML the problem persists)

Change 423066 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Issue line height makes icon and text vertically aligned

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

I've gone with the first-line technique.I cannot find a better solution and the time investment I'm making fighting for one is not worth it.

It's on staging for design review (but also needs code review!).

@pmiazga @alexhollender we'll need to merge this before Tuesday AM UTC to make sure it doesn't go out in current form so this is time sensitive.

Change 423066 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Issue line height makes icon and text vertically aligned

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

Staging has been updated with latest master branch.

Looks pretty good on staging across a selection of browsers, except for Firefox. It looks a little high to me, but not terribly so. @alexhollender, can you take a look at firefox and if it's good to you, we can move to PM signoff.

android/chrome - android/android - android/opera

image.png (540×984 px, 106 KB)
image.png (540×984 px, 97 KB)
image.png (720×1,304 px, 167 KB)

Android/firefox

image.png (720×1,304 px, 145 KB)
image.png (720×1,304 px, 137 KB)

ios/safari

image.png (540×960 px, 108 KB)
image.png (376×667 px, 60 KB)
image.png (768×1,024 px, 77 KB)

Talked with Nirzar. It's okay to ignore Firefox here. Thanks for catching that @ABorbaWMF.

Looks good then - thanks all!