Page MenuHomePhabricator

Language selector and edit button icon not displayed on first load in iOS 13
Closed, ResolvedPublic

Description

I’m using iOS 13.0 on iPhone 11.

  1. Open safari, ensure no tabs are open and type a Wikipedia URL.
  2. Visit the page

Observe presence of language selector and edit link. Unexpected: they are absent.

Reload the page. Observation: links are present.

Also replicated:

  • iOS: 12.3.2
  • Chrome: 77.0.3865.103

no anything

IMG_3395.PNG (2×1 px, 471 KB)

no main menu
IMG_3394.PNG (2×1 px, 1 MB)

  • macOS 10.14.6
  • Chrome 77.0.3865.90

no watchlist

Screen Shot 2019-10-02 at 8.26.26 PM.png (1×990 px, 313 KB)

QA instructions

October 9, 2019
  • Go to the main page on enwiki from a variety of iOS devices
  • Ensure the bug does not appear after navigating through to a couple of pages
October 10, 2019
  • Go to the main page on a couple of non-English wikis from a variety of iOS devices
  • Ensure the bug does not appear after navigating through to a couple of pages
ACStatusDeviceiOS VersionDetails
1 iPhone 5s7T233521#5565518 T233521#5565549
2 iPhone 68T233521#5565518 T233521#5565549
3iPhone 6s Plus9T233521#5565518
4iPhone 710T233521#5565518
5iPhone 811T233521#5565518
6iPhone XR12T233521#5565518
7iPhone XS13T233521#5565518
8 iPad Air7T233521#5565518 T233521#5565549
9 iPad Air 28T233521#5565518 T233521#5565549
10iPad 611T233521#5565518
11iPad Mini 201912T233521#5565518
12iPad Pro 12.913T233521#5565518

these cases were declined per T207618

Event Timeline

T233521-load-first.JPG (1×591 px, 145 KB)
T233521-load-second.JPG (1×591 px, 145 KB)
added as attachments.

Jdlrobson added a subscriber: Jdlrobson.

This sounds like another variant of T232260. Is it reproducible on the beta cluster?

Jdlrobson renamed this task from Language selector and edit button not displayed on first load in iOS 13 to Language selector and edit button icon not displayed on first load in iOS 13.Oct 2 2019, 5:02 PM
Jdlrobson lowered the priority of this task from High to Medium.

I still cannot replicate this, so I honestly feel this was a caching issue relating to recent changes performance team regarding embedding icons and we made (changing icons). It's not worth exploring any further unless we are getting a lot of complaints about and I don't think it's high priority.

ovasileva raised the priority of this task from Medium to High.Oct 2 2019, 6:29 PM
ovasileva added a subscriber: ovasileva.

@Jdlrobson - Was not able to reproduce exact bug, but ran into the following:
iOS: 12.3.2
Chrome: 77.0.3865.103
no anything

IMG_3395.PNG (2×1 px, 471 KB)

no main menu
IMG_3394.PNG (2×1 px, 1 MB)

macOS 10.14.6
no watchlist

Screen Shot 2019-10-02 at 8.26.26 PM.png (1×990 px, 313 KB)

I've tried debugging this issue and I was able to locate an affected page (GW501516 in my case) and inspect it from my iPhone using the Safari inspector.

There are no network errors in the console. The browser loads the correct image URL, so this isn't a caching issue.

The element itself exists in the DOM, but the :before pseudo-element is getting zero width and zero height, whereas the other icons are getting the correct 20px width and height.

IMG_7251.PNG (1×750 px, 377 KB)

When comparing the watch star with the edit icon, I saw one difference in the CSS

Screen Shot 2019-10-02 at 21.51.05.png (2×2 px, 1 MB)
Screen Shot 2019-10-02 at 21.51.01.png (2×2 px, 1 MB)
watchstaredit

For some reason, the watchstar was getting a display:flex and thus zero width and height. Why?

Screen Shot 2019-10-02 at 21.53.12.png (2×2 px, 1 MB)
Screen Shot 2019-10-02 at 21.53.15.png (2×2 px, 1 MB)

It looks like the watchstar icon is being affected by the .client-js .jsonly rule, whereas the other icons are not. Could this be because of the loading order?

I was able to replicate this on the same GW501516 page on Safari desktop:

dissapearing-icon.2019-10-02 22_12_06.gif (699×1 px, 541 KB)

I think adding a min-width/min-height to .mw-ui-icon:before can fix this.

Screen Shot 2019-10-02 at 22.16.15.png (926×1 px, 344 KB)

Change 540479 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/skins/MinervaNeue@master] Ensuring width/height on mw-ui-icon when display: flex;

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

Making this the canonical bug

So I've been able to replicate both the hamburger and search icon missing on my iphone test device (iOS 12.0). Although all the following screenshots are from my local dev instance, I've also seen it on en wiki. Here is a screenshot locally and comparisons between the .mw-ui-icon element, the :before element, and the network request for when the hamburger icon shows and doesn't show:

ds-3-screenshot.jpeg (2×1 px, 304 KB)

Hamburger visibleHamburger not visible
.mw-ui-icon
s-3-parent.png (2×3 px, 952 KB)
ds-3-parent.png (2×3 px, 941 KB)
:before
s-3-child.png (2×3 px, 604 KB)
ds-3-child.png (2×3 px, 604 KB)
network request
s-3-network.png (2×3 px, 611 KB)
ds-3-network.png (2×3 px, 636 KB)

tldr I can't find any differences between the two states! @Jdrewniak's inspection results seems to differ from mine, but we were also looking at different icons. When I look at the hamburger icon, the .mw-ui-icon is display: block in both cases and seems to have the correct height. The network request is 200 in both cases and the preview shows it there.

I'm not really sure what is causing this. webkit rendering bug?

Update: I've messed around with this some more and I'm pretty convinced now that the [[ https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/skinStyles/mediawiki.ui.icon/mediawiki.ui.icon.less#L31 | background-size: contain in mediawiki.ui.icon.less ]] is somehow implicated in at least the icons that I've see disappear (hamburger, language selector, search).

When I remove that property, I don't notice the problem anymore on iOS. When I add it back in, I notice the problem.

The thing is that property is valid and is needed to scale the icons so we can't just remove it. I do think this is a webkit bug though

fwiw, I've been able to replicate a missing hamburger icon on iOS 12.0 safari (although it can be very inconsistent) using the following html/css:

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>Barack Obama - Wikipedia</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width"/>
<style>
.icon {
    display: block;
    width: 20px;
    height: 20px;
    background-image: linear-gradient(transparent,transparent),url(https://en.m.wikipedia.org/w/load.php?modules=skins.minerva.icons.images&image=mainmenu&format=original&skin=minerva&version=1w73t );
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}
</style>
</head>
<body>
<a href="/" class="icon"></a>
</body>
</html>

Update: I've noticed three things about this bug:

  1. When I remove the background-size: contain property, I don't notice the issue
  1. When I remove linear-gradient(transparent,transparent) from background-image, I don't notice the issue
  1. When I replace the svg with a png, I don't notice the issue

Therefore, my guess is that webkit has trouble reconciling a background-size: contain combined with multiple values for a background-image svg

Change 540479 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Adding a static width/height for mw-ui-icon background images.

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

Change 541596 had a related patch set uploaded (by Jdlrobson; owner: Jdrewniak):
[mediawiki/skins/MinervaNeue@wmf/1.35.0-wmf.1] Adding a static width/height for mw-ui-icon background images.

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

Change 541596 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@wmf/1.35.0-wmf.1] Adding a static width/height for mw-ui-icon background images.

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

Mentioned in SAL (#wikimedia-operations) [2019-10-08T19:38:25Z] <dduvall@deploy1001> Synchronized php-1.35.0-wmf.1/skins/MinervaNeue/: sync T233521 backport prior to group0 (duration: 00m 59s)

Test Result:Production

OS: iOS
Browser: Various on Browserstack
Test Artifact(s):

AC#ResultDeviceiOS Versionenwikieswikidewikijawikiarwiki
1iPhone 5s7
en-iPhone5s-7.png (1×802 px, 496 KB)
es_iPhone5s-7.png (1×794 px, 467 KB)
de-iPhone5s-7.png (1×796 px, 481 KB)
ja-iPhone5s-7.png (1×792 px, 493 KB)
ar-iPhone5s-7.png (1×780 px, 452 KB)
2iPhone 68
en-iPhone6-8.png (1×808 px, 716 KB)
es-iPhone6-8.png (1×814 px, 698 KB)
de-iPhone6-8.png (1×812 px, 740 KB)
ja-iPhone6-8.png (1×806 px, 670 KB)
ar-iPhone6-8.png (1×808 px, 772 KB)
3iPhone 6s Plus9
en-iPhone6sPlus-9.png (1×808 px, 623 KB)
es-iPhone6sPlus-9.png (1×808 px, 667 KB)
de-iPhone6sPlus-9.png (1×812 px, 676 KB)
ja-iPhone6sPlus-9.png (1×808 px, 609 KB)
ar-iPhone6sPlus-9.png (1×838 px, 537 KB)
4iPhone 710
en-iPhone7_10.png (1×838 px, 689 KB)
es-iPhone7_10.png (1×832 px, 576 KB)
de-iPhone7_10.png (1×834 px, 585 KB)
ja-iPhone7_10.png (1×834 px, 575 KB)
ar-iPhone7_10.png (1×814 px, 390 KB)
5iPhone 811
en_iPhone8_11.png (1×828 px, 563 KB)
es_iPhone8_11.png (1×810 px, 775 KB)
de_iPhone8_11.png (1×824 px, 508 KB)
ja_iPhone8_11.png (1×828 px, 645 KB)
ar_iPhone8_11.png (1×820 px, 606 KB)
6iPhone XR12
en_iPhoneXR_12.png (1×808 px, 499 KB)
es_iPhoneXR_12.png (1×816 px, 784 KB)
de_iPhoneXR_12.png (1×806 px, 735 KB)
ja_iPhoneXR_12.png (1×804 px, 477 KB)
ar_iPhoneXR_12.png (1×810 px, 631 KB)
7iPhone XS13
en_iPhoneXS_13.png (1×792 px, 461 KB)
es_iPhoneXS_13.png (1×792 px, 571 KB)
de_iPhoneXS_13.png (1×788 px, 757 KB)
ja_iPhoneXS_13.png (1×798 px, 629 KB)
ar_iPhoneXS_13.png (1×804 px, 745 KB)
8iPad Air7
en_iPadAir_7.png (1×1 px, 814 KB)
es_iPadAir_7.png (1×1 px, 946 KB)
de_iPadAir_7.png (1×1 px, 676 KB)
ja_iPadAir_7.png (1×1 px, 744 KB)
ar_iPadAir_7.png (1×1 px, 560 KB)
9iPad Air 28
en_iPadAir2_8b.png (1×1 px, 918 KB)
en_iPadAir2_8a.png (1×1 px, 637 KB)
es_iPadAir2_8.png (1×1 px, 777 KB)
de_iPadAir2_8.png (1×1 px, 989 KB)
ja_iPadAir2_8.png (1×1 px, 718 KB)
ar_iPadAir2_8.png (1×1 px, 902 KB)
10iPad 611
en_iPad6_11.png (1×1 px, 926 KB)
es_iPad6_11.png (1×1 px, 1014 KB)
de_iPad6_11.png (1×1 px, 944 KB)
ja_iPad6_11.png (1×1 px, 770 KB)
ar_iPad6_11.png (1×1 px, 671 KB)
11iPad Mini 201912
en_iPadMini_12.png (1×1 px, 563 KB)
es_iPadMini_12.png (1×1 px, 608 KB)
de_iPadMini_12.png (1×1 px, 767 KB)
ja_iPadMini_12.png (1×1 px, 599 KB)
ar_iPadMini_12.png (1×1 px, 648 KB)
12iPad Pro 12.913
en_iPhoneXS_13.png (1×792 px, 461 KB)
es_iPhoneXS_13.png (1×792 px, 571 KB)
de_iPhoneXS_13.png (1×788 px, 757 KB)
ja_iPhoneXS_13.png (1×798 px, 629 KB)
ar_iPhoneXS_13.png (1×804 px, 745 KB)
Edtadros added a subscriber: Edtadros.

@ovasileva When I was testing the Oct 10 - non-English wikis I decided to pick the oldest phone on BrowserStack. It had iOS 7. I noticed that there was an issue with the icons. I redid all of the tests with iPhones and iPads for every iOS they had on all of the wikis I was testing in order to be more thorough. It looks like every device with an OS version 9 and above work fine. I'm not putting this in Ready For Signoff. Per https://en.wikipedia.org/wiki/IOS_version_history#iOS_9, iOS 9 came out in June 2015 and is supported on iPhone 4S onwards, iPad 2 onwards, iPad Mini onwards. So each of the devices tested would support iOS9. Without any metrics to back it up I cannot say for certain how many pre-iPhone 4s devices are being used or how many devices run iOS8 and earlier.

The ❌ cases are captured in the declined T207618

We're done! Thanks all!