Page MenuHomePhabricator

For CSS and JS pages, the direction of #mw-content-text should only be forced to LTR if showing the page content, not history
Closed, ResolvedPublic

Description

Take a look at this page: https://fa.wikipedia.org/w/index.php?title=%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Common.css&action=history

The content should be flowing from right to left (it is a history page) just like this example: https://fa.wikipedia.org/w/index.php?title=%D8%B1%DB%8C%D8%AD%D8%A7%D9%86&action=history

However, it flows from left to right. Having looked at the source code it appears the root cause is that the div #mw-content-text has a class mw-content-ltr and a dir attribute of ltr. These would make sense for the when the content of the page is viewed, but not for the history view.

Event Timeline

Huji created this task.May 15 2015, 4:45 PM
Huji raised the priority of this task from to High.
Huji updated the task description. (Show Details)
Huji added a subscriber: Huji.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 15 2015, 4:45 PM
greg set Security to None.

Change 211138 had a related patch set uploaded (by Catrope):
Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally"

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

I've figured out why this broke: my patch applied mw-content-{ltr,rtl} to every page view, including history, but MediaWiki:*.js pages always have LTR content, so we made their history pages LTR as well. That's obviously wrong, the history page should be in the UI directionality regardless of the page's content directionality.

Change 211138 merged by jenkins-bot:
Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally"

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

matmarex raised the priority of this task from High to Unbreak Now!.May 17 2015, 9:17 PM

T98583 may or may not be the same issue. The fix for this should probably be backported on Monday. I'd submit it for SWAT but I'll be busy; @Catrope, can you do it?

Change 211893 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally"

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

Change 211894 had a related patch set uploaded (by Bartosz Dziewoński):
Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally"

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

Change 211894 merged by jenkins-bot:
Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally"

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

Change 211893 merged by jenkins-bot:
Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally"

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

Resolved and deployed. The fix might take a while to kick in for anonymous users, since they are viewing cached pages. Sorry it took so long. The local hacks mentioned in T98583#1292249 can be removed now. (@Ebraminio, @Ladsgroup, can you do it?)

matmarex closed this task as Resolved.May 19 2015, 3:39 PM
matmarex removed a project: Patch-For-Review.
matmarex added a subscriber: Yamaha5.

Looks great. Done. Thank you.

Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptSep 24 2017, 11:51 AM