A discussion is ongoing about improving the Chinese user experience on Discourse forums. The issue is that emojis from the emoji picker appear without a space before them, causing confusion. snakeninny brought this to the attention of the Discourse team and codinghorror asked for input from joffreyjaffeux.
Sam mentioned that a partial fix was implemented, but a more comprehensive solution is needed. Schungx suggested always putting a space before the emoji code when selected from the picker, unless the preceding character is already a space.
Allowing emojis to be rendered without punctuation, but this would be computationally expensive.
Fixing autocomplete to behave consistently with the engine’s interpretation.
Inserting a space prior to an emoji if needed after autocomplete.
Adding a special mode to Markdown that requires no punctuation between emojis.
Sam suggests combining solutions 2 and 4. Tgxworld and misaka4e21 agree that a locale-based site setting would be the best approach. Misaka4e21 also points out two problems with the current implementation: the lack of a space before the first colon in emojis chosen from the picker, and the inconsistent behavior of auto-completion.
A solution is being implemented in PR #7429, which will insert a space before an emoji if there isn’t any, as confirmed by venarius.
I have been using Discourse for 4 years and love the modern design and quick update. Thank you!
Recently I have noticed some issues in my forum, that in China, we seldom use spaces like you do in English, so basically every emoji from emoji picker is screwed like this:
呵呵:thinking:
Which is annoying and confuses most Chinese users. Can you think of a way to improve the Chinese user experience?
(a) If an emoji are chosen from the emoji picker, it will lack for a space before the first colon :, not only in Chinese posts, but in English posts as well. Users will get a not rendered a:smile: (a:smile:) if they input a and then select (:smile:) from the emoji picker.
(b) A colon : after a Latin character won’t cause auto-completion, yet a colon after a CJK Unihan character will. It could be solved exactly by (2).
To solve (a), (3) should be implemented in the emoji picker, not / not just in auto-completion.
(1) and (4) are in different logic.
To check if a character is in Chinese or not, we could try:
Though I don’t know whether the regular expression above will provide higher performance.
I remember going down the regular expression route in the past but that means we carry this giant regexp everywhere we go. For chinese forums, we can just have a site setting that does not require a space before : to render emojis.