feat: Add emoji & icon picker for Help Center categories (#14702)

This commit is contained in:
Sivin Varghese
2026-06-16 02:10:05 +05:30
committed by GitHub
parent d8a16278b9
commit 1713cabdf2
41 changed files with 3015 additions and 6699 deletions
@@ -1,4 +1,5 @@
<script>
import { defineAsyncComponent } from 'vue';
import { mapGetters } from 'vuex';
import ChatAttachmentButton from 'widget/components/ChatAttachment.vue';
@@ -7,14 +8,17 @@ import { useAttachments } from '../composables/useAttachments';
import FluentIcon from 'shared/components/FluentIcon/Index.vue';
import ResizableTextArea from 'shared/components/ResizableTextArea.vue';
import EmojiInput from 'shared/components/emoji/EmojiInput.vue';
const EmojiIconPicker = defineAsyncComponent(
() =>
import('dashboard/components-next/emoji-icon-picker/EmojiIconPicker.vue')
);
export default {
name: 'ChatInputWrap',
components: {
ChatAttachmentButton,
ChatSendButton,
EmojiInput,
EmojiIconPicker,
FluentIcon,
ResizableTextArea,
},
@@ -110,6 +114,9 @@ export default {
emojiOnClick(emoji) {
this.userInput = `${this.userInput}${emoji} `;
},
onSelectEmoji({ value }) {
this.emojiOnClick(value);
},
onTypingOff() {
this.toggleTyping('off');
},
@@ -148,7 +155,7 @@ export default {
@focus="onFocus"
@blur="onBlur"
/>
<div class="flex items-center ltr:pl-2 rtl:pr-2">
<div class="relative flex items-center ltr:pl-2 rtl:pr-2">
<ChatAttachmentButton
v-if="showAttachment"
class="text-n-slate-12"
@@ -169,10 +176,12 @@ export default {
}"
/>
</button>
<EmojiInput
<EmojiIconPicker
v-if="shouldShowEmojiPicker && showEmojiPicker"
v-on-clickaway="hideEmojiPicker"
:on-click="emojiOnClick"
mode="emoji"
class="!bottom-full end-0 mb-2 max-w-[calc(100vw-3rem)]"
@select="onSelectEmoji"
@keydown.esc="hideEmojiPicker"
/>
<ChatSendButton
@@ -185,10 +194,6 @@ export default {
</template>
<style scoped lang="scss">
.emoji-dialog {
@apply max-w-full ltr:right-5 rtl:right-[unset] rtl:left-5 -top-[302px] before:ltr:right-2.5 before:rtl:right-[unset] before:rtl:left-2.5;
}
.user-message-input {
@apply border-none outline-none w-full placeholder:text-n-slate-10 resize-none h-8 min-h-8 max-h-60 py-1 px-0 my-2 bg-n-background text-n-slate-12 transition-all duration-200;
}