Page MenuHomePhabricator

Background color of elements is not preserved in dark mode.
Closed, ResolvedPublic

Description

  1. Go to the national assembly of Pakistan article.
  2. Tap quick facts.
  3. Observe the colored boxes do not show as they should.

screenshot-2015-06-27-18-44-30-074609646.png (1×800 px, 148 KB)

Expected:
https://en.wikipedia.org/wiki/National_Assembly_of_Pakistan

Event Timeline

Niedzielski raised the priority of this task from to Needs Triage.
Niedzielski updated the task description. (Show Details)
Dbrant renamed this task from Color boxes in quick facts don't render to Background color of elements is not preserved in dark mode..Jul 1 2015, 2:46 PM
Dbrant triaged this task as Medium priority.
Dbrant set Security to None.
Dbrant moved this task from Needs Triage to Bug Backlog on the Wikipedia-Android-App-Backlog board.

This is because we actually strip out all background colors from table elements when we go into dark mode.
Idea: instead of stripping the color, we can try modifying the "brightness" of the color to be darker, e.g. (r/2, g/2, b/2).

Here's a screenshot with RGB values halved (rather than stripped) for table element backgrounds.

The good news is that it looks fine in general; the bad news is, as is the case here, this can also change meaning; the colors in the key (which we've just restored) no longer match up to the seats in the diagram.

Screen Shot 2015-08-03 at 4.21.27 PM.png (808×837 px, 112 KB)

This is more like it on the halving. What do you think?

Screen Shot 2015-08-03 at 4.57.25 PM.png (812×837 px, 114 KB)

Change 228989 had a related patch set uploaded (by Mholloway):
Halve RGB values of background colors in tables in night mode

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

Change 228989 merged by jenkins-bot:
Halve RGB values of background colors in tables in night mode

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

Signed off by design (QA to test for additional cases)

Checked with 2.0.108-alpha-2015-08-12 on Nexus5(Android 5.1)
Samsung Tablet Ce0168(Android 4.0.4)

The 'Quick facts' for the national assembly of Pakistan article are displayed as in the screenshot by @Mholloway.

Checked on other articles with the same Quick facts structue with colorbox(es)-National Assembly (South Korea), Scottish Parliament, National Assembly of Quebec(no colorbox ).