-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emoji selectors #31
Comments
This would be interesting, especially for applications that let users pick emoji. A PR would be very welcome 😁 |
Yes that's why I'd need it. Okay, so I'll start working on it. |
I just checked out the code and this will be a lot of repetitive boring work. Does anyone have an idea to do this without a simple manual made mapping table? If not, I'll do the manual work 😭 |
@emanuelbuholzer maybe you can find a list that groups emoji in categories, e.g. on a website - then you could automatically read this into a |
After some more, I stillt haven't found a way of grouping them together automatiaclly. I'll put this into the list of "things I'll do at a suitable time in the future". I'll put all work into a branch - if anyone want's to help |
@omnidan, I actually sorted the emoji array. And succeeded. This is the sorted array, like: const emoji = require('node-emoji')
// array transfer
var result = [];
for (var i in emoji.emoji)
result.push(emoji.emoji[i])
// sort
result = result.sort();
// People category 1156 to 1236 (Namely 80 pieces)
result = result.slice(1156, 1236)
// end
result == ["😀", "😁", "😂", "😃", "😄", "😅", "😆", "😆", "😇", "😈", "😉", "😊", "😋", "😌", "😍", "😎", "😏", "😐", "😑", "😒", "😓", "😔", "😕", "😖", "😗", "😘", "😙", "😚", "😛", "😜", "😝", "😞", "😟", "😠", "😡", "😢", "😣", "😤", "😥", "😦", "😧", "😨", "😩", "😪", "😫", "😬", "😭", "😮", "😯", "😰", "😱", "😲", "😳", "😴", "😵", "😶", "😷", "😸", "😹", "😺", "😻", "😼", "😽", "😾", "😿", "🙀", "🙁", "🙂", "🙃", "🙄", "🙅", "🙆", "🙇", "🙈", "🙉", "🙊", "🙋", "🙌", "🙍", "🙎"] |
Thanks, that makes the whole process a lot easier. I'll work on category support in the next few days. |
If everybody agrees I'll implement categories according to recommended sort order, which is the default ordering of emoji characters from Unicode CLDR data. For more information about the categories visit: http://unicode.org/emoji/charts/emoji-ordering.html |
@emanuelbuholzer Looks good to me 👍 |
@emanuelbuholzer looks good 👍 would be nice if you could implement category support and submit a PR 😁 |
I started working on category support. If I'd implement it according to the source above (http://unicode.org/emoji/charts/emoji-ordering.html), the technique for getting emojis showed by @abdurrahmanekr would not work. It looks like the ordering isn't the same as the ordering within the Unicode CLDR data, furthermore it looks like some emojis are missing. As an alternative I could implement category support like within most emoji keyboards/selectors or we could refactor the codebase, so that it is close to the Unicode CLDR data. What do you all think? |
I think this file can be useful. As it seems to me that they've already categorized based on unicode. In that case, we can simply update the build script, and leave some credit. https://github.com/OneSignal/emoji-picker/blob/master/lib/js/config.js#L851 |
Some icons are not showing, why? |
Do you have an example @Gotemperor? |
I am using localhost on my linux machine, so I can not gice you an example, but I see also missing icons when I open the github repository examples, they look like that |
hmm, strange, they look ok here, but not ok on my localhost, can it be related to my localhost, to linux, or to missing font files? I used npm to install |
@Gotemperor github defines fallback images for unsupported emoji. it seems like your platform does not support the latest emoji set. I tried running the example code on macOS 10.12.6 and they all show up fine for me (in the console). |
Hey guys, I noticed this is an old post. Did this feature get considered on any release? @emanuelbuholzer is this something you are still working on? |
@GaryTowers I'm pretty sure |
@GaryTowers I wrote a script to parse a json file with emojis and their respective categories. I uploaded the script and the json output to wdfinch/emojis-json-formatted. In the json folder, you'll find a file containing a bunch of emojis organized by category and sub-category. Additionally, you'll find a file that contains a single large json object in a compatible format with this library. Let me know if this works for you. |
It would be very useful if the API could provide selector functions which allow the user to get all emojis and these of a given category. What do you think?
I'd work on that if everybody agrees 😃
The text was updated successfully, but these errors were encountered: