Page MenuHomePhabricator

Tables with alternating colors appear incorrectly in dark theme.
Closed, ResolvedPublic

Event Timeline

Dbrant renamed this task from Some infoboxes in German articles have white background in sepia, dark and black themes to Some tables in articles have unreadable background in dark and black themes.May 24 2022, 8:58 PM
Dbrant added a subscriber: Electron2.0.

Here's another example on English Wikipedia, a table produced by the "Track listing" template on https://en.wikipedia.org/wiki/Renewal_(Billy_Strings_album)

In this case, the table rows alternate between white and light gray background to facilitate readability. (Many tables on Wikipedia use this pattern.) The ones with white backgrounds are readable, but the ones with light gray backgrounds are not because the text color still gets turned to white when using a dark theme.

iPad:

unnamed.png (2×1 px, 422 KB)

Android phone:

Screenshot_20221010-130138.png (2×1 px, 193 KB)

Okay, it's been over two years and the solution is to simply change the color value of the background. Why hasn't anyone taken the five seconds to do so? Can someone give me the authorization to do it? It'd be a lot faster than sitting here adding more reports endlessly.

Change 861403 had a related patch set uploaded (by KarlBeecken; author: KarlBeecken):

[mediawiki/services/mobileapps@master] dirtyfix mobile zebra table dark mode issue

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

Change 861403 abandoned by KarlBeecken:

[mediawiki/services/mobileapps@master] dirtyfix mobile zebra table dark mode issue

Reason:

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

Change 861406 had a related patch set uploaded (by KarlBeecken; author: KarlBeecken):

[mediawiki/services/mobileapps@master] dirtyfix mobile zebra table dark mode issue

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

JTannerWMF subscribed.

Hey there the Android team plus 1 it. Its now on Content-Transform-Team to plus 2 it

Change 861406 merged by jenkins-bot:

[mediawiki/services/mobileapps@master] dirtyfix mobile zebra table dark mode issue

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

Merged and deployed, may still show up as broken in cached content until the cache expires.

I tested this on the example from above, the track listing table from https://en.wikipedia.org/wiki/Renewal_(Billy_Strings_album), but it isn't fixed even after purging the cache, making a null edit, or previewing the table with a non-null edit.

I tested this on the example from above, the track listing table from https://en.wikipedia.org/wiki/Renewal_(Billy_Strings_album), but it isn't fixed even after purging the cache, making a null edit, or previewing the table with a non-null edit.

I believe the CSS is still cached on the server side, and that's what needs to expire first.

Dbrant renamed this task from Some tables in articles have unreadable background in dark and black themes to Tables with alternating colors appear incorrectly in dark theme..Dec 9 2022, 5:10 PM
Dbrant updated the task description. (Show Details)

I updated the description of this task to be specifically regarding the issue with alternating colors, which was fixed by @KarlBeecken. Other instances of incorrect table backgrounds will still exist, and can be tracked via T284327.

Cache has been purged, so clients should now be getting the updated CSS. Client-side cache might still take up to a day to refresh, but this should be fixed now.

Jgiannelos claimed this task.
Jgiannelos subscribed.

I verified it using this URL: https://en.wikipedia.org/api/rest_v1/page/mobile-html/Renewal_(Billy_Strings_album)?theme=dark
It looks like the table is rendered properly now

@SunAfterRain That was a slightly different issue. It looks like that particular table template has CSS that sets an explicit background color on the tr::before selector. Upon editing that template to exclude our theme, the issue disappears.