From 6aa6f6f300d2f9de1e6c70a67b9459ae4c4b5a8f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 15 Aug 2021 17:53:35 +0300 Subject: [PATCH 01/10] fix console errors --- src/components/status_content/status_content.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 9db176f07..ea32890ea 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -24,7 +24,6 @@ :attachments="status.attachments" :limit="compact ? 1 : 0" :size="attachmentSize" - @setMedia="onMedia" @play="$emit('mediaplay', attachment.id)" @pause="$emit('mediapause', attachment.id)" /> From 8cc1ad67dff93b5faa1ed1bab663d16748eec68d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 15 Aug 2021 18:11:38 +0300 Subject: [PATCH 02/10] fix links sticking to mentionsline --- src/components/mentions_line/mentions_line.scss | 2 +- src/components/rich_content/rich_content.jsx | 7 +++++++ test/unit/specs/components/rich_content.spec.js | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/mentions_line/mentions_line.scss b/src/components/mentions_line/mentions_line.scss index 222940c80..50eb0c275 100644 --- a/src/components/mentions_line/mentions_line.scss +++ b/src/components/mentions_line/mentions_line.scss @@ -4,7 +4,7 @@ color: var(--link); } - .mention-link:not(:last-child) { + .mention-link { margin-right: 0.25em; } } diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 1353541fc..8ab007e39 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -121,6 +121,13 @@ export default Vue.component('RichContent', { // in MentionsLine return currentMentions !== null ? item.trim() : item } + // We add space with mentionsLine, otherwise non-text elements will + // stick to them. + if (currentMentions !== null) { + // single whitespace trim + item = item[0].match(/\s/) ? item.slice(1) : item + } + currentMentions = null if (item.includes(':')) { item = ['', processTextForEmoji( diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index b29edeab4..c84df34b6 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -59,7 +59,7 @@ describe('RichContent', () => { it('replaces mention with mentionsline', () => { const html = p( makeMention('John'), - ' how are you doing today?' + ' how are you doing today?' // also testing single-trimming function ) const wrapper = shallowMount(RichContent, { localVue, @@ -74,7 +74,7 @@ describe('RichContent', () => { expect(wrapper.html()).to.eql(compwrap(p( mentionsLine(1), - ' how are you doing today?' + ' how are you doing today?' // space removed to compensate for padding ))) }) From c8a7b6f4338e5240762915ef40aeb81e8d9beefe Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 15 Aug 2021 18:21:25 +0300 Subject: [PATCH 03/10] fix long posts double-fading in notifications --- src/components/status_body/status_body.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index f4167ac1f..91c331359 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -50,6 +50,7 @@ const StatusContent = { // Using max-height + overflow: auto for status components resulted in false positives // very often with japanese characters, and it was very annoying. tallStatus () { + if (this.singleLine || this.compact) return false const lengthScore = this.status.raw_html.split(/ 20 }, From 07c12ae16273498209ce557b59ea610e40365ad9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 15 Aug 2021 18:26:37 +0300 Subject: [PATCH 04/10] replace poll with an icon in notifications --- src/components/status_content/status_content.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index ea32890ea..69635aad1 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -10,13 +10,20 @@ :single-line="singleLine" @parseReady="$emit('parseReady', $event)" > -
+
+
+ +
+ Date: Sun, 15 Aug 2021 18:35:26 +0300 Subject: [PATCH 05/10] fix video attachments in notifications not having pointer cursor --- src/components/attachment/attachment.js | 3 +++ src/components/attachment/attachment.vue | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index bd4240872..b2ba16557 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -118,6 +118,9 @@ const Attachment = { } return modalTypes.includes(this.type) }, + videoTag () { + return this.useModal ? 'button' : 'span' + }, ...mapGetters(['mergedConfig']) }, watch: { diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 98d9c3ec5..8a1c31c72 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -127,9 +127,11 @@ /> - @@ -145,7 +147,7 @@ class="play-icon" icon="play-circle" /> - + Date: Sun, 15 Aug 2021 18:41:13 +0300 Subject: [PATCH 06/10] fix "+X more" sticking --- src/components/mentions_line/mentions_line.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/mentions_line/mentions_line.scss b/src/components/mentions_line/mentions_line.scss index 50eb0c275..976a3fc7d 100644 --- a/src/components/mentions_line/mentions_line.scss +++ b/src/components/mentions_line/mentions_line.scss @@ -2,6 +2,7 @@ .showMoreLess { white-space: normal; color: var(--link); + margin-right: 0.25em; } .mention-link { From f5823a96e970b6936185b7545c68d9401f8b3281 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 15 Aug 2021 19:43:52 +0300 Subject: [PATCH 07/10] add key attribute to make image refresh in media modal to give feedback when images are still loaded --- src/components/media_modal/media_modal.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index a578bc71d..31455e480 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -8,6 +8,7 @@ v-if="type === 'image'" class="modal-image" :src="currentMedia.url" + :key="currentMedia.url" :alt="currentMedia.description" :title="currentMedia.description" @touchstart.stop="mediaTouchStart" @@ -19,11 +20,13 @@ class="modal-image" :attachment="currentMedia" :controls="true" + :key="currentMedia.url" />