RTL Support: Is There A Right Way Left?
After reading about the RTL support in 4.2-beta release, I can't express how excited I was so I thought if I may put my two cents in, I would say something like this:
When it comes to RTL, exchanging right and left properties (like margin, padding and float etc.) is not always intended behavior (and I know this because I am struggling with bi-directional web applications for last 7+ years.) For example, a simple multi-lingual web page which has a top navigation bar and on left side a sidebar for sub navigation may still like to keep the page layout the same (i.e., sidebar on left side) except the text flow, list item flow etc. flipped according to the direction of the language chosen.
There is a new pattern emerging for such behaviors which I think should be anticipated in this early stage of RTL support in ExtJS. According to this new pattern, "Right" and "Left" should not change their meaning wrongly as a workaround for proper layout. Instead "Start" and "End" propertied should be used to properly declare the layout. This means "Start" is a synonym of "Left" in LTR languages while it is synonym of "Right" in RTL language context and similarly the "End" property. For backward compatibility, these start and end properties can be translated at a pre-compilation stage accordingly.
This behavior can be observed in;
Since this is only a concern for RTL developers (and RTL support is yet in beta phase), who can learn how to code their application properly to make it bi-directional hence introducing this pattern should not be an issue for mainstream ExtJS developers while providing more flexibility in layout. Also, if one feels that flipping the direction is almost always the case then as a shorthand there can be configurations in the RTL package to express if one wants right and left property flipping behavior or honoring the semantics of right, left, start and end properties.