Page MenuHomePhabricator

Wikipedia.org portal searchbox metadata display: allow for RTL article titles and descriptions
Closed, ResolvedPublic

Description

The new auto-completion feature on wikipedia.org is lovely!

An important thing to add is lang and dir attributes on every element that is known to be in a different language. Right-to-left text is especially prone to getting jumbled if the proper dir attribute is not set, and it also affects font setting for Serbian, Korean, and so on.

As far as I could tell, elements under <div class="suggestion-text"> definitely need this. Setting it on the whole <div> may be OK, but note that this will probably also move the thumbnail to the other side, and I'll leave it to the designers to decide whether it's desirable. If it's not on the whole <div>, then it will have to be set on each <h3 class="suggestion-title"> and <p class="suggestion-description">.

If there is a staging environment for this, I'll be happy to help with testing.

Event Timeline

debt triaged this task as Medium priority.Mar 14 2016, 11:05 PM
debt added a project: Discovery-Portal-Sprint.
debt subscribed.

Moving to Portal board

We don't know which languages are right to left only - will move to the backlog for now for looking at when we can localize the page.

debt renamed this task from Set lang and dir attributes on article titles and descriptions in the auto-completion in the search box on wikipedia.org to Wikipedia.org portal searchbox metadata display: allow for RTL article titles and descriptions .Sep 23 2016, 6:38 PM
debt removed a subscriber: MSyed.

Since the page has been localized and text-direction has been set on the HTML element (although at the moment l10n is slightly broken as we work out some caching issues), I've started work on some minor changes that should improve RTL readability

  • correcting the direction of the search suggestions
  • placement of the icons in the sister project links.

https://gerrit.wikimedia.org/r/#/c/339631/

Screen Shot 2017-02-24 at 2.45.21 PM.png (1×2 px, 586 KB)

Since the page has been localized and text-direction has been set on the HTML element (although at the moment l10n is slightly broken as we work out some caching issues), I've started work on some minor changes that should improve RTL readability

  • correcting the direction of the search suggestions
  • placement of the icons in the sister project links.

https://gerrit.wikimedia.org/r/#/c/339631/

Screen Shot 2017-02-24 at 2.45.21 PM.png (1×2 px, 586 KB)

Judging by the screenshot, I think this is still far from how the page should look like in RTL mode.

  • The thumbnails should be on the right. It's how it's displayed on mobile, and portal presenting results differently will disrupt RTL users.
  • The language selector should be on the left.
  • The entire footer should be RTL, not just the text, meaning the projects should be on the left and the mobile apps on the right.
  • The WMF logo and Wikipedia logo should be on the right.

We can go with this patch first, and keep on improving later, or we can make a bigger patch now. What do you think @Jdrewniak ? (and @Amire80 )

Patch https://gerrit.wikimedia.org/r/#/c/339631/ is by no means a complete RTL solution, but rather addresses the most basic readability issues.

@JGirault that's a pretty comprehesive list of RTL todo's, but I wonder how much of those we can address without CSSJanus. All we really have to play with (client-side) is inline-block for layout, which introduces it's own set of challenges.

I guess since this is merged https://phabricator.wikimedia.org/rWPOR423c563b34d900e17e7c2407455ba9f1012d9d34 we can use html[dir='rtl'] .class-names {} for RTL specific styling, which would introduce a maintanence cost, but that's the best I can come up with right now.

debt claimed this task.
debt moved this task from In Progress to Done on the Discovery-Portal-Sprint board.

Moving this to done and resolving - it looks like it was merged/pushed to production on Feb 28 along with T154349 on Feb 8 that address many of the issues with RTL language display.

@Amire80 - let me know if there is more for us to do on this topic, as we have done what we can for right now.

Change 341783 had a related patch set uploaded (by Jdrewniak):
[wikimedia/portals] Improving mobile layout

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

debt reassigned this task from debt to Jdrewniak.
debt moved this task from Done to Needs code review on the Discovery-Portal-Sprint board.

Change 341783 merged by jenkins-bot:
[wikimedia/portals] Improving mobile layout

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

Closing this as the few remaining suggestions have been added to ticket T160429 and the goal of this particular ticket was deployed on Mach 14, 2017.