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

Drawer Panel appears on wrong side when using RTL document direction #47

Closed
blasten opened this issue Jan 28, 2016 · 6 comments
Closed

Comments

@blasten
Copy link
Contributor

blasten commented Jan 28, 2016

From PolymerElements/paper-drawer-panel#101

When using the paper-drawer-panel in a top level body tag with dir="rtl", the drawer panel appears on the same side as when dir="ltr". We'd expect the panel to switch sides.

@keanulee
Copy link
Contributor

keanulee commented Feb 4, 2016

From what I found, RTL interfaces do indeed flip the layout of the page (e.g. navigation drawers we're accustomed to be on the left on the screen are on the right in RTL). Usually this requires going into the app's settings and changing to a RTL language (i.e. just setting <html dir="rtl"> won't auto-magically work). However, the meaning of "left" and "right" does NOT change in RTL interfaces (e.g. text-align: left, margin-left: 5px, and left: 0 still have the same meaning). Therefore, I don't think we should flip the meaning of the <app-drawer>.position property based on RTL document direction.

WDYT @blasten @frankiefu ?

@frankiefu
Copy link
Contributor

I agree that we shouldn't auto flip the meaning of the position property based on rtl. It's also tricky to support that since it means app-drawer needs to listen for dir attribute changes on the top level element. I think is fine that the user would need to manually change the app-drawer's position property for RTL interface.

@keanulee
Copy link
Contributor

After some research, it seems that the best way to fix this is for elements/properties that should toggle direction based on locale, it's best to avoid terms like "left" and "right" altogether. Instead, we should change the position property to be "start" and "end" (ref http://android-developers.blogspot.com/2013/03/native-rtl-support-in-android-42.html). We will be doing this in app-layout elements.

For the existing paper-elements though (e.g. for PolymerElements/paper-drawer-panel#101), maybe we should just flip the meaning of "left/right", like in PolymerElements/iron-dropdown#42, to avoid breaking API changes.

cc @blasten @frankiefu

@frankiefu
Copy link
Contributor

👍

@blasten
Copy link
Contributor Author

blasten commented Feb 19, 2016

@keanulee that makes total sense.

@frankiefu
Copy link
Contributor

fixed in #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants