wdt-emoji-bundle
wdt-emoji-bundle copied to clipboard
Can we combine the two datasets?
We have a long string of emoji data in emoji.min.js
and again but different in defaults.emojiData
. Can we have just one? Where does the latter come from? Did you create the latter one yourself, or could it be a dependency?
-
emoji.min.js
->js-emoji
-
defaults.emojiData
- Looks like emoji-data/emoji_pretty.json but with added categories.
I think you could deprecate the dependency on js-emoji
and use emojiData
to define images in the layout.
E.g. in stead of
self.emoji.replace_colons(':smile:');
use separate function for something like
(self.emojiData.filter(function(el){el.short_name == 'smile'})[0] || {}).image;
it returns the image (or undefined
)
Yep, you are right. I created a new object because I wanted performance gain for the loops. (mainly for this function: wdtEmojiBundle.fillPickerPopup())
It would be nice to have just one object, maybe we can find a better way. And this bundle uses sheets instead of single images.