Page MenuHomePhabricator

Integrate dark mode on Android
Closed, ResolvedPublic2 Estimated Story Points

Description

Color palette for *iOS*

ThemeBase backgroundChrome backgroundPaper backgroundPrimary TextSecondary TextAccent TextLinkIconMid backgroundBorderShadowHRCard type backgroundCard type iconSecondary action backgroundDestructive action / errorWarning
Default#EAECF0 (Base80)#FFFFFF (Base100)#FFFFFF (Base100)#222222 (Base10)#72777D (Base30)#00AF89 (Green50)#3366CC (Accent50)#54595D (Base20)#F8F9FA (Base90)#C8CCD1 (Base70)#EAECF0 (Base80)#C8CCD1 (Base70)variedvaried#2A4B8D (Accent10)#DD3333 (Red50)#FFCC33 (Yellow50)
Sepia#E1DAD1 (Amate)#F8F1E3 (Parchment)#F8F1E3 (Parchment)#222222 (Base10)#646059 (Masi)#00AF89 (Green50)#3366CC (Accent50)#646059 (Masi)#F0E6D6 (Papyrus)#CBC8C1 (Kraft)#CBC8C1 (Kraft)#CBC8C1 (Kraft)#E1DAD1 (Amate)#646059 (Masi)#2A4B8D (Accent10)#B32424 (Red30)#FF9500 (Osage)
Dark#222222 (Base10)#43464A (Mesophere)#2E3136 (Thermosphere)#F8F9A (Base90)#C8CCD1 (Base 70)#00AF89 (Green50)#6699FF (Stratosphere)#C8CCD1 (Base 70)#27292D (Exosphere)#43464A (Mesophere)#43464A (Mesophere)#C8CCD1 (Base 70)#43464A (Mesophere)#C8CCD1 (Base 70)#2A4B8D (Accent10)#FF6E6E (Red75)#ffcc33 (Yellow50)

Color guides for *iOS*

Note: The following were copied and pasted from iOS tickets so are not entirely accurate

Sepia iOSDark iOS
Sepia mode color palette.png (1×899 px, 98 KB)
Dark mode color palette.png (1×899 px, 107 KB)
NOTE: ==Theme guide for *ANDROID*==
Android Light and Dark color palette.png (3×3 px, 596 KB)
Android dark and light theme.png (2×1 px, 331 KB)

Event Timeline

Niedzielski renamed this task from Integerate dark mode on Android to Integrate dark mode on Android.May 15 2017, 10:05 PM
Niedzielski created this task.

Change 365181 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[apps/android/wikipedia@master] WIP: Hygiene: consolidate dark mode theming in wikimedia-page-library

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

o/ @RHo, the focus of this task is just a chore to move all the current code, bugs and all, to a new place but I tried to also use some some of the coloring mentioned in T169148 for dark mode, improved the tech a bunch, and fixed a couple things as I went. Below I've shared some glimpses of the current state although I'm certain many other issues exist across the wikis. Considering the preexisting issues on master, if there are any blockers for merging this refactor patch please let me know. We can tackle the nonblockers in new tickets using the new framework. Thank you!

screenshot-2017-07-13-17-32-16-430636374.png (2×1 px, 355 KB)
Screenshot_1499984881.png (800×480 px, 77 KB)
Quadratic formula: for devices that support CSS filters, we invert formulas. We fallback to just using a light #ccc background.

Screenshot_1499984875.png (800×480 px, 84 KB)
Quadratic formula: this patch is based on a master a couple days back so there's some clash with the native header and the horizontal rule is native.

Screenshot_1499984923.png (800×480 px, 75 KB)
Liste de sondages sur l'élection présidentielle française de 2017: some articles still look terrible. We should handle them on a case-by-case in new tickets.

Screenshot_1499984846.png (800×480 px, 574 KB)
Screenshot_1499984858.png (800×480 px, 119 KB)
Screenshot_1499984799.png (800×480 px, 139 KB)
Screenshot_1499984999.png (800×480 px, 219 KB)
Screenshot_1499984980.png (800×480 px, 298 KB)
Wolverine (character), Manchester United F.C., Obama, French Obama: we unconditionally try to style infoboxes now but there are still some articles that look bad.

Screenshot_1499984812.png (800×480 px, 225 KB)
Screenshot_1499984940.png (800×480 px, 356 KB)
Manchester United F.C., Pablo Picasso: captions.

Screenshot_1499985791.png (800×480 px, 215 KB)
Picasso's Blue Period: gallery pictures look a little better but maybe we should shrink the padding in both dark and light.

Screenshot_1499985797.png (800×480 px, 99 KB)
Picasso's Blue Period: block quotes look a little funky still.

hey @Niedzielski – just a few color update tweaks to dark mode:

  • The background color of the article should use #2E3136 per the T169148 update, with the footer background being #222 (Base10). See the Zeplin mocks for the Dark vs Light versions.
  • Title description "Add title description" icon color and link text should use #6699FF (Accent75) (not #3366cc aka Accent50 color in use in screenshots)
  • Title description text color is #C8CCD1 (Base70)
  • Edit icon in dark mode uses the standard dark mode color of rgba (255,255,255,0.7)
  • horizontal divider between the article title and content (I think it's "content block_0_hr" in css) is #C8CCD1 (Base70)
  • update inline image captions (I think these are ".thumbcaptions" in the CSS) to use #a2a9b1 (Base50)
  • The reading list thumbnail should have 2dp radii on all sides, but in dark mode you can see the white square corners (circled in magenta):
    image.png (1×1 px, 227 KB)
  • Table of contents dark mode colors:
    • TOC background color #43464A
    • Active TOC element color #54595D (Base20)
    • Article title and H2 sections text color #F8F9FA (Base90)
    • H3 subsection text color #C8CCD1 (Base70)
    • See Zeplin mock for redlines https://zpl.io/QsHxx

Thanks @RHo!

  • The background color of the article should use #2E3136 per the T169148 update, with the footer background being #222 (Base10). See the Zeplin mocks for the Dark vs Light versions.
  • update inline image captions (I think these are ".thumbcaptions" in the CSS) to use #a2a9b1 (Base50)

Done!

  • Edit icon in dark mode uses the standard dark mode color of rgba (255,255,255,0.7)

The current design uses static images (one for the standard pencil and one for the locked pencil). I can filter these with CSS but we'll get better device support if we have a dark mode specific asset. Would you mind re-cutting these and including dark mode (and sepia!) variants? Does the ripple animation color (when you press it) stay the same?

  • Title description "Add title description" icon color and link text should use #6699FF (Accent75) (not #3366cc aka Accent50 color in use in screenshots)
  • Title description text color is #C8CCD1 (Base70)

I think you're referring to the page header title? That's native code. This patch is WebView stuff only.

  • The reading list thumbnail should have 2dp radii on all sides, but in dark mode you can see the white square corners (circled in magenta):
  • Table of contents dark mode colors:

This is in native code.

  • horizontal divider between the article title and content (I think it's "content block_0_hr" in css) is #C8CCD1 (Base70)

This appears to be native code too: https://phabricator.wikimedia.org/diffusion/APAW/browse/master/app/src/main/res/layout/view_page_header.xml;86d9c3b455a2859ea404163d8b8a2bd2e581b504$63

Here's what the patch rebased on master looks like:

screenshot-2017-07-17-17-18-25-874957072.png (2×1 px, 1 MB)

screenshot-2017-07-17-17-18-34-206070717.png (2×1 px, 1 MB)

screenshot-2017-07-17-17-18-46-537021940.png (2×1 px, 1 MB)

Looking good @Niedzielski – just noticed a couple more things related to the infobox:

  • In the open infobox, the background color of the first column should also be #27292D (ie., the whole table row is the same color).
Expected:
image.png (860×1 px, 105 KB)
Actual:
image.png (352×700 px, 63 KB)
  • the color of the 'secondary' text in the infoboxes should use the #C8CCD1 (Base70) color:
Expected:
image.png (246×692 px, 31 KB)
Actual:
image.png (146×672 px, 23 KB)

And I'll add the native code items to the T95080 ticket...

The current design uses static images (one for the standard pencil and one for the locked pencil). I can filter these with CSS but we'll get better device support if we have a dark mode specific asset. Would you mind re-cutting these and including dark mode (and sepia!) variants? Does the ripple animation color (when you press it) stay the same?

I've attached SVG versions of both icons if that makes it easier?
On Light mode the icons should be rgba (0,0,0,.54) whilst on Dark (255,255,255,.70).

Thanks @RHo! @Mhurd, FYI these are the tweaks I'll be making as part of this task ^^^

Change 366743 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[apps/android/wikipedia@master] Update: dark mode page background and divider colors

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

Okey dokey, I think I've got it. I also pushed a couple native tweaks up but I'm sure there are more adjustments to be made in native and the WebView across all the wikis and pages.

Screenshot_1500599708.png (800×480 px, 287 KB)

Screenshot_1500599704.png (800×480 px, 79 KB)

Screenshot_1500599826.png (800×480 px, 126 KB)

Change 366783 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[mediawiki/extensions/MobileApp@master] Hygiene: consolidate edit link styling in page-library

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

Change 366784 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[apps/android/wikipedia@master] WIP: Hygiene: consolidate edit link styling in page-library

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

Change 365181 merged by jenkins-bot:
[apps/android/wikipedia@master] Hygiene: consolidate dark mode theming in wikimedia-page-library

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

Change 366743 merged by jenkins-bot:
[apps/android/wikipedia@master] Update: dark mode page background and divider colors

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

Change 366783 merged by jenkins-bot:
[mediawiki/extensions/MobileApp@master] Hygiene: consolidate edit link styling in page-library

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

Change 366784 merged by jenkins-bot:
[apps/android/wikipedia@master] Hygiene: consolidate edit link styling in page-library

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

Change 368828 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Design tweak: fix rounded corners of compound reading list thumbnails.

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

Change 368828 merged by jenkins-bot:
[apps/android/wikipedia@master] Design tweak: fix rounded corners of compound reading list thumbnails.

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

Change 368837 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Update styling of ToC for light and dark mode.

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

Change 368837 merged by jenkins-bot:
[apps/android/wikipedia@master] Update styling of ToC for light and dark mode.

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

Change 368849 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Design tweak: update styling of page title and description.

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

Change 368849 merged by jenkins-bot:
[apps/android/wikipedia@master] Design tweak: update styling of page title and description.

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

Per group discussion: Given the original task was only meant to cover page-library integration, I'm going to close this ticket and file dark mode styles still requiring updates (eg colors on the feed, error text colors, etc) on a new task.

RHo updated the task description. (Show Details)

@Dbrant - just realized that the task description had been copied and pasted from the iOS ticket so it is not accurate with Android theme color applications. I'll create the Android specific theme color table in the new task.

Dbrant claimed this task.