add recently used emojis panel to emoji picker #283

Merged
floatingghost merged 1 commits from flisk/akkoma-fe:recent-emojis into develop 2023-03-10 19:10:42 +00:00
Contributor

(not intended for merging yet, just submitting this for preliminary review and discussion)

this patch adds a tab with recently used emojis to the emoji picker: https://akko.lain.gay/notice/ASoGCtyoiXbYPJjqpk

there's a couple of things i'm still trying to work out not totally happy with and i'd appreciate any feedback on them:

  • the recentEmojis getter is called very frequently and has to do a possibly somewhat expensive lookup of emoji objects by their displayName each time, which i'm not sure is ideal
  • emoji reactions on posts added through the picker are picked up by the recentEmojis module, but clicks on existing emoji reactions are not, because addReaction in react_button.js only currently receives the replacement and not the full emoji object (if there even is one wherever that method is called from) this works now and does the same stupid full search of all emojis by their name which i guess is less bad because this only happens when you hit a reaction emoji button that already existed
~~(not intended for merging yet, just submitting this for preliminary review and discussion)~~ this patch adds a tab with recently used emojis to the emoji picker: https://akko.lain.gay/notice/ASoGCtyoiXbYPJjqpk there's a couple of things i'm ~~still trying to work out~~ not totally happy with and i'd appreciate any feedback on them: * the recentEmojis getter is called very frequently and has to do a possibly somewhat expensive lookup of emoji objects by their `displayName` each time, which i'm not sure is ideal * ~~emoji reactions on posts added through the picker are picked up by the recentEmojis module, but clicks on existing emoji reactions are not, because `addReaction` in `react_button.js` only currently receives the replacement and not the full emoji object (if there even is one wherever that method is called from)~~ this works now and does the same stupid full search of all emojis by their name which i guess is less bad because this only happens when you hit a reaction emoji button that already existed
flisk force-pushed recent-emojis from 3484f9255e to 27a4455c5c 2023-02-27 20:13:26 +00:00 Compare
flisk changed title from --wip-- show recently used emojis in emoji picker to add recently used emojis panel to emoji picker 2023-02-27 20:13:58 +00:00
Author
Contributor

made reaction emoji clicks add emojis to the panel as well. pending feedback i'm done with this for now

made reaction emoji clicks add emojis to the panel as well. pending feedback i'm done with this for now

an array search shouldn't be too expensive, even on larger emoji sets

this should be good, and it works as described

i tested it against an instance with quite a few emoji and it performed well

thanks a lot!

an array search shouldn't be too expensive, even on larger emoji sets this should be good, and it works as described i tested it against an instance with quite a few emoji and it performed well thanks a lot!
floatingghost merged commit 6fdef479d0 into develop 2023-03-10 19:10:42 +00:00
floatingghost deleted branch recent-emojis 2023-03-10 19:10:42 +00:00
Sign in to join this conversation.
No description provided.