Skip to content

Commit

Permalink
v0.2.0 scroll bug fix, scrolllock, facebook, messenger emojiset suppo…
Browse files Browse the repository at this point in the history
…rt, open on colon, better amd support, ability to disable specific categories, IE event fix, some performance improvements, snowman typo
  • Loading branch information
needim committed Mar 31, 2017
1 parent a6fa979 commit 2b289b5
Show file tree
Hide file tree
Showing 16 changed files with 43,008 additions and 196 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# wdt-emoji-bundle

Slack like emoji selector with apple/ios, twitter/twemoji, google, emojione and custom emoji support. I :heart: opensource.
Slack like emoji selector with apple/ios, twitter/twemoji, google, emojione, facebook, messenger and custom emoji support. I :heart: opensource.

Thanks to Cal Henderson @iamcal.

Expand Down Expand Up @@ -30,6 +30,8 @@ wdtEmojiBundle.defaults.emojiSheets.apple = './sheet_apple.png'; // defau
wdtEmojiBundle.defaults.emojiSheets.google = './sheet_google.png'; // default /sheets/sheet_google_64.png
wdtEmojiBundle.defaults.emojiSheets.twitter = './sheet_twitter.png'; // default /sheets/sheet_twitter_64.png
wdtEmojiBundle.defaults.emojiSheets.emojione = './sheet_emojione.png'; // default /sheets/sheet_emojione_64.png
wdtEmojiBundle.defaults.emojiSheets.facebook = './sheet_facebook.png'; // default /sheets/sheet_facebook_64.png
wdtEmojiBundle.defaults.emojiSheets.messenger = './sheet_messenger.png'; // default /sheets/sheet_messenger_64.png
```

===
Expand Down Expand Up @@ -95,16 +97,15 @@ Auto open the emoji picker when the user types the colon key `:` in the input:

# TODO:

- Documentation :)
- Better documentation :)
- Responsive Improvements.
- Better popup positioning, repositioning (window.resize).
- Better popup positioning.
- Open on colon support for contenteditables.
- Frequently used emoji list with localstorage and/or API.
- Provide more events; open, close, pickeropen, pickerclose etc.
- Custom emoji support.
- Skin color support for apple icons.
- Custom scrollbar.
- Better contenteditable support, WYSIWYG?
- Performance improvements.
- Check browser compatibilities.

---
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"authors": [
"Nedim Arabacı"
],
"description": "Slack like emoji selector with apple, twitter, google, emojione and custom emoji support.",
"description": "Slack like emoji selector with apple, twitter, google, emojion, facebook, messenger and custom emoji support.",
"dependencies": {
"js-emoji": "^3.1.1"
}
Expand Down
62 changes: 62 additions & 0 deletions build/build.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
$debug = TRUE;
if ($debug) header('Content-Type: application/json');

$dir = dirname(__FILE__);
$in = file_get_contents($dir . '/emoji_pretty.json');
$d = json_decode($in, TRUE);


#
# build the catalog
#

$out = array();

foreach ($d as $row)
{
if (!isset($out[$row['category']]))
$out[$row['category']] = array();

$out[$row['category']][] = array(
'has_img_apple' => $row['has_img_apple'],
'has_img_google' => $row['has_img_google'],
'has_img_twitter' => $row['has_img_twitter'],
'has_img_emojione' => $row['has_img_emojione'],
'has_img_facebook' => $row['has_img_facebook'],
'has_img_messenger' => $row['has_img_messenger'],

'name' => $row['name'],
'short_name' => $row['short_name'],
'short_names' => $row['short_names'],
'sort_order' => $row['sort_order']
);
}

foreach ($out as &$category) {
sortArrayByKey($category, 'sort_order');
}

function sortArrayByKey(&$array, $key)
{
usort($array, function ($a, $b) use (&$key, &$asc)
{
if ($a[$key] == $b[$key])
{
return 0;
}
return ($a[$key] < $b[$key]) ? -1 : 1;
});
}

$encoded = json_encode($out);

$fp = fopen($dir . '/lightweight.json', 'w');
fwrite($fp, $encoded);
fclose($fp);

if ($debug)
{
echo $encoded;
}
Loading

0 comments on commit 2b289b5

Please sign in to comment.