Page MenuHomePhabricator

VisualEditor should use Codex design tokens for custom colors
Open, HighPublic5 Estimated Story Points

Description

Background

In T363849 we discovered that although integrating Codex design tokens v1.5 goes a long way in getting VisualEditor to support dark-mode, there are lots of colors in VisualEditor itself that should be updated to use Codex design tokens as well.

Requirements

VisualEditor should convert hardcoded colors into Codex design tokens.

QA steps

VisualEditor

Talk pages

screenshot 23.png (880×1 px, 227 KB)

screenshot 25.png (880×1 px, 228 KB)

screenshot 27.png (1×1 px, 271 KB)

screenshot 31.png (1×1 px, 265 KB)

screenshot 33.png (1×1 px, 278 KB)

Issues

screenshot 422 question.png (1×1 px, 507 KB)
screenshot 409.png (1×1 px, 277 KB)
screenshot 408.png (1×1 px, 272 KB)
screenshot 404.png (1×1 px, 255 KB)
screenshot 422 question 2.png (1×1 px, 532 KB)

Sign off steps

This is impacting other pages. Check the following pages on the beta cluster and open new tickets if they haven't been fixed.

  1. Recent changes save filter workflow

screenshot 37.png (1×1 px, 299 KB)

Event Timeline

Change #1037116 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[VisualEditor/VisualEditor@master] [WIP] Use Codex design tokens for custom styles

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

@Jdrewniak do you need Design-System-Team support with this task?

Good question. This is definitely part of the current work DST is doing around updating OOUI to codex-design-tokens 1.5.
This task is dependant on that work and should be applied after OOUI is updated to 1.5 (or in conjunction with that update).
I think it should be included in the general VE/OOUI dark-mode QA, and it will need code-review from Editing-team 🙂

@Jdrewniak do you need Design-System-Team support with this task?

Good question. This is definitely part of the current work DST is doing around updating OOUI to codex-design-tokens 1.5.
This task is dependant on that work and should be applied after OOUI is updated to 1.5 (or in conjunction with that update).
I think it should be included in the general VE/OOUI dark-mode QA, and it will need code-review from Editing-team 🙂

Cool, thanks for expanding here. I've put myself as reviewer. I think it doesn't need to wait for OOUI using latest tokens. The patch seems sensible on its own.

@Volker_E I think it's fine to review the patch now, but only if it's changed to use @wikimedia/codex-design-tokens v.1.3.6 instead of latest. That way it will still get colors as hex values instead of CSS variables. If VE were to get the variables, then the affected colors (and only those colors) would be changed in dark-mode and result in black-on-black text, since the rest of the colors in OOUI are still hex values.
I can update the patch now, and then after OOUI is updated, we can update the version of @wikimedia/codex-design-tokens in VE to latest.

Change #1040235 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/extensions/VisualEditor@master] Replace hardcoded colors with Codex design tokens

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

ovasileva set the point value for this task to 5.
ovasileva subscribed.

Marking as a 5 for now, but will do analysis to attempt to cut down scope

The patch linked above - Replace hardcoded colors with Codex design tokens - replaces all static color values in Extension:VisualEditor with Codex tokens. From previous experience, these kinds of changes can introduce risk because the changes are widespread (the patch touches 25 files). Also, I'm not even sure if these changes resolve the white-on-white text issues (or if the most important changes should actually be made in the core VisualEditor repo).

In order to reduce scope, I'll try to narrow down the scope of this work to fix white-on-white text in VE in dark-mode only (other issues like border colors and lower contrast grey text can be handled separately).

White-on-white text issues in dark-mode in VE

Screenshot 2024-06-17 at 5.48.20 PM.png (810×1 px, 107 KB)
Save changes dialog
Screenshot 2024-06-17 at 5.34.49 PM.png (1×2 px, 185 KB)
Find and replace dialog
Screenshot 2024-06-17 at 5.33.30 PM.png (1×2 px, 375 KB)
Insert Gallery text input
Screenshot 2024-06-17 at 5.32.35 PM.png (1×2 px, 692 KB)
Insert map icons
Screenshot 2024-06-17 at 5.31.24 PM.png (1×2 px, 371 KB)
Insert Chemical formula graphic
Screenshot 2024-06-17 at 5.29.25 PM.png (1×2 px, 433 KB)
Math symbols
Screenshot 2024-06-17 at 5.28.27 PM.png (1×2 px, 335 KB)
Insert media text input
Screenshot 2024-06-17 at 5.26.50 PM.png (434×888 px, 45 KB)
insert paragraph text
Screenshot 2024-06-17 at 5.26.04 PM.png (2×3 px, 1 MB)
insert symbol

Change #1047547 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[VisualEditor/VisualEditor@master] Replace static colors with CSS vars + fallbacks for dark-mode

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

Change #1037116 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Use Codex design tokens for custom styles

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

Change #1047547 abandoned by Jdrewniak:

[VisualEditor/VisualEditor@master] Replace static colors with CSS vars + fallbacks for dark-mode

Reason:

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

Change #1048001 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (3137295a5)

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

Change #1048001 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (3137295a5)

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

Change #1048068 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[VisualEditor/VisualEditor@master] Follow-up to c2bf989 - Use Codex colors for Mobile Editor

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