• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Future fix [RTL AdminCP] Few fields that should be in ltr direction

rellect

Well-known member
#1
There are few fields that should be in ltr direction for convenience, as these fields only accepts English letters.

Editing a template: the template name field.
Editing a template modification: the template name and modification key fields.
Editing a phrase: the phrase title field.
Searching a phrase: the phrase title field.
Editing user group: the "custom CSS class name" for user banner styling.
Creating an addon: the addon id and the url fields. As well class::method fields.
When installing or upgrading an addon: the field to write a path ("Install from file on server").
Display Criteria (for notices for example): All the Page Information fields (Navigation Tab, controller, view class, template)
Editing Admin Navigation: the Admin Navigation ID field
Creating property style: the Property Name field

Possibly there are more, but these the main ones that I found.
 

Mike

XenForo developer
Staff member
#2
So I understand the reasoning here and we have made some changes for this elsewhere, but equally, I'm wondering about something.

Adding dir=ltr to these would flip the positioning of the text in the field and create a significant jump when reading down. Given that they should still display correctly without that (due to the bidi algorithms), what's the advantage to changing these to dir=ltr? (Is there a difference compared to adding text-align: right?) The field values jumping across the screen seems like it'd be a worse experience.

Edit: I do see some cursor differences and shifts when dealing with "neutral" characters between dir=rtl and dir=ltr+text-align: right.
 

rellect

Well-known member
#3
Generally it works fine, but there are some exceptions. For example:
1_user is displayed as user_1
.primary is displayed as primary.
 

Mike

XenForo developer
Staff member
#4
I think I'm going to save this for a future version, mostly because there are so many places like this and I think there's likely to be a lot of inconsistency here with only a few of the areas being changed. I suspect there are a lot of places where this could apply.

I don't want to just dir=ltr most of these as it creates an inconsistent appearance with the position of the text, so I think text-align: right is needed. However, in text areas, we wouldn't be able to do that because the code wouldn't display as expected. That does create a bit of an inconsistency, but there isn't really anyway around that in this particular case.