Page MenuHomePhabricator

[Bug] Special:MobileOptions heading padding should be consistent
Closed, ResolvedPublic2 Estimated Story Points

Description

Steps to Reproduce

  1. Visit http://readers-web-master.wmflabs.org/wiki/Special:MobileOptions
  2. Resize your browser to >= 720 px wide
  3. Observe that there's no whitespace below the Reading preferences tagline
  4. Resize your browser to < 720 px wide
  5. Observe that there's whitespace below the Reading preferences tagline

Expected Results

  • The whitespace below the Reading preferences tagline should always be there.

Actual Results

  • See the "Steps to Reproduce" section above and the following:
WidthResult
719 px
readers-web-master.wmflabs.org_wiki_Special_MobileOptions (1).png (1×850 px, 134 KB)
720 px
readers-web-master.wmflabs.org_wiki_Special_MobileOptions.png (1×1 px, 184 KB)

Environments Observed

Testing Environment for QA

Browser Version

  • Chrome (68.0.3440.106)
  • Firefox (61.0.2)

OS Version

  • macOS High Sierra (10.13.6)

Developer notes

.ns-special .heading-holder .tagline has a margin-bottom: 15px; not a padding-bottom.
Switching to a padding, you'll also need to update the rule for .ns-special #content .pre-content to introduce the margin needed for mobile display.

Event Timeline

Restricted Application changed the subtype of this task from "Deadline" to "Task". · View Herald TranscriptAug 22 2018, 5:01 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
ovasileva set the point value for this task to 2.Aug 29 2018, 4:47 PM

Change 472655 had a related patch set uploaded (by Takidelfin; owner: Takidelfin):
[mediawiki/extensions/MobileFrontend@master] Special/MobileOptions: Header padding consistency

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

Jdlrobson subscribed.

Hey @takidelfin thanks for your first contribution to mobile! Confusingly, the mobile site lives in two repos - MobileFrontend and Minerva. The latter will be needed for this fix!

Change 472701 had a related patch set uploaded (by Takidelfin; owner: Takidelfin):
[mediawiki/skins/MinervaNeue@master] Special/MobileOptions: Header padding consistency

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

>= 1000px>= 720px<720px
screenshot_20181109_200535.png (195×1 px, 13 KB)
screenshot_20181109_200542.png (190×955 px, 12 KB)
screenshot_20181109_200550.png (221×790 px, 10 KB)

Does it behave as expected? @D3r1ck01 @Jdlrobson

Yup! In terms of the bug fix - you've got the right idea and those screenshots are what we're aiming for, but I've pointed out a few problems on the ticket with other special pages:

Screen Shot 2018-11-09 at 12.09.28 PM.png (545×1 px, 58 KB)

There's also a few suggestions there for your 2nd round of implementation! good luck!

Hmm... I have used

!important

because of mobile.special.styles overriding mobile.mobileoptions.styles :/

Is there any way to fix this? Because then I can't set padding correctly. @Jdlrobson @D3r1ck01

screenshot_20181109_214057.png (249×340 px, 19 KB)

Is there any way to fix this? Because then I can't set padding correctly

A technique that might be worth exploring is adding a bottom border to .ns-special .pre-content e.g. border-bottom: solid 1px transparent;
With this, maybe the margin-top can be added to the element after pre-content ?
Reading up on http://seifi.org/css/understanding-taming-collapsing-margins-in-css.html before your next attempt might give you some context with why this bug is happening!

Expected behaviorActual behavior
screenshot_20181109_220054.png (157×634 px, 9 KB)
screenshot_20181109_220107.png (153×631 px, 8 KB)

Actually, I mean overriding padding: 0

@Jdlrobson

Okay, I found a way how to achieve it without !important it:

#section_0 {
	padding: 34px 16px 0;
}
.tagline {
	padding: 0 16px;
}

Change 472655 abandoned by Takidelfin:
Special/MobileOptions: Header padding consistency

Reason:
This issue is caused by MinervaNeue skin

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

@D3r1ck01 @Jdlrobson Could you please review my patch? Jenkins added +2, all tests have passed successfully. :D

@takidelfin the display is correct on mobile but it should look like this on tablet and desktop (>=720px):

Screen Shot 2018-11-11 at 7.43.09 AM.png (249×804 px, 24 KB)

umm, so that padding is expected? But I did it previously D:

yep, there is 1 px padding :/
I really don't understand what is the expected behavior. Do you want consistent padding on all views or different for larger than 720px?

>=1000px>=720px<720px
screenshot_20181111_201348.png (282×1 px, 16 KB)
screenshot_20181111_201353.png (277×1 px, 14 KB)
screenshot_20181111_201359.png (241×836 px, 11 KB)

@Jdlrobson
@D3r1ck01

Is this expected behavior?

No. The padding is different on mobile.

Mobile needs to look like:

Screenshot_20181111-121734_Chrome.jpg (2×1 px, 278 KB)

(>=720px) like this:
Screen Shot 2018-11-11 at 7.43.09 AM.png (249×804 px, 24 KB)

umm.... but that is how it looks actually.

@Jdlrobson, that means the actual behavior on the task description is not a bug right? Because that is the actual behavior right now. But @phuedx expects that the padding should be there even in mobile or are my missing the point here? Thanks :)

The bug only exists with tablet. The issue is the paddi ng under reading preferences. Mobile should stay as it is.

Currently:

readers-web-master.wmflabs.org_wiki_Special_MobileOptions.png (1×1 px, 184 KB)

Required:
Screen Shot 2018-11-11 at 7.43.09 AM.png (249×804 px, 24 KB)

Ah! I thought that issue is with that spacing! Sorry ;(
I have added that 'internal padding' though.

screenshot_20181112_094133.png (28×806 px, 9 KB)

@Jdlrobson Could you look at my newest patch? I have added a comment describing the purpose of max-width media query

Change 473140 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] [Bug] Special:MobileOptions heading padding should be consistent

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

Okay, so I had a deep dive into this while reviewing @takidelfin's patch. It gave me the idea of using a transparent border bottom to fix the collapsed margin. Unless I'm mistaken https://gerrit.wikimedia.org/r/473140 also solves this issue without the media query in https://gerrit.wikimedia.org/r/#/c/472701/. Both solutions solve the issue, so we can go with either. Am looking for someone to help me make that decision! Thanks in advance!

I've approved @takidelfin 's GCI task while we make this decision, so no rush!

Change 472701 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Special:MobileOptions: Consistent padding of heading

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

Change 473140 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] [Bug] Special:MobileOptions heading padding should be consistent

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