Page MenuHomePhabricator

[BUG] mobile-html article body has wrong background color
Closed, ResolvedPublicBUG REPORT

Description

How many times were you able to reproduce it?

5/5

Steps to reproduce

  1. Go to https://en.wikipedia.org/api/rest_v1/page/mobile-html/Dog in the browser
  2. Open console
  3. Paste pagelib.ThemeTransform.setTheme(document, pagelib.ThemeTransform.THEME.BLACK) in the console to change theme to black

Expected results

Body is black

Actual results

Body is white

Context

It appears that this has to do with the recent fix for T214728 that unsets .content background color.
In mobile-html pages content applies to body so setting unset or initial on content overrides background from pagelib_theme_black_body. Turning off those 2 content rules fixes it.

Event Timeline

@Jhernandez Should we make T177433 an Epic?

@Mhurd Uploaded https://github.com/wikimedia/wikimedia-page-library/pull/182. I think we could get rid of the added rules for T214728, now that the base CSS endpoint is more stable and doesn't include most of the extraneous CSS rules from Minerva (see T220045).

Mentioned in SAL (#wikimedia-operations) [2019-04-23T17:22:08Z] <bsitzmann@deploy1001> Started deploy [mobileapps/deploy@78985fb]: Update mobileapps to 6d3a422 (T201382 T217837)

Mentioned in SAL (#wikimedia-operations) [2019-04-23T17:26:14Z] <bsitzmann@deploy1001> Finished deploy [mobileapps/deploy@78985fb]: Update mobileapps to 6d3a422 (T201382 T217837) (duration: 04m 06s)

Tagged this by mistake. This is not merged yet.

Mentioned in SAL (#wikimedia-operations) [2019-04-30T17:11:48Z] <bsitzmann@deploy1001> Started deploy [mobileapps/deploy@1f09e44]: Update mobileapps to 142ba30 (T217837)

Mentioned in SAL (#wikimedia-operations) [2019-04-30T17:16:04Z] <bsitzmann@deploy1001> Finished deploy [mobileapps/deploy@1f09e44]: Update mobileapps to 142ba30 (T217837) (duration: 04m 16s)

Purged https://meta.wikimedia.org/api/rest_v1/data/css/mobile/pagelib and verified with https://en.wikipedia.org/api/rest_v1/page/mobile-html/Dog in incognito mode to avoid browser cache.
+ ran pagelib.ThemeTransform.setTheme(document, pagelib.ThemeTransform.THEME.DARK)

Screen Shot 2019-04-30 at 11.48.33 AM.png (745×924 px, 357 KB)