Skip to content

RTL documentation missing #4387

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

Closed
HarelM opened this issue May 4, 2017 · 10 comments · Fixed by #5474
Closed

RTL documentation missing #4387

HarelM opened this issue May 4, 2017 · 10 comments · Fixed by #5474
Labels
docs This issue is related to documentation feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue

Comments

@HarelM
Copy link

HarelM commented May 4, 2017

Breaking of #4367:

proposal:

RTL support exists but I could find how to use it in the documentation, I found an issue, linked to a changeset leading to the relevant code.

@devversion
Copy link
Member

I think a guide in the guides/ folder would be enough. cc. @EladBezalel

@EladBezalel
Copy link
Member

@HarelM @devversion well, i think the basic assumption is that it works out of the box, we can use a guide that says use dir="rtl" on html/body and automatically all the components will support it

@HarelM
Copy link
Author

HarelM commented May 7, 2017

True, but material 2 also supports dynamic content direction change using [dir]=... which is a great feature that IMHO deserves a guide/page/paragraph somewhere.

@devversion
Copy link
Member

devversion commented May 7, 2017

Yeah I agree that we should briefly mention that RTL support is there & how you could use it.

Also important to mention is that RTL mode doesn't work when specifying the direction from CSS.

@kara kara added Accessibility This issue is related to accessibility (a11y) docs This issue is related to documentation help wanted The team would appreciate a PR from the community to address this issue and removed Accessibility This issue is related to accessibility (a11y) labels May 9, 2017
@jelbourn jelbourn added the feature This issue represents a new feature or feature request rather than a bug or bug fix label Jun 8, 2017
@parker-mike
Copy link

parker-mike commented Jun 9, 2017

@EladBezalel @devversion Well, I tried to add dir="rtl" on html and most of the components appear as expected, but when I opened a dialog it still had dir="ltr" on the cdk-overlay-pane, which means that unfortunately not all the components support it. It seems that we still have to manually set the MdDialogConfig.direction which is undocumented, and defaults to "ltr", I think that it should be possible not to specify the direction and to get whatever is specified on the near parent, which is probably would be html/body. Also I believe that there should be an option to dynamically change the direction of the whole page(switching dir on html/body), and not only of a part of the DOM using [dir]=....

@HarelM
Copy link
Author

HarelM commented Jun 9, 2017

I use a variable on a service so that I can change it in one place to change all the components.
I manually add direction to all dialogs to support this, since they are not part if the "main" DOM it didn't feel weird to me.

@parker-mike
Copy link

Then, at least, it has to be well documented, currently there is no a single word about this property on the API reference page,

@EladBezalel
Copy link
Member

When #4044 will get in it would support html/body, I agree we should address RTL on the docs.. next thing to do!

@parker-mike
Copy link

parker-mike commented Jun 10, 2017

@jelbourn By the way, as per W3 https://www.w3.org/International/tutorials/bidi-xhtml/

Add a dir attribute to the html tag to set the default base direction of your page if it is right-to-left. Use the dir attribute on block elements within the page only where you need to change the base direction.

So in my, maybe not so humble, opinion, MdDialogConfig.direction, as well as the overlayState.direction, should not have a default value...

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs This issue is related to documentation feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants