Page MenuHomePhabricator

WWT: Do not flip the plus/minus sign in size diff when doing RTL [small]
Closed, ResolvedPublicBUG REPORT

Description

As a WWT user, I want the plus and minus symbols for RTL languages to stay on the left, so that common standards of plus/minus representation are maintained.

Background: When viewing a revision popup in an RTL language, the revision size difference shows the plus/minus sign to the right of the number. It should stay on the left, same as in LTR.

Acceptance Criteria:

  • For RTL languages, display plus and minus symbols according to MediaWiki rules

Steps to reproduce problem:

  1. Go to https://en.wikipedia.org/wiki/Thornton-le-Beans_Chapel?uselang=he
  2. Start WWT
  3. Click the first word of the article

Expected behavior: Size difference should be: (+4,541)
Observed behavior: Size difference displays as: (4,541+)

Environment:

  • WWT version:** 0.12.0.

Visual Examples:

he_diff_annotated.png (150×333 px, 13 KB)

Event Timeline

This is a great catch, @dom_walden !!

Just a note for implementers -- I think this would likely be best surrounded by <bdi> (we should have isolation method in Tools) because in some cases (like Arabic numerals) the + *does* need to be on the right side, while latin numerals will need to display it on the left. I think <bdi> (isolation) should do the trick, but it will need to be tested.

ifried renamed this task from WWT: Do not flip the plus/minus sign in size diff when doing RTL to WWT: Do not flip the plus/minus sign in size diff when doing RTL [small].Jan 8 2020, 12:49 AM
ifried moved this task from Needs Discussion to Up Next (May 6-17) on the Community-Tech board.
Samwilson subscribed.

in some cases (like Arabic numerals) the + *does* need to be on the right side

That's not how MediaWiki does it, e.g. in history lists:

arhist.png (228×216 px, 18 KB)
https://en.wikipedia.org/w/index.php?title=Thornton-le-Beans_Chapel&action=history&uselang=ar

So it looks like bidiIsolate() will do it (even if it's not strictly correct, it's what MW does so we can just do the same).

PR: https://github.com/wikimedia/WhoWroteThat/pull/134

The plus/minus sign now always appears to the left of the numbers. This is the case even in RTL languages and where a language has its own number system (e.g. Arabic).

As Sam points out, even for Arabic it is on the left, consistent with other parts of MW.

I took screenshots of the same revision popup as it appears in each (I think) of MediaWiki's supported languages. I scanned through each screenshot, to see if anything stood out as obviously wrong.

There is some changes to the way size diffs appear now in popups, I believe as a result of T241004#5792323.

Versions tested: commit e3ca2eb5a75aed8d2410d6e93faa7e0aa2fae92c and 0.13.0.

ifried moved this task from Product sign-off to Done on the Community-Tech (Kanban-Q3-2019-20) board.
ifried subscribed.

I've tested this, and it looks good to me (see screenshot example below). I'm marking this work as Done.

Screen Shot 2020-01-14 at 2.32.41 PM.png (339×1 px, 164 KB)