LucasGGamerM / moshidon

Better modification of the official Mastodon for Android app
https://LucasGGamerM.github.io/moshidon/
GNU General Public License v3.0
469 stars 23 forks source link

Automatically Add Zero-Width Space (ZWSP) Between Emojos #382

Open Drewdansha opened 2 months ago

Drewdansha commented 2 months ago

When typing the codes for two instance-specific emojis together in the compose box, i.e. :emoji_1::emoji_2:, Moshidon does not render either emoji but instead just the emoji-code string. Adding a space between the text descriptions ends up rendering a gap between the two emojis instead of making them contiguous as desired.

If one does this in the official Mastodon client or web UI, it appears that Mastodon automatically appends a zero-width space (ZWSP) between the two emojis resulting in output that effectively looks like this and shows the two emoji side by side with no space between: :emoji_1:<0x200b>:emoji_1:. See screenshots below.

MANUAL WORKAROUND:

A workaround to this is to go to https://zerowidthspace.me/, copy the ZWSP to the clipboard and then paste it into the compose box immediately after typing the first closing : . Moshidon then renders the emojis as desired with no gaps.

FEATURE REQUEST:

The request is that a ZWSP be automatically inserted between two successive colons (::) - or perhaps after any single trailing colon - in the toot rendering engine so that typing something like :emoji_1::emoji_2: will have the desired effect of having no gaps between emoji and the user doesn't have to go to the rigamarole of finding and pasting one in themselves.

Here are some screenshots of a Mastodon thread between myself and a Mastodon Web UI user that illustrates the issue. These were taken from Tuba, which has the same rendering problem, and exhibits exactly the same behavior. I used it because that's the only client I have installed on my Linux machine where I'm composing this feature request.

Emoji_space1

Emoji_space2

LucasGGamerM commented 2 months ago

I see. So the official app does this?

Drewdansha commented 2 months ago

Now that I have taken a look at it with fresh eyes (and some sleep), I see that I was mistaken about the official app inserting the ZWSP. It does NOT appear to do this. I retested it in the official app this morning after closing down all apps and web browsers, and the official app exhibits the same behavior as all the rest of the apps.

With all the switching back and forth between clients and web ui and testing via "Open with...", I seem to have gotten confused. My apologies!

All the apps correctly display the ZWSP, but it appears that only the Mastodon Web UI automatically inserts the ZWSP. So I guess that this is a feature request for something that the official app has not yet implemented.

Again, my apologies for any confusion that this has caused you.