nextcloud-libraries / nextcloud-libraries/nextcloud-vue
Provide light-weight emoji functions
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 246
- Forks
- 99
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 103
Description
Problem
We are working with emojis mostly via emoji-mart-vue-fast library.
It includes 826KB (‼️) emoji JSON file which is then used in slow Emoji Index init (up to 1 sec blocking time ‼️).
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current emojiSearch and emojiAddRecent entry points and the NcEmojiPicker integration with emoji-mart-vue-fast. Review how the emoji index is loaded and how recently used emojis are represented; done means lazy search initialization, native-emoji recent-use functions, and picker integration without eagerly loading the full index.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100