-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
🎄🔨 Force tree shake emojione #4202
🎄🔨 Force tree shake emojione #4202
Conversation
Now that the original PR is merged, can you try rebasing on top of master? |
Rebased. Also added a preload script for |
Thank you @kentcdodds for this library, saves us quite a few bytes! |
Oh, this removed |
Yes, but displaying that (on hover, so only on desktop) means pulling in the entire array, which is big. I would argue that it is not worth it - you can always see the shortcode in the emoji picker. |
So glad that preval helped! Good work here! |
Just chiming in here. Have you look at something like emoji-database over emojione? |
We haven't. The thing is that we already use |
No worries, makes sense! If you guys do use it, and have any feedback, feel free to send it my way! |
This is awesome. Another cool thing about this PR is that it will take less time to evaluate the JS, because if you look at emojione's source you'll see it does a lot of work to build up regexes and object maps. It's a bit of a shame we no longer have the title, but potentially a low cost way to bring it back would be to pre-eval a trie structure. Or as @sorin-davidoi says, we can just accept that it's gone because perhaps it's not really worth it. |
Just FYI people have since expressed interest in the title attribute, I think there is a high demand for it. It doesn't only teach people how to invoke the emojis without access to a unicode keyboard/utility, but it helps recognize emoji that are hard to understand visually. |
the only thing i have interest in is reverting this merge. it makes the style of the emojis inconsistent, and worse, breaks terribly on linux if you do not have a font that correctly supports emojis. |
This PR does not affect how emojis are rendered. The only visual change it brings is that it removes the title attribute, which we will try to bring back due to the feedback received. |
Based on #4189, will rebase as soon as it is merged.
We use babel-plugin-preval to cherry-pick what we need from
emojione
and avoid shipping the entire library to the browsers. The entire library is still imported byemoji-picker
, but it gets included in that bundle, which is only downloaded when the emoji drop-down is expanded.Effect on the
common
bundle:Bundle view - notice how small
emojione_light
is compared toemojione
.cc: @nolanlawson