Page MenuHomePhabricator

Main banner and nag appearing at the same time in RO and LV
Closed, ResolvedPublic

Authored By
jbolorinos-ctr
Mar 6 2020, 8:52 PM
Referenced Files
F31674799: image.png
Mar 10 2020, 8:30 PM
F31674797: image.png
Mar 10 2020, 8:30 PM
F31672958: image.png
Mar 9 2020, 3:12 PM
F31672965: image.png
Mar 9 2020, 3:12 PM
F31668688: image.png
Mar 6 2020, 8:52 PM

Description

Summary:
It was reported by Thea today that the RO and LV language banners are displaying the main banner and the nag at the same time. These are big bundle countries, and it's affecting two separate countries so setting priority to P3.

image.png (903×1 px, 278 KB)

Steps to Reproduce:

  1. Open - https://ro.wikipedia.org/wiki/wikipedia?banner=B1920_0301_mlWW_dsk_p2_sm_cnt&country=RO

OR https://lv.wikipedia.org/w/index.php?title=Vikip%C4%93dija&banner=B1920_0301_mlWW_dsk_p2_sm_cnt&country=LV

  1. Observe main banner and nag appear at the same time.

Actual Results:
Main banner and nag appear at the same time in Romanian and Latvian banners

Expected Results:
We would expect the nag to appear only after the user scrolls down

Event Timeline

The vector skin site styles for those two wikis include a declaration that I don't see in the other wikis we're targeting in the bundle:

#siteNotice div {
    margin: 0;
}

And this is overriding the declaration we use to place our nag off-screen until it is triggered by the reader scrolling:

#frb-nag {
    margin-bottom: -100%;
}

I made a copy of our dsk sm bundle control and reworked the nag to use jQuery slideUp / slideDown instead of the negative margin and .reveal class we'd been using.

spatton_T247126 banner diff

I previewed in all our dsk sm bundle banners and looks fine; check it out in the two links from this task, roRO and lvLV.

@jbolorinos-ctr, I recommend we wait for @Pcoombe to review my edit, in case he's got a better way to do this, before proofing my suggestion. Thanks!

I think a better and simpler solution is to increase the specificity of our declaration. Using jQuery animations isn't as good for performance as css (and can be confusing when there are css transitions defined too).

suggested banner code, diff

preview in roRO, preview in lvLV

Noting we faced a similar problem before: T162289: Desktop small nag appears too early on Italian Wikipedia. Ideally we should try and get these outdated rules removed from local site CSS, since they are workarounds for a bug fixed almost 10 years ago. I made T247244 for that.

jbolorinos-ctr claimed this task.

Thanks @Pcoombe and @spatton!

I agree it might be better to not use jQuery UI, so I've verified @Pcoombe's fix now, here are the screenshots below:

RO Fix verified

image.png (907×1 px, 276 KB)

LV Fix verified

image.png (907×1 px, 287 KB)

Hey @Pcoombe, I'm still seeing this bug when I use this link: https://ro.wikipedia.org/wiki/wikipedia?banner=B1920_0301_mlWW_dsk_p1_lg_cnt&country=RO

Has this fix been pushed to that meta page code yet? What link will we be using for the campaign tomorrow?

No, I hadn't merged the change to the bundle desktop small banner, as I was waiting for feedback. I have done this now - diff.

Can you clarify the link you posted, are you also seeing a similar issue on desktop large?

Hey @Pcoombe,

Ok awesome! Thanks for posting the diff link, and yes my apologies for the confusion, the issue reported in this task is only affecting Desktop Small banners.

Fix verified for RO - Desktop Small

image.png (970×1 px, 381 KB)

Fix verified for LV - Desktop Small

image.png (907×1 px, 302 KB)

Closing this task as Resolved now