Page MenuHomePhabricator

In Brave browser, Special:Version does not wrap value in Version column; overlaps with License column
Closed, ResolvedPublic

Description

See image:

Screen Shot 2019-08-27 at 14.41.52.png (319×1 px, 111 KB)

Link to page: https://www.mediawiki.org/wiki/Special:Version (for example)

Tested on: Google Chrome, Safari, Opera and Brave and the issue occurs only in Brave. Also, a similar thing was done for the Installed software table in the Version column. See: https://github.com/wikimedia/mediawiki/blob/master/includes/specials/SpecialVersion.php#L375

Browser information with issue
Brave
Version 0.68.131 Chromium: 76.0.3809.100 (Official Build) (64-bit)
MediaWiki information with issue
  • MediaWiki 1.34.0-alpha (51dc3ed)
  • MediaWiki 1.33.0 (37fc5bd)
  • Trying on MediaWiki 1.32.0 now...

Event Timeline

xSavitar triaged this task as Medium priority.
xSavitar moved this task from To triage to Special:Version on the MediaWiki-Special-pages board.

Change 532712 had a related patch set uploaded (by D3r1ck01; owner: Derick Alangi):
[mediawiki/core@master] specials: Fix broken table view for the Special:Version page

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

With the patch, I get something like this locally:

Screen Shot 2019-08-27 at 14.46.34.png (272×1 px, 93 KB)

Hope that is better? :)

This happens on a specific browser(?) though not mentioned in the desc. I cannot reproduce it on Chrome (976.0.3809.100) even if I shrink the window to become very narrow.

This happens on a specific browser(?) though not mentioned in the desc.

Could be the case because I've tried on Google Chrome, Safari, Opera and Brave. So far, the issue only occurs on Brave. Will dump browser info in task description.

xSavitar lowered the priority of this task from Medium to Low.
xSavitar added a project: Upstream.
Aklapper renamed this task from Special:Version page view broken for version and license column to Special:Version does not wrap value in Version column; overlaps with License column.Sep 1 2019, 7:15 PM
Aklapper renamed this task from Special:Version does not wrap value in Version column; overlaps with License column to In Brave browser, Special:Version does not wrap value in Version column; overlaps with License column.

I just saw the same issue on the [[Special:Version]] page in my Chromium Version 76.0.3809.100 on Ubuntu 18.04 (64-bit). I poked at the inspector and found that this single attribute is responsible:

.mw-version-ext-vcs-version {
	unicode-bidi: embed;
}

Introduced by @Amire80 with https://gerrit.wikimedia.org/r/147733 in 2014, merged by @matmarex. There was no ticket assigned back then. I suggest to remove the attribute for now and investigate what it was originally meant to do, and what other solutions exist, looking at the issue from today's perspective.

Change 539124 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/core@master] special.version.css: Remove problematic BIDI attribute

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

@thiemowmde The rule is needed for correct rendering in RTL languages. For example, I tested my local with ?uselang=he:

With unicode-bidi: embedWithout
image.png (236×1 px, 36 KB)
image.png (236×1 px, 36 KB)

Note how removing the rule affects the directionality of the date following the version hash. The correct order is time-day-month-year (like in English), but after removing that rule, you end up with day-time-month-year, because numbers for the day and time (everything up to the first RTL Hebrew character) take on the LTR directionality of the Latin letters in the version hash preceding them.

I can't reproduce the problem on Chromium 77, by the way.

Can you test if using unicode-bidi: isolate instead resolves it for you? It seems their effect here is the same.

I tested it and found that isolate does have the same problem.

This is how it looks with uselang=he and the unicode-bidi attribute still in place:

Screenshot from 2019-09-27 10-38-44.png (122×389 px, 10 KB)

What makes me wonder is why a bug with the date is not fixed by fixing the date, but by adding something to other parts of the HTML output?

I updated https://gerrit.wikimedia.org/r/539124 and added a dir="…" attribute to the date. This is what our codebases do in literally hundreds of places. It appears to be a stable best-practice solution for issues like this. I tested it and it looks like it solves all issues.

Change 532712 abandoned by D3r1ck01:
specials: Fix broken table view for the Special:Version page

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

I'm not sure if we really have to change this, given that the browser bug was apparently fixed in Chromium 77, but this approach also works correctly, so let's just do it.

Change 539124 merged by jenkins-bot:
[mediawiki/core@master] special.version.css: Replace problematic BIDI attribute with dir

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

matmarex assigned this task to thiemowmde.

Thanks a lot! My main motivation to keep pushing was:

  • The old CSS solution felt more like a hack than anything.
  • Almost all code we have relies on the dir attribute, not on CSS.
DannyS712 subscribed.

[batch] remove patch for review tag from resolved tasks