From 335719e7ff1f46c55ca99e7ef6cf50f4440e8ca7 Mon Sep 17 00:00:00 2001 From: Joe McGrath Date: Thu, 23 Dec 2021 13:35:03 +0900 Subject: [PATCH 1/4] fix(glyphs): minor glyph qualiy of life updates * add padding to bottom of enhancers glyph list to show all * add small img to reply rather than string of glyph url --- .../views/chat/chatbar/reply/Reply.less | 79 ++++++++++--------- .../views/chat/enhancers/glyphs/Glyphs.html | 1 - .../views/chat/enhancers/glyphs/Glyphs.less | 3 + components/views/chat/message/Message.vue | 3 +- 4 files changed, 46 insertions(+), 40 deletions(-) diff --git a/components/views/chat/chatbar/reply/Reply.less b/components/views/chat/chatbar/reply/Reply.less index a1fd59d957..57f1e68a81 100644 --- a/components/views/chat/chatbar/reply/Reply.less +++ b/components/views/chat/chatbar/reply/Reply.less @@ -1,48 +1,51 @@ .is-chatbar-reply { - min-height: 36px; - max-height: 36px; - display: flex; - justify-content: space-between; - width: calc(@full - 2rem); - padding: 0.25rem 0.5rem; - font-size: @text-size; - font-family: @secondary-font; - margin: 0 1rem; - &:extend(.background-primary-gradient); - &:extend(.blur); - border-top: @light-border; - border-left: @light-border; - border-right: @light-border; - border-top-left-radius: @corner-rounding; - border-top-right-radius: @corner-rounding; - border: 1px solid transparent; - align-items: center; + min-height: 36px; + max-height: 36px; + display: flex; + justify-content: space-between; + width: calc(@full - 2rem); + padding: 0.25rem 0.5rem; + font-size: @text-size; + font-family: @secondary-font; + margin: 0 1rem; + &:extend(.background-primary-gradient); + &:extend(.blur); + border-top: @light-border; + border-left: @light-border; + border-right: @light-border; + border-top-left-radius: @corner-rounding; + border-top-right-radius: @corner-rounding; + border: 1px solid transparent; + align-items: center; - strong { - &:extend(.font-secondary); - } + strong { + &:extend(.font-secondary); + } - .markdown { - width: calc(@full - @small-icon-size - 0.25rem); - p { - font-size: @text-size; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } + .markdown { + width: calc(@full - @small-icon-size - 0.25rem); + p { + display: flex; + align-items: center; + gap: 4px; + font-size: @text-size; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } + } - .reply-close { - cursor: pointer; - display: flex; - font-size: @small-icon-size; - &:extend(.font-primary); - } + .reply-close { + cursor: pointer; + display: flex; + font-size: @small-icon-size; + &:extend(.font-primary); + } } @media only screen and (max-width: @mobile-breakpoint) { .is-chatbar-reply { - margin: 0 @light-spacing; - width: calc(@full - @normal-spacing); + margin: 0 @light-spacing; + width: calc(@full - @normal-spacing); } -} \ No newline at end of file +} diff --git a/components/views/chat/enhancers/glyphs/Glyphs.html b/components/views/chat/enhancers/glyphs/Glyphs.html index 5c8548756c..0770a57276 100644 --- a/components/views/chat/enhancers/glyphs/Glyphs.html +++ b/components/views/chat/enhancers/glyphs/Glyphs.html @@ -12,7 +12,6 @@
` } - this.$store.commit('ui/setReplyChatbarContent', { id, payload: finalPayload, From 45c100a52fc555051c139eea6b4f1c77a3d91d98 Mon Sep 17 00:00:00 2001 From: Joe McGrath Date: Thu, 23 Dec 2021 17:29:02 +0900 Subject: [PATCH 2/4] feat(glyphs): recently used glyphs functionality * added state for recently used glyphs with a counter * removed global style hidiing typographyText on xs devices * mobile styles for recently selected glyphs --- .../EmbeddedLinkContent.vue | 16 +++++------ .../Chat/Embeds/VideoPlayer/VideoPlayer.vue | 2 +- .../chat/enhancers/glyphs/item/Item.html | 2 +- .../views/chat/enhancers/glyphs/item/Item.vue | 8 ++++-- .../views/chat/enhancers/glyphs/nav/Nav.html | 14 ++++++---- .../views/chat/enhancers/glyphs/nav/Nav.less | 1 + .../views/chat/enhancers/glyphs/nav/Nav.vue | 19 ++++++++----- locales | 2 +- nuxt.config.js | 1 + store/ui/getters.ts | 6 ++-- store/ui/mutations.ts | 13 +++++++++ store/ui/state.ts | 3 +- store/ui/types.ts | 28 ++++++++++++------- 13 files changed, 77 insertions(+), 38 deletions(-) diff --git a/components/ui/Chat/Embeds/EmbeddedLinkContent/EmbeddedLinkContent.vue b/components/ui/Chat/Embeds/EmbeddedLinkContent/EmbeddedLinkContent.vue index 2670c2190c..703c11b5cc 100644 --- a/components/ui/Chat/Embeds/EmbeddedLinkContent/EmbeddedLinkContent.vue +++ b/components/ui/Chat/Embeds/EmbeddedLinkContent/EmbeddedLinkContent.vue @@ -7,8 +7,8 @@ import { IFrameVideoData } from './types' export default Vue.extend({ props: { data: { - type: String, - default: () => {}, + type: String, + default: () => {}, }, }, data() { @@ -34,7 +34,7 @@ export default Vue.extend({ parseEmbeddableVideoContentFromText(messagetext: string) { // parse incoming text for links const arrayOfLinks = messagetext.match( - /(\b(https?):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi + /(\b(https?):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/gi, ) // this.settings.embeddedLinks is the global set in the networks panel. Without this, it just shows up as a normal link @@ -92,7 +92,7 @@ export default Vue.extend({ requestWidth = '300' } const facebookOutSource = `https://www.facebook.com/plugins/video.php?href=${encodeURIComponent( - link.split('?')[0] + link.split('?')[0], )}&show_text=0&width=${requestWidth}` return { src: facebookOutSource, @@ -120,7 +120,7 @@ export default Vue.extend({ src: `https://player.twitch.tv/?${videoId}&parent=${window.location.hostname}&autoplay=false`, type: 'iframe', ref: this.setRefId( - `https://player.twitch.tv/?${videoId}&parent=${window.location.hostname}&autoplay=false` + `https://player.twitch.tv/?${videoId}&parent=${window.location.hostname}&autoplay=false`, ), aspectRatioClass: 'iframe-container-16-9', } @@ -128,7 +128,7 @@ export default Vue.extend({ if ( link.match( - /^https?:\/\/([a-z0-9-]+[.])spotify[.]com\/(playlist|embed)?/g + /^https?:\/\/([a-z0-9-]+[.])spotify[.]com\/(playlist|embed)?/g, ) ) { // get type and id @@ -142,7 +142,7 @@ export default Vue.extend({ src: `https://open.spotify.com/embed/${spotifyEmbedType}?utm_source=generator`, type: 'iframe', ref: this.setRefId( - `https://open.spotify.com/embed/${spotifyEmbedType}?utm_source=generator` + `https://open.spotify.com/embed/${spotifyEmbedType}?utm_source=generator`, ), aspectRatioClass: 'iframe-container-16-9', } @@ -180,7 +180,7 @@ export default Vue.extend({ }, }) - + +