tshenry
(Taylor)
January 23, 2025, 4:30am
13
This definitely would need an update following:
main ← jjaffeux:unify-emoji-pickers
merged 10:41AM - 08 Jan 25 UTC
The chat emoji picker is renamed emoji-picker, and the old emoji-picker is remov… ed.
This commit doesn't attempt to fully rework a new emoji-picker but instead tries to migrate everything to one picker (the chat one) and add small changes.
Other notable changes:
- all the favorite emojis code has been mixed into one service which is able to store one state per context, favorites emojis will be stored for all topics, and for each chat channel. Meaning that if you always use a specific emoji in a channel, it will only show as favorite emoji in this channel.
- a lot of static code has been removed which should improve initial load perf of discourse. Initially this code was around to improve the performance of the emoji picker rendering.
- the emojis are now stored, once the full list has been loaded, if you close and reopen the picker it won't have to load them again.
List of components:
- `<EmojiPicker />` will render a button which will open a dropdown
- `<EmojiPickerContent />` represents the content of the dropdown alone, it's useful when you want to render a picker from an action which is not the default picker button
- `<EmojiPickerDetached />` just a simple wrapper over `<EmojiPickerContent />` to make it easier to use it with `this.menu.show(...)`
Unfortunately, I do not have the bandwidth to update it at this time. If someone wants to give it a shot, I would be more than happy to take a look at a PR.
For now, I’m afraid I will need to mark it as broken
Keep in mind that there is the emoji deny list site setting. It’s tedious if you want to remove tons of emoji, but it is an option.
2 Likes