FIX: emoji-picker minor improvements (#30645)

- uses emojiSearch to ensure we have the same result than autocomplete when filtering emojis (for example search aliases were not working correctly because of this)
- reset the visible sections when clearing filter to ensure we are not attempting to display all the emojis at once which would be slow
- prevents flashing of the full emoji list before showing filtered results
- correctly reset recent favorites and only show them when used
This commit is contained in:
Joffrey JAFFEUX
2025-01-08 22:10:50 +01:00
committed by GitHub
parent 6811296b24
commit 40f7941f2b
6 changed files with 134 additions and 134 deletions

View File

@ -28,6 +28,7 @@ const REDUCED_WIDTH_THRESHOLD = 500;
export default class ChatMessageActionsDesktop extends Component {
@service chat;
@service site;
@service siteSettings;
@service emojiStore;
@tracked size = FULL;
@ -35,8 +36,13 @@ export default class ChatMessageActionsDesktop extends Component {
popper = null;
get favoriteReactions() {
const defaultReactions = this.siteSettings.default_emoji_reactions
.split("|")
.filter(Boolean);
return this.emojiStore
.favoritesForContext(`channel_${this.message.channel.id}`)
.concat(defaultReactions)
.slice(0, 3)
.map(
(emoji) =>