Continuing the discussion from What does the support mixed text direction setting do?:
Should we deprecate this setting, composer button and add dir="auto" by default in our text areas? IE is not a blocker anymore.
The discussion revolves around deprecating the “support mixed text direction” setting in favor of using dir="auto" by default. Falco suggests removing the setting and adding dir="auto" to text areas, as IE is no longer a concern. However, david points out that this setting affects various elements, such as paragraphs, quotes, and topic titles.
After discussing the implications, david creates a pull request to update the setting to use dir="auto" instead of a regex. He notes that setting dir="auto" on a textarea might not be useful for posts containing both RTL and LTR languages, and suggests keeping the composer button to switch directions while editing.
Osama agrees with david, finding the button useful for typing posts with mixed languages. The pull request is eventually merged by david, who invites feedback on the change.
Continuing the discussion from What does the support mixed text direction setting do?:
Should we deprecate this setting, composer button and add dir="auto" by default in our text areas? IE is not a blocker anymore.
This setting also affects non-textarea things. e.g. it is used to apply dir= to paragraphs/quotes in posts:
And topic titles:
and more.
Can we use dir="auto" for all these things now? ![]()
Makes sense, users need this everywhere they input text:
I took a stab at updating our support_mixed_text_direction setting to lean on dir="auto" instead of using a regex to parse all user input at render-time:
https://github.com/discourse/discourse/pull/26129
I think we’ll need to keep this. Setting dir="auto" on a textarea will use a heuristic to decide the direction of the entire textarea. That doesn’t sound too useful if you’re writing a post which contains a combination of rtl and ltr languages. So I think the button is required for you to switch back & forth while editing?
In cooked posts, the dir="auto" can be applied per-paragraph, which solves that problem.
Would be great if some readers / writers of RTL languages can weigh in on that, and perhaps take a look at the PR. (cc @osama - git suggests you have done a lot of work on our RTL logic)
Yes, exactly, the button is very useful when you’re typing a post that mixes RTL and LTR languages.
Your PR LGTM @david ![]()
This is now merged. Please let us know if you have any feedback
This topic was automatically closed after 171 days. New replies are no longer allowed.