From 8f118c01a44b4d30204812b2f60dd9a5d1ef27f5 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sat, 28 Nov 2020 15:27:58 +0200 Subject: [PATCH 1/2] add titles in react picker, support filtering by emoji itself --- src/components/react_button/react_button.js | 10 +++++++++- src/components/react_button/react_button.vue | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js index de0df70c..5e7b7580 100644 --- a/src/components/react_button/react_button.js +++ b/src/components/react_button/react_button.js @@ -27,13 +27,21 @@ const ReactButton = { }, computed: { commonEmojis () { - return ['👍', '😠', '👀', '😂', '🔥'] + return [ + { displayText: 'thumbsup', replacement: '👍' }, + { displayText: 'angry', replacement: '😠' }, + { displayText: 'eyes', replacement: '👀' }, + { displayText: 'joy', replacement: '😂' }, + { displayText: 'fire', replacement: '🔥' } + ] }, emojis () { if (this.filterWord !== '') { const filterWordLowercase = this.filterWord.toLowerCase() let orderedEmojiList = [] for (const emoji of this.$store.state.instance.emoji) { + if (emoji.replacement === this.filterWord) return [emoji] + const indexOfFilterWord = emoji.displayText.toLowerCase().indexOf(filterWordLowercase) if (indexOfFilterWord > -1) { if (!Array.isArray(orderedEmojiList[indexOfFilterWord])) { diff --git a/src/components/react_button/react_button.vue b/src/components/react_button/react_button.vue index e508a3e9..b5eb4524 100644 --- a/src/components/react_button/react_button.vue +++ b/src/components/react_button/react_button.vue @@ -22,15 +22,17 @@ v-for="emoji in commonEmojis" :key="emoji" class="emoji-button" + :title="emoji.displayText" @click="addReaction($event, emoji, close)" > - {{ emoji }} + {{ emoji.replacement }}
{{ emoji.replacement }} From a4e76067db7d9dd7d30607e4766e899e32ec4f87 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sat, 28 Nov 2020 15:36:48 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 475edc61..24e29f34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- Mouseover titles for emojis in reaction picker +- Support to input emoji into the search box in reaction picker + ### Fixed - Fixed the occasional bug where screen would scroll 1px when typing into a reply form - Fixed timeline errors locking timelines