wdt-emoji-bundle icon indicating copy to clipboard operation
wdt-emoji-bundle copied to clipboard

Can we combine the two datasets?

Open Redsandro opened this issue 7 years ago • 1 comments

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?


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)

Redsandro avatar Mar 20 '17 13:03 Redsandro

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.

needim avatar Mar 25 '17 08:03 needim