Problem/Motivation

There are lots of selectors that have LTR properties, duplicated in the *.rtl.css file. It's hard to keep track of them with that file disassociation.

Proposed resolution

Using the [dir="rtl"] and [dir='ltr'] attribute selectors we can adjust the RTL specific properties inline with the LTR selectors. So it's easier then to remember to change the corresponding selector.

This is how D8 does things and works with IE7+

Remaining tasks

User interface changes

API changes

Data model changes

Follow-up to #2558547: Improve the default sort of the primary discount View

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Here's a patch to do this.

This needs screenshots before and after for the RTL and LTR versions.

joelpittet’s picture

Issue tags: +Commerce Sprint, +CSS
torgospizza’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new104.17 KB
new147.94 KB

Works well for me! In the first screenshot, it would become impossible to select the offer type in the middle. Hence the blue highlight that occurred when attempting to click.


Note: I was actually clicking the "% off" tab here but my cursor is invisible in the screenshot.

After the patch, I can select everything just fine.

Things look pretty much the same before and after the patch from a stylistic standpoint but the UX feels much improved.

joelpittet’s picture

Oh that is interesting, it should just be fixing RTL;) Thanks for testing that out @torgosPizza

torgospizza’s picture

Hmm yeah that might have been thanks to #2574751: Unable to change offer type as well. (I came to this issue from that one.)

In any case it seems to work well. I don't use any RTL languages so someone else may have to test that particular aspect but, I'm sure it's fine.

Thanks!

joelpittet’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new40.17 KB

Re-rolled. The screenshots needed would be the RTL vs LTR. you can install another language or just cheat and set the dir="rtl" on the html tag to get an approximation.

torgospizza’s picture

Ah. Sorry for the noise :)

Status: Needs review » Needs work

The last submitted patch, 7: use_dir_rtl_for_rtl-2591433-7.patch, failed testing.

joelpittet’s picture

StatusFileSize
new28.68 KB

Re-rolled due to changes.

joelpittet’s picture

Status: Needs work » Needs review

Ok this should be good.

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs screenshots
StatusFileSize
new71.43 KB
new83.73 KB
new60.45 KB
new61.68 KB

Before RTL:

After RTL:

Before LTR:

After LTR:

  • joelpittet committed 9430b83 on 7.x-1.x
    Issue #2591433 by joelpittet, torgosPizza: Use [dir="rtl"] for RTL...
joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Ok this has been committed to dev.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.