From e2bcbd51bb1c42f2c289de5daf993b2d6bb97205 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 23 Dec 2024 23:01:15 +0200 Subject: [PATCH 1/6] emoji consistency + picker improvements --- src/components/emoji_picker/emoji_picker.scss | 49 ++++++++++++------- src/components/emoji_picker/emoji_picker.vue | 2 + .../emoji_reactions/emoji_reactions.js | 4 +- .../emoji_reactions/emoji_reactions.vue | 13 +++-- 4 files changed, 43 insertions(+), 25 deletions(-) diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss index 12c09388..45290a89 100644 --- a/src/components/emoji_picker/emoji_picker.scss +++ b/src/components/emoji_picker/emoji_picker.scss @@ -166,24 +166,6 @@ } } - &-group { - display: flex; - align-items: center; - flex-wrap: wrap; - justify-content: left; - - &-title { - font-size: 0.85em; - width: 100%; - margin: 0; - padding-left: 0.3em; - - &.disabled { - display: none; - } - } - } - &-item { width: var(--emoji-size); height: var(--emoji-size); @@ -206,9 +188,38 @@ } .emoji-picker-emoji.-unicode { - font-size: 1.6em; + font-size: calc(var(--emoji-size) * 0.8); overflow: hidden; } } + + &-group { + display: grid; + grid-template-columns: repeat(var(--__amount), 1fr); + justify-items: center; + align-items: center; + justify-content: left; + grid-template-rows: repeat(1, auto); + + &.first-row { + grid-template-rows: repeat(2, auto); + + .emoji-item { + grid-row: 2; + } + } + + &-title { + font-size: 0.85em; + grid-column: span var(--__amount); + width: 100%; + margin: 0; + padding-left: 0.3em; + + &.disabled { + display: none; + } + } + } } } diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index a3dc8f9e..0079c369 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -106,6 +106,8 @@ >
({ diff --git a/src/components/emoji_reactions/emoji_reactions.vue b/src/components/emoji_reactions/emoji_reactions.vue index 3ab4c125..4c768905 100644 --- a/src/components/emoji_reactions/emoji_reactions.vue +++ b/src/components/emoji_reactions/emoji_reactions.vue @@ -18,12 +18,11 @@ - + /> Date: Mon, 23 Dec 2024 23:15:35 +0200 Subject: [PATCH 2/6] make header scrollable Y->X --- src/components/emoji_picker/emoji_picker.js | 3 +++ src/components/emoji_picker/emoji_picker.vue | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index ae48139a..df56bf33 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -135,6 +135,9 @@ const EmojiPicker = { Popover }, methods: { + groupScroll (e) { + e.currentTarget.scrollLeft += e.deltaY + e.deltaX + }, updateEmojiSize () { const css = window.getComputedStyle(this.$refs.popover.$el) const emojiSize = css.getPropertyValue('--emojiSize') diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue index 0079c369..bd94bf99 100644 --- a/src/components/emoji_picker/emoji_picker.vue +++ b/src/components/emoji_picker/emoji_picker.vue @@ -8,7 +8,9 @@ @close="onPopoverClosed" >