Emoji Support

So, with a little inspiration from another pull-request (thanks @abhineet08), I’ve managed to nail it down a bit.
You can log in here http://188.237.61.218:3000 , to test it, with

user= alice
pass= evankorth

(please don’t kill my router, I have a small bandwidth. Also, the server will be stopped periodically, I do all sorts of stuff here). I can guarantee it’s existence only tonight, and maybe tomorrow.

At the moment we do not have a UTF-8 char picker, but you can copy them from here:
http://apps.timwhitlock.info/emoji/tables/unicode

Copy-Paste from an existing emoji from the page also works, surprisingly - those guy from twitter did some weird magic, kudos to them.

The changes are here, they are really small, ~10 lines of code
https://github.com/dimaursu/diaspora/tree/twemoji

Oh nice, the diaspora* logo lights up when the cursor hovers on it!

Hmm, not sure about the single post view, though. I really like the emojis, but they look too big there. Same problem on the profile page.

Emoji images don’t appear in Conversations.

Emojis can be recognized as hashtags. For example, “#:grapes:” leads to a routing error because it is recognized as the “%3Cimg%20class=%22emoji%22%20draggable=%22false%22%20alt=%22%F0%9F%8D%87%22%20src=%22/assets/twemoji/36x36/1f347.png%22%3E” tag.

Sorry, but I messed up your test account’s profile for testing purposes.

Currently, emojis are not replaced for names nor in gender (in the profile page). They are in Bio and Location, but are too big. Notifications should be tested too.

single post view

That double-width separation in Stream page’s top bar is still not fixed yet?

No replacement in polls yet.

No replacement in Aspects yet.

Unicode characters are still not supported for the name displayed in the top left of the Stream page.

@rasmusfuhse Actually, I think screenreaders would not have any problem since the characters are not changed in the HTML text. Someone should test it out though (and test out if in normal cases, screenreaders actually recognize emoji characters.

So yes, that’s why they can be freely copy-pasted @dumitruursu. It’s a visual replacement but not an actual replacement.

Also, I don’t think we should care about input methods yet Dumitru. I personally prefer manually going to an external website like Wikipedia or using the native smartphone keyboard when using the mobile version of diaspora*.

I think emojis fit very well with the current design. They kind of fit with any design.

Actually the “magic” they used is quite simple: they put the UTF8 char in the ‘alt’ atribute of img - that is the standart, when you hit control+C on a image with an alt atribute, you get the atribute value. So characters are replace with images, but they do it in “standard compliant” way. Screen readers should also be fine because of this, they do read ‘alt’ tags.

@gp - I’ve scaled down the images a bit. I’ve made them bigger on purpose, to show off the emojis. To make other parts of diaspora* work with emoji, I will need help, I’m not familiar with Backbone.

@dumitruursu multumesc, frate, arata extra! :slight_smile:

Thanks for that, I’d just have two questions:

  1. Is it possible to click on Preview and see the outcome (the blunt emoji representation) to check if you’ve written it rightly?

  2. is it possible to integrate the set of emojis on a table so that one can just pick up the icon from there and insert it easily in the post?

:clap: #thankyou

  1. It’s possible, though I’m not sure how at the moment. I’m reading some backbone documentation right now.
  2. I think this is a start, here https://github.com/tomer/characterPicker, but it’s definitely very brute right now, it would need a lot of tweaking. Maybe a custom picker would be required, I’m not sure.

I think we can make emoji work with copy-paste in most parts of diaspora* by the next version, and then focusing on improvements, like pickers, search through emoji, and so on.

But I’m not the one making the schedule, and there are other parts of diaspora* that cry for attention.

I think the emojis really are too big. They should be the same size as the Unicode characters they replace.

Sooooo this would be frontend side, right? Not conversions done during posting? Because if this cannot be made opt-out as a user then it’s a strong no from me… If it can be made opt-out, I’m fine to change my no to abstain. Fine if someone wants to see emojis, but I don’t :wink:

@jasonrobinson I guess a switch could be put in Settings.

I had a discussion with Rei Kagetsuki, the guy behind the Phantom Open Emoji. He did continue the project, which is now called emojidex, https://github.com/emojidex , and he uses a dual license model. We should check it out, maybe we can have a different style emojis after all.

@dumitruursu That’s more choice, good! Though I don’t like it.

@gp did you really check the emojidex website? The emoticons look very nice, more nice than what we currently have. I think @dumitruursu made a good point, since Rei Kagetsuki uses a dual license model.

@camillevergara I have, and I really don’t like them. A lot of them are too detailed to be recognizable at font size. Take this one for example, the three last sizes are very hard to see, yet they are the three sizes we’re aiming for diaspora*.

I suggest that we make a vote after the current proposal, if emojis are accepted.

I think the Telegram Emojis would be nice!

@ca1 These emoji characters?

I think they’re copyrighted by Apple, so it would be illegal for us to use them.

@luminocity life is bad, isn’t it? :slight_smile:

@luminocity The argument about http traffic is overrated - those images have a tiny size, 0.60 KB . Unless all your posts are packed with different emoji, I fail to see how is that an issue. Page load time doesn’t suffer - the images are replace with JS, it happens after the page was loaded, and “document.ready” has fired. And how will native support for emoji break? That’s just spreading FUD, imo.

One thing that haven’t been mentioned yet is the consistency with the emojis in the chat :confused:

I think this will be a nice feature for the future. But now there are so many other more important things to do.

The Diaspora Forum has this cool option:

Not sure how difficult if would be to code something like this in to Diaspora?

Everyone is a winner then :slight_smile:

@rich1 Apple and Google Hangouts emojis are copyrighted though.

I can see that the current proposal is essentially a 50-50, no matter what the final outcome is (if it comes up with 17 to 15 for example, it will just have been a matter of timing). It shows that clearly image emojis should be implemented, but clearly there should be an option to disable them… or to enable them.

What I see is that the essential opposition to the proposal is the fact that individual diaspora* users don’t like image emojis and don’t want to see them in their Stream. Therefore, I don’t think there would be any problem in implementing one or multiple image libraries as an opt-out or opt-in feature, as long as the ability to disable the feature gets implemented at the same time as the implementation itself.

That’s a lot of words. Sorry.

Now, I think we should discuss about the following subjects:

  1. Should emojis be an opt-in or an opt-out feature?
  2. Should multiple libraries be offered as choice?
  3. Which libraries should be offered?

@rich1 That would be the best implementation I’ve ever seen. Not only does it offer emojis, not only does it offer to disable them, but it also offers multiple libraries. Could some code from that forum software be imported into diaspora*? I have no idea how development works.