Page MenuHomePhabricator

Dark mode not compatible with Translate extension Special:Translate page
Open, MediumPublic4 Estimated Story Points

Description

I don't want to see Special:Translate in night mode now, as the contrast there is not enough, therefore texts there are hard to read.

image.png (771×1 px, 178 KB)

Pending issues

Scoping this to Special:Translate page only.

  • ULS is not using dark theme - Handle separately.
  • Mode switcher at the bottom is not styled appropriately for the dark theme
  • Hints that appear on pressing Alt are practically unreadable with the current hack. See: https://phabricator.wikimedia.org/T371071#10248401
  • Validation errors in tux are not properly styled.
  • Text and background contrast for disabled button is not adequate.

Event Timeline

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

[mediawiki/extensions/Translate@master] Add temporary dark mode with skin-invert and notheme to translate special page

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

Jdlrobson renamed this task from Disable night-mode for Special:Translate temporary to Dark mode not compatible with Special:Translate page.Jul 26 2024, 1:49 AM
Jdlrobson subscribed.

Thanks for the report. We are in the process of dismantling the code for allowing exceptions for dark mode, but we can make this work in dark mode with the small change above.

Change #1057038 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Support dark mode with skin-invert and notheme on translate special page

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

abi_ triaged this task as Medium priority.Aug 8 2024, 8:24 AM
abi_ moved this task from Backlog to tux on the MediaWiki-extensions-Translate board.

Can this be resolved or did you want to do some QA/additional work here to improve the experience?

84f6ebaf9716ca812ba8e5acc5133f170f332045 was merged with a FIXME comment, so I guess either this task or a follow-up one needs to remain open.

Change #1081438 had a related patch set uploaded (by Tacsipacsi; author: Tacsipacsi):

[mediawiki/extensions/Translate@master] Make the group selector readable in night mode

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

To log an additional problem: the hints that appear on pressing Alt are practically unreadable with the current hack —

image.png (519×1 px, 96 KB)

The proper night mode support is needed, especially since Translate extension is used not just on translatewiki.net, but in many Wikimedia projects.

https://translatewiki.net/w/i.php?title=Special:LanguageStats&suppresscomplete=1 special page is also blindingly white, which affects every project page. The most colours there use Codex values already, so should be easy to fix.

Change #1082276 had a related patch set uploaded (by Saint Johann; author: Saint Johann):

[mediawiki/extensions/Translate@master] Use Codex variables in stats table component

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

Change #1081438 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Make the group selector readable in night mode

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

Change #1082276 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Use Codex variables in stats table component

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

Current status on translatewiki.net:

image.png (1×1 px, 153 KB)

image.png (1×1 px, 94 KB)

Issues noticed:

  1. ULS is not using dark theme
  2. Mode switcher at the bottom is not styled appropriately for the dark theme

We should fix the second item, I think the first one can be handled separately.

Current status would be better looked at by running $( '.skin-invert' ).removeClass( 'skin-invert notheme' ) in console. Special:Translate currently isn’t actually adapted to the night mode, it just uses CSS filters to invert the interface. Which leads to a bunch of issues.

Ideally would be great to have a list of components and checkmarks in the task description. Some are updated already (like statstable) but others are not, especially Special:Translate, which just has a blanket notheme skin-invert applied. The proper fix to this task would be to transition every component to Codex variables kind of like abandoned https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/1082216 did.

To me it looks usable. I would just keep the scope of this task at that (fix glaring issues).

We want to reimplement the translation interface using Codex some unknown time in the future. That's a bigger rewrite but will also bring a proper dark mode support.

I already logged one bug with it here:

To log an additional problem: the hints that appear on pressing Alt are practically unreadable with the current hack —

image.png (519×1 px, 96 KB)

The proper night mode support is needed, especially since Translate extension is used not just on translatewiki.net, but in many Wikimedia projects.

Current night mode support is very insufficient. I don’t think this task should be resolved without fixing it correctly, and not just by the hack that Jdlrobson added.

We can file another bug with the scope of fixing it properly. I want to "capture" the effort that has been put into by closing this task and not leaving it hanging open for years.

As long as night mode support will be actually added so components like those hints can be actually seen (currently I have to guess every time I use it), this task won’t be left hanging open for years. skin-invert solution is a hack, not a fix. Special:Translate wasn’t fixed by it.

Though I guess if ‘ULS support’ in night mode is also just slapping skin-invert notheme at the component and calling it a day (as it seems in Vector-2022), there’s no point to my objections. I’ll just ask that Alt hints also get fixed at least.

jhsoby renamed this task from Dark mode not compatible with Special:Translate page to Dark mode not compatible with Translate extension.Nov 16 2024, 1:43 PM

Change #1091857 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/Translate@master] Use less variables to accomodate dark mode

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

To me it looks usable. I would just keep the scope of this task at that (fix glaring issues).

“Usable” is not the same as “compatible”. Apart from the completely unreadable Alt texts and the dark-on-light language selector, skin-invert brings in a number of issues because of which I wouldn’t call it compatible: for example, the background color of the message table is weirdly subtly different from the rest of the page (in light mode, both are #fff, but in night mode, the message table is #000 while the rest is #101418), and images in message documentation are inverted (e.g. translate-manage-intro-other or the especially weirdly-looking wikilove-image).

We want to reimplement the translation interface using Codex some unknown time in the future. That's a bigger rewrite but will also bring a proper dark mode support.

This doesn’t mean that there shouldn’t be a short-term solution for the dark mode compatibility. Even if you don’t want to work on it, I think there are enough volunteers (including myself) who are able and willing to fix the dark mode compatibility.

We will review patches to improve dark mode support and I appreciate your efforts. For tracking and reporting purposes, I would appreciate if we can find a way to split the work over multiple smaller tasks under one epic.

Change #1091740 had a related patch set uploaded (by Abijeet Patro; author: Majavah):

[mediawiki/extensions/Translate@master] Fix dark mode border on 'mark this page for translation' bar

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

Change #1091740 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Fix dark mode border on 'mark this page for translation' bar

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

Change #1091857 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Use less variables to accommodate dark mode

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

All the latest changes are deployed on translatewiki.net

Still needs some more work. See task details for more information.

abi_ renamed this task from Dark mode not compatible with Translate extension to Dark mode not compatible with Translate extension Special:Translate page.Nov 22 2024, 1:48 PM
abi_ updated the task description. (Show Details)
abi_ added a project: patch-welcome.
abi_ updated the task description. (Show Details)

I recommend we create a bigger epic ticket to track work on the entire Translate extension as a whole. I've scoped this to Special:Translate page.

Change #1098872 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/Translate@master] Change CSS files into LESS files

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

Change #1098872 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Change CSS files into LESS files

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

Change #1098968 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/Translate@master] Lessify LESS files, part 1

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

Change #1099015 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/Translate@master] Lessify LESS files, part 2

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

Change #1099018 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/extensions/Translate@master] Lessify LESS files, part 3

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

Change #1098968 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Lessify LESS files, part 1

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

abi_ changed the point value for this task from 2 to 4.Thu, Dec 5, 7:14 AM

Change #1099015 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Lessify LESS files, part 2

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

Change #1099018 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Lessify LESS files, part 3

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