-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Problem
We are working with emojis mostly via emoji-mart-vue-fast library.
It includes 826KB (
For NcEmojiPicker it is really necessary, but can be loaded on the first open.
But we also provide functions:
emojiSearchwith 2 roles- Searching emojis by name (actually requires the index)
- Getting recently used emojis
emojiAddRecent- add manually selected emoji to the recently used
emojiSearch also bundles and builds the large emoji index which only makes sense for search, not recently used.
emojiAddRecent uses ID from the emoji index, which indirectly requires the index again.
Proposal
1. Add new async emojiSearch and deprecate existing one
Same as the current emojiSearch, but with lazy fetching and initialising the emoji index
2. Provide getRecentlyEmojis and addRecentlyUsedEmoji functions using only native emoji, no emoji-mart IDs
Allows getting and setting recently used without using the index.
NOTE
We still need an integration with emoji-mart-vue-fast for the Emoji picker's recently used emojis.
A workaround: build a simple map ID -> native emoji for integration. It is 80Kb JSON (0.1 x Emoji Index).