[BUG] Space is added before and after emojis

Started by WillLem, September 21, 2024, 04:20:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

When adding an emoji by clicking its button, a single space is added before and after the emoji, like this:

[space]emoji[space]

Whilst not necessarily a bug, it's definitely preferable for space not to be auto-added (or for the behaviour to be optional, if possible).

namida

I'm happy to accept a fix if someone writes one (and the community doesn't object to one being put into place), but this is far too minor for me to bother fixing myself.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

I'm happy to fix this, but can someone point me to where this can be done? Do I need an IDE or can it be done from the site itself? Where can I find the code? Do I need to use Chrome's "inspect" feature?

If someone can show me where the code is and how to apply changes, I'll happily figure out the rest myself.

Simon

We had this (spaceless insertion of smileys) on SMF 2.0 (before September 2024), yes, and it's a tradeoff: With spaceless insertion, you get exactly what you want if you know what you're doing. You don't have to delete the extra spaces that the forum gave you in addition to the spaces you put yourself.

When you don't know what you're doing, and you don't put the spaces manually, you'll get the smiley code smashed into surrounding:clam::clam::clam:text. The forum interprets concatenated smileys, e.g., :8()::8(): becomes :8()::8():, as long as the whole sequence starts and ends with a space. The forum doesn't interpret smileys concatenated to regular text. The spaceful insertion, what we have now in October 2024, at least guarantees that every newbie gets his smileys every time.

I'm not sold on either way. I'm open to letting myself be convinced that spaceless insertion is better. It comes at the cost of wrong:8(): insertions from users who don't put the space.

-- Simon

Silken Healer

I find it really intesting how sometimes there's an issue or a choice, and then it turns out there's some deeper reason behind it. E.g. this, the 80 character psuedo-word wrap in Lix documentation, etc. I never would've thought about it this deeply. I just think "oh, the forum now adds spaces between my smileys, that's annoying." I'm grateful we have Simon to share his wisdom.

Anyway, I really hate the automatic spaces and find it really frustrating. If it's possible to get rid of it then I'd absolutley support it.

:8(): :8(): :8(): :8(): :8(): :8():

Simon

I agree that the spaces are distracting. I'd rather have the spaceless insertion back, too.

In SMF 2.0, we had to hack it in, and it made the site harder to update as usual with any such hack. That's another cost to spaceless insertion. I'll see if more people are bothered by the spaces.

-- Simon

WillLem

Quote from: Simon on October 30, 2024, 09:35:29 PMI'll see if more people are bothered by the spaces.

I'm glad this is being considered, but I'd be surprised if anybody else takes the time to reply to this (whatever their preference may be). Maybe poll it?