Page MenuHomePhabricator

Implement the new night mode color palette in Minerva
Closed, ResolvedPublic1 Estimated Story Points

Description

The new color palette was defined in https://phabricator.wikimedia.org/T356323#9518498
The new palette should be implemented in Minerva.
POC: https://gerrit.wikimedia.org/r/997956

Please follow up with Justin if there are any issues with the new palette.

variable namecurrent valuenew valuenotes
color-base#eaecf0#F8F9FA
color-subtle#c8ccd1#D4D5D5
color-link#69f#6E85D8
color-link-red#ff4242#E45D52
color-progressive#69f#6E85D8
background-color-destructive#ff4242#E45D52
color-progressive--active#94b8ff#AFB6E9
background-color-base#202122#101418
color-visited#9781bd#977DBD
background-color-interactive#2e3136#202122
background-color-interactive-subtle#f8f9fa#202122not inverted yet
background-color-progressive-subtle#eaf3ff#202122not inverted yet
border-color-base#a2a9b1#2E3136not inverted yet
border-color-inverted#ffffff#F8F9FA
border-color-progressive--focus#3366cc#AFB6E9
border-color-subtle#c8ccd1#D4D5D5
border-color-transparenttransparenttransparent
box-shadow-color-progressive--focus#3366cc#AFB6E9
color-inverted#ffffff#F8F9FA
color-link-red--visited#a55858#B97876
color-link-external#3366cc#6E85D8
color-link-external--visited#6b4ba1#B97876
color-link-external--active#2a4b8d(no change)
box-shadow-color-drawerrgba(0,0,0,0.35)#AFB6E9

QA

  • Verify that there are no UI regressions in Pixel for the mobile site.

Sign off

  • Sign off should be carried about by designer

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 1003003 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/skins/MinervaNeue@master] New night mode color palette

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

Change 1003003 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] New night mode color palette

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

I looked through this and a couple issues popped out:

  1. border, border-bottom, and border-top don't use variables. Right now they're hardcoded as #eaecf0. They should be border-color-base #2e3136.
  2. The active link colour is yellow right now. There's a variable called --color-link--active which is #FAA700. That's where the yellow clicked color is coming from. We spec'd color-progressive--active as #AFB6E9.
  3. The "script error" text at the top doesn't use a variable. It should be color-link-red.
  4. .read-more-container-heading is hardcoded and should be color-base
  5. external links and related pages templates are broken

@JScherer-WMF so sorry to do this but I'm gonna bother you for a lot of clarification to make sure I get it right this time

  1. Just to clarify, this will change the border color for day mode - are we comfortable with that or are you looking to also redefine --border-color-base in day mode to #eaecf0?
  2. Similar to the first question, are we looking to change the active link color to use --color-progressive--active in all modes, or is it that in night mode we set the value of color-link--active to that of color-progressive--active?
  3. The script error style is coming from core. I'd want to double check with the team on how to proceed there since again that could have farther-reaching impacts
  4. The .read-more-container-heading color is coming from the Related Articles extension. Similar to the above point I'm comfortable making the change, but want to make sure I'm doing the right thing here
  5. Can you say a bit more about how external links are broken? Related pages templates feels like a similar issue to above that we might want to split into a separate ticket, but not sure

Sorry again for responding to every single one of these points 😭 let me know what your thoughts are and depending on how much scope this adds we may want to create a separate ticket or bring back to the team

hey, a few notes
1: Could you be specific about what borders? It matters to determine whether this is in svope @border-color-muted might apply here.
2: This is out of scope. Please raise this concern in T357381 instead.
3: Also out of scope. This is beta cluster specific and I wouldn't worry about thsi right now (For the record its the Scribunto extension). [I will create a ticket]
4: RelatedArticles is using Codex and not in scope right now. This will be fixed when Codex is updated to use CSS variables.

  1. Also curious about what you mean here...

Thanks for the responses @SToyofuku-WMF and @Jdlrobson !

Just to clarify, this will change the border color for day mode - are we comfortable with that or are you looking to also redefine --border-color-base in day mode to #eaecf0?

I don't think the #eaecf0 is coming from the day mode palette because it's white, and you wouldn't be able to see it on day mode. It looks like it's been inverted without using a variable somehow. I'd love to leave the daymode colours and just change the nightmode ones.

Could you be specific about what borders? It matters to determine whether this is in svope @border-color-muted might apply here.

Specifically, I am targeting the border-bottom styles in class="section-heading collapsible-heading open-block", the borders above and below class="page-actions-menu" and the border styles around and within the infobox, which i think are all the borders on the page, essentially.

The rest of the comments make sense. I'll add the yellow colour to T357381.

external links and related pages templates are broken

I'm referring to:

Screenshot 2024-02-13 at 1.50.38 PM.png (904×836 px, 122 KB)

Screenshot 2024-02-13 at 1.50.42 PM.png (826×850 px, 133 KB)

They're still in day mode.

Also, I didn't see --color-link-active at all in the initial palette that I converted. So it might just be that the variable is missing from the spec.

#eaecf0 is indeed present in day mode - it's hardcoded all over the place but also corresponds to @border-color-muted (and, confusingly, @background-color-interactive, @background-color-disabled-subtle, and @background-color-notice-subtle as well). I feel like the solution here might be to define a --border-color-muted for night mode (which could be the same as background color interactive?) and I can swap them out as I go

#eaecf0 is indeed present in day mode - it's hardcoded all over the place but also corresponds to @border-color-muted (and, confusingly, @background-color-interactive, @background-color-disabled-subtle, and @background-color-notice-subtle as well). I feel like the solution here might be to define a --border-color-muted for night mode (which could be the same as background color interactive?) and I can swap them out as I go

Thanks for this! It wouldn't be the same as background-color-interactive. It would be the same as border-color-base which is #2E3136.

Gotcha - so, to avoid changing anything in the appearance of day mode, I can update the hardcoded values to use --border-color-muted, and then in night mode set the value of --border-color-muted to be the same as --border-color-base. Does this make sense?

Thanks for the responses @SToyofuku-WMF and @Jdlrobson !

Just to clarify, this will change the border color for day mode - are we comfortable with that or are you looking to also redefine --border-color-base in day mode to #eaecf0?

I don't think the #eaecf0 is coming from the day mode palette because it's white, and you wouldn't be able to see it on day mode. It looks like it's been inverted without using a variable somehow. I'd love to leave the daymode colours and just change the nightmode ones.

Could you be specific about what borders? It matters to determine whether this is in svope @border-color-muted might apply here.

Specifically, I am targeting the border-bottom styles in class="section-heading collapsible-heading open-block", the borders above and below class="page-actions-menu" and the border styles around and within the infobox, which i think are all the borders on the page, essentially.

The rest of the comments make sense. I'll add the yellow colour to T357381.

external links and related pages templates are broken

I'm referring to:

Screenshot 2024-02-13 at 1.50.38 PM.png (904×836 px, 122 KB)

Screenshot 2024-02-13 at 1.50.42 PM.png (826×850 px, 133 KB)

They're still in day mode.

Right these are expected. The former is a template and will need to be fixed by community. We're currently working on addressing the white text on white background issue in T356899
The latter will be fixed by T356542 - watch this space !

Gotcha - so, to avoid changing anything in the appearance of day mode, I can update the hardcoded values to use --border-color-muted, and then in night mode set the value of --border-color-muted to be the same as --border-color-base. Does this make sense?

So just to clarify what I see as next steps @SToyofuku-WMF and in scope for this task:

  • Update any instances of #eaecf0 in skinStyles or resources with the appropriate CSS variable. For borders, use var( --border-color-muted ) and for backgrounds use @background-color-interactive. The colors are the same but the variable tells us what it is used for.
  • Define --border-color-muted and --background-color-interactive in the light mode and night mode palettes. I believe you can define them for light mode like so:
--border-color-muted: @border-color-muted;
--background-color-interactive: @background-color-interactive;

For night mode, use hardcoded hexcode #2E3136.

  • Define --color-error: @color-error in the list of CSS variables. The night mode hex value should be the same as color-link-red

Everything else is captured in other tickets.

Jdlrobson lowered the priority of this task from High to Medium.Feb 14 2024, 6:14 PM

Change 1003543 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/skins/MinervaNeue@master] Fix borders in night mode palette

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

Change 1003543 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Fix borders in night mode palette

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

Borders are looking good. The visited link purple colour is wrong, though. It's computed as #6b4ba1. It should be #977DBD.

Change 1003926 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Map color-based skin variables to CSS variables

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

Test wiki created on Patch demo by JDrewniak (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/a28e4ad506/w

Change 1004127 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/skins/MinervaNeue@master] Add --color-link--visited to night mode palette

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

Change rOMWC1004226c15e2 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Use border-color-muted CSS variable for Special:RecentChanges

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

Change 1004127 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Add --color-link--visited to night mode palette

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

Change rOMWC1004226c15e2 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Use border-color-muted CSS variable for Special:RecentChanges

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

@Edtadros to check with QTE team for further testing. We will communicate this change out to other teams before proceeding.

Change 1006065 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Adds color-emphasize to palette

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

Change 1006065 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Adds color-emphasize to palette

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

@Edtadros - I checked GrowthExperiemnts (Special:Homepage) related pages. Below are the test results. Let me know if you need more information or more testing.

For the comparison I added the screenshots for the case when the dark-mode gadget is enabled by (in https://test.m.wikipedia.org/wiki/Special:Preferences#mw-prefsection-gadgets). To my knowledge, the dark-mode gadget exists on enwiki and testwiki. Or I should've compare it with the native dark mode on mobile?

beta enwiki with minervanightmode=1testwiki wmf.19 with the dark mode gadget enabbled
Screen Shot 2024-02-23 at 3.56.32 PM.png (1×850 px, 151 KB)
Screen Shot 2024-02-23 at 4.06.25 PM.png (1×628 px, 126 KB)
many controls are not visible
Screen Shot 2024-02-23 at 3.56.49 PM.png (1×640 px, 94 KB)
Screen Shot 2024-02-23 at 3.57.15 PM.png (1×638 px, 292 KB)
filter selection
Screen Shot 2024-02-23 at 4.09.24 PM.png (1×610 px, 117 KB)
Screen Shot 2024-02-23 at 4.10.20 PM.png (1×632 px, 100 KB)
Screen Shot 2024-02-23 at 3.58.00 PM.png (1×632 px, 162 KB)
Screen Shot 2024-02-23 at 4.10.43 PM.png (1×628 px, 176 KB)
intro
Screen Shot 2024-02-23 at 4.14.12 PM.png (1×642 px, 67 KB)
Screen Shot 2024-02-23 at 3.57.23 PM.png (1×650 px, 114 KB)

Hi @Etonkovidova it might be best to post the above on https://phabricator.wikimedia.org/T357699 so it's not lost? This was for the general change but that ticket specifically covers Special:Homepage

Hi @Etonkovidova it might be best to post the above on https://phabricator.wikimedia.org/T357699 so it's not lost? This was for the general change but that ticket specifically covers Special:Homepage

Done - thx, @Jdlrobson!