Problem/Motivation

The dialog for the Tour has incomplete css support for RTL language.

Proposed resolution

Add the missing css for the Tour dialog

Remaining tasks

User interface changes

Correct display of the Tour dialog in RTL languages.

API changes

None

Original report by @balagan

Doing manual tests for this issue I have found that the close button of the tour dialog is displayed on the right side for RTL languages for both Bartik and Seven themes. See this picture.
There are also RTL styles missing, for example .joyride-tip-guide and .joyride-content-wrapper.

Beta phase evaluation

-

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because the support for RTL languages is missing.
Issue priority Normal because the missing css does not affect the functionality
Unfrozen changes Unfrozen because it only changes css
Prioritized changes The main goal of this issue is usability for RTL languages
Disruption Not disruptive
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vacho’s picture

This problem is in tour module css.
Please review and validate this patch that solve the problem.

idebr’s picture

Status: Active » Needs review

@vacho Don't forget to update the issue status to 'Needs review' when you upload a patch :)

balagan’s picture

Assigned: Unassigned » balagan
balagan’s picture

I think @vacho got wrong selector, for me the enclosed patch works.

balagan’s picture

Assigned: balagan » Unassigned
idebr’s picture

Status: Needs review » Needs work

@balagan You are correct, the selector was off. The close-button is now on the correct side, but the padding from .joyride-tip-guide and .joyride-content-wrapper is still missing RTL css. Let's add that while we're at it.

balagan’s picture

Assigned: Unassigned » balagan

Ok, I am trying to do that.

balagan’s picture

I am not sure if I got .joyride-content-wrapper right. There are still RTL display errors on the dialog in the pager, and more interestingly the hebrew tour is of 4 pages, whereas same tour in English is 10 pages. I will check if an issue exists already.

balagan’s picture

Status: Needs work » Needs review
idebr’s picture

Status: Needs review » Needs work

Yes, looking good! Just a few small things:

  1. +++ b/core/modules/tour/css/tour.module.css
    @@ -60,7 +60,11 @@
    +  padding: 1em 1em 1.5em 1.5em; /* LTR */
    +}
    +
    +[dir="rtl"] .joyride-tip-guide {
    +  padding: 1em 1.5em 1.5em 1em;
    

    There is no need for an additional line breaks. RTL theming should go as close as possible to the original selector to increase readability

  2. +++ b/core/modules/tour/css/tour.module.css
    @@ -69,6 +73,11 @@
    +[dir="rtl"] .joyride-content-wrapper {
    +  /* Apply padding from parent .joyride-tip-guide to absolutely positioned children. */
    

    An identical comment is two lines up. No need to repeat, so this line can be removed :)

  3. +++ b/core/modules/tour/css/tour.module.css
    @@ -69,6 +73,11 @@
    +  padding-left: 1em;
    

    Don't forget to reset the padding-right that applied in the LTR styling (eg. padding-right: 0;)

vacho’s picture

Good solutions...
but I answer. The x (Close icon) in the view is at upper right corner on all windows popup interfaces of view.

Then are all popus of view also incorrect?

balagan’s picture

I was working on this issue, and there it was correctly on left side for RTL languages, so I suppose that patch will solve it.

balagan’s picture

@idebr: at 2. and 3. I had a feeling about the points you made, but I was unsure. Thanks for pointing them out. Hopefully I have fixed those.

balagan’s picture

Assigned: balagan » Unassigned
Status: Needs work » Needs review
idebr’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
243.89 KB
243.79 KB

@vacho The Views dialogs have the close button on the wrong side indeed. This is being fixed in #2396473: Add missing RTL rules to System CSS

Patch looks good! Screenshot before:

Screenshot after:

YesCT’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +D8MI, +Needs issue summary update
Related issues: +#2396473: Add missing RTL rules to System CSS

Nice collaboration on this issue.

What about the "pager"?

Should the word 'of' be between the numbers?

Seems like patch doing more than just the close button. So I think this needs a more accurate title and an issue summary update.

The browser plug in from http://dreditor.org has some buttons that might help for using the issue summary template and embedding screen shots.

balagan’s picture

I was also thinking about the pager, but I thought that is either not an issue or a different one. I will check it more thoroughly.

balagan’s picture

Issue summary: View changes
balagan’s picture

I think the pager is moved by some JS code, don't see anything to do with styles, but I am no expert. Yesterday I saw some strange behaviour when displaying LTR text with RTL style, for example the sentence ending dots were moved to the other side, but sometimes to both the front and end of another sentence. I suppose the same code might be responsible for this. If I write letters to the beginning and end of the pager, it displays properly. Yesterday with Hojtsy Gabor agreed not to open issue for the dots, since we are displaying LTR text as RTL. This number- and dot-moving logic might be working properly, I have no idea.

balagan’s picture

Ok, it is not JS, but normal RTL behaviour I guess: http://stackoverflow.com/questions/20798667/why-is-a-trailing-punctuatio...

balagan’s picture

FileSize
124.86 KB
balagan’s picture

So about the pager displaying "of 4 1" it is definitely normal css behaviour. I was playing on http://www.w3schools.com/cssref/playit.asp?filename=playcss_direction&pr..., changed the input text to "1 of 4", and got the same result. See screenshot. (Ok, I was lying, I wrote 4 of 50.)

balagan’s picture

Issue summary: View changes
balagan’s picture

Status: Needs work » Needs review
idebr’s picture

Title: Close button on RTL tour dialog is on right side. » Add missing RTL css for the Tour dialog
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs issue summary update

I did some additional testing on the pager and it appears this behavior is the default behavior for RTL. Additional changes:

  • Updated the issue summary to correctly reflect the changes in the patch
  • Added a beta evaluation
alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/tour/css/tour.module.css
    @@ -68,6 +71,10 @@
       padding-right: 1em;
    

    Missing /* LTR */

  2. +++ b/core/modules/tour/css/tour.module.css
    @@ -138,8 +145,10 @@
    +
    

    No need for additional blank line

balagan’s picture

I have corrected the changes according to the notes in #26, and since it has been RTBC before, I dare to change the status back again (after retesting again).

balagan’s picture

Status: Needs work » Needs review
idebr’s picture

Status: Needs review » Needs work
+++ b/core/modules/tour/css/tour.module.css
@@ -68,6 +71,10 @@
+[dir="rtl"] .joyride-content-wrapper {
+  padding-right: 0;
+  padding-left: 1em; /* LTR */
+}

I think you misplaced the /* LTR */ comment here. It should be on the LTR styling instead.

The removed linebreak looks good:)

Could you add an interdiff to make it easier for reviewers to check your changes between patches? There is a documentation page available here: https://www.drupal.org/documentation/git/interdiff

balagan’s picture

OMG, I am getting worse at this.:)

balagan’s picture

This should be OK, hopefully.

balagan’s picture

Status: Needs work » Needs review
idebr’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
608 bytes

Nice :). I added an interdiff with the last RTBC patch in #13 for easier reviewing

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 17bf38b and pushed to 8.0.x. Thanks!

Thanks for adding the beta evaluation to the issue summary.

  • alexpott committed 17bf38b on 8.0.x
    Issue #2409197 by balagan, idebr, vacho: Add missing RTL css for the...

Status: Fixed » Closed (fixed)

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