EmojiPicker stores state in global module-level variables

Oh, by the way, a not very related suggestion:

You are putting out the emoji’s as a huge bunch of PNG image files. When the emoji-picker pop’s up, the browser has to start fetching a huge number of very small PNG files. This affects user experience.

A much better idea is to have one single PNG image with all these sprites. Then use a class to fetch the relevant background-position from CSS. This should make the emoji’s show up much quicker.

So:

Standard emoji’s: put emoji name in class, use CSS to refer to background image and background-position to display it

Custom emoji’s: continue to put emoji name in background-url

1개의 좋아요