Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RTL specific styles #855

Merged
merged 5 commits into from Mar 18, 2020
Merged

Add RTL specific styles #855

merged 5 commits into from Mar 18, 2020

Conversation

yuriy-fix
Copy link
Contributor

Fixes #854

@yuriy-fix yuriy-fix added the RTL Right-to-left issue label Jan 23, 2020
@yuriy-fix yuriy-fix assigned yuriy-fix and unassigned yuriy-fix Jan 23, 2020
@yuriy-fix yuriy-fix marked this pull request as ready for review January 27, 2020 09:27
@yuriy-fix yuriy-fix force-pushed the rtl-support branch 3 times, most recently from 4b29ed0 to 3c151b8 Compare January 28, 2020 13:32
Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update one of the dropdown visual tests to have selected item, to test checkmark appearance.

I would rename "Plain template" visual test to "Selected item" and change the label accordingly, because actually that combo-box does not use any <template> at all.

Copy link
Contributor

@DiegoCardoso DiegoCardoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one weird behavior where, if you set to rtl and back, some of the elements where still keeping themselves on rtl mode.

Steps to reproduce:

  1. Open demo (eg "Presentation")
  2. Call document.documentElement.setAttribute('dir','rtl')
  3. Open the dropdown to verify it works
  4. Call document.documentElement.removeAttribute('dir')
  5. Open the dropdown

It will look like this (you can see by the text-field, that it's on ltr mode):
Screenshot 2020-03-16 at 12 40 28

If combo box is never opened, then switching dir back and forth won't cause the issue. It seems to happen only after the overlay has been initialized.

@yuriy-fix
Copy link
Contributor Author

The problem was coming from DirMixin: vaadin/vaadin-element-mixin#34

Copy link
Contributor

@DiegoCardoso DiegoCardoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@web-padawan web-padawan merged commit a35cd90 into master Mar 18, 2020
@web-padawan web-padawan deleted the rtl-support branch March 18, 2020 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RTL Right-to-left issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RTL specific styles
3 participants