-
Notifications
You must be signed in to change notification settings - Fork 213
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
RTL support #93
Comments
I'm not convinced for the case of per-component text direction. You can have text runs with individual direction, e.g. to display English text on a Hebrew site, but the site has only one text direction. I vote for 1) as it will handle the most common case and is flexible enough to allow having "islands" of text with different direction. |
A token solution is very Angular-like. One can achieve direction switching by wrapping in higher order component and providing different value for the token. That said I vote for the first option as well. |
I do think that the Token approach is flexible enough for the most common scenarios. |
Option 1 sounds like the common case to me. |
@tsvetomir @rusev @rkonstantinov @petyosi thanks for the input, now there is one more question - how do we provide the token for the RTL. I think that there are 3 approaches here:
Or is it now the time for the long awaited common package? |
Case 3 is easy one. However if later we decide to use |
Are we going to share any helpers, e.g. a directive that sets the necessary CSS classes? If so, a mini-package might be justified. |
We are not going to have any CSS that is RTL related. |
A string should be good for starters then. We can add a package later if there's actual need. |
Alright. Thanks for all the input |
is it posibole at this time to generate rtl grid ? |
There is no specific RTL implementation for the Grid atm. |
After the initial research it looks like there are two approaches which we can use to solve the RTL compatibility:
Use an application wide token, similar to the localisation API, that will set the RTL state for the application, and then every single component can detect this state and act accordingly (mainly tweak the kb nav support). However I am not sure how we can act on 'per component' basis and set the
dir
attribute on an individual component, same as in this plain scenario.Use RTL directive that will set the orientation per component. A component that does not have the directive can use the DI to find a parent with such directive and act accordingly. With this approach we can fully emulate the scenario that I linked in the Dojo. The directive can be set on the first component of the hierarchy and act as an application wide token.
A mix of both? Might lead to customer confusion and some side effects.
Any thoughts? Suggestions?
The text was updated successfully, but these errors were encountered: