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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 7 2019, 3:02 PM
Jhernandez added subscribers: bearND, Jhernandez.

@bearND to move under the appropriate epic and prioritise.

bearND triaged this task as High priority.Mar 13 2019, 6:55 PM

@Jhernandez Should we make T177433 an Epic?

bearND added a subscriber: Mhurd.Apr 11 2019, 10:39 PM

@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).

@bearND oh cool! will check it out!

bearND claimed this task.Apr 11 2019, 10:40 PM

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)

bearND closed this task as Resolved.Apr 30 2019, 5:50 PM