From 2869ab787d11010435fce6d4f86e5c8d07131e37 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 14 Aug 2025 12:24:09 +0300 Subject: [PATCH 01/38] fix #1378 --- src/components/emoji_picker/emoji_picker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 17a317a4d..f9b306fb4 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -143,10 +143,10 @@ const EmojiPicker = { const fontSize = css.getPropertyValue('font-size') || '14px' const emojiSize = css.getPropertyValue('--emojiSize') || '2.2rem' - const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '') + const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '').trim() const fontSizeValue = Number(fontSize.replace(/[^0-9,.]+/, '')) - const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '') + const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '').trim() const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, '')) let fontSizeMultiplier From a6c844e52221c3c9a1f001d0109213aa1f3077cb Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 14 Aug 2025 12:31:12 +0300 Subject: [PATCH 02/38] make favs etc strip newlines so status is more visible --- src/components/notification/notification.vue | 1 + src/components/status_body/status_body.js | 4 ++++ src/components/status_body/status_body.vue | 2 +- src/components/status_content/status_content.vue | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 0930e0990..a531b35d3 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -247,6 +247,7 @@ diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index aa334499e..e89d1d173 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -22,6 +22,7 @@ const StatusContent = { name: 'StatusContent', props: [ 'compact', + 'collapse', // replaces newlines with spaces 'status', 'focused', 'noHeading', @@ -95,6 +96,9 @@ const StatusContent = { attachmentTypes () { return this.status.attachments.map(file => fileType.fileType(file.mimetype)) }, + collapsedStatus () { + return this.status.raw_html.replace(/(\n|)/g, ' ') + }, ...mapGetters(['mergedConfig']) }, components: { diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue index 0fc024b04..1035d04c6 100644 --- a/src/components/status_body/status_body.vue +++ b/src/components/status_body/status_body.vue @@ -38,7 +38,7 @@ v-if="!hideSubjectStatus && !(singleLine && status.summary_raw_html)" :class="{ '-single-line': singleLine }" class="text media-body" - :html="status.raw_html" + :html="collapse ? collapsedStatus : status.raw_html" :emoji="status.emojis" :handle-links="true" :faint="compact" diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 64a1d6a53..6f5b1d613 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -14,6 +14,7 @@ :toggle-showing-tall="toggleShowingTall" :toggle-expanding-subject="toggleExpandingSubject" :toggle-showing-long-subject="toggleShowingLongSubject" + :collapse="true" @parse-ready="$emit('parseReady', $event)" >
From 0b9b7a51a63756d85e4093b3f9cf579bc44c042f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 14 Aug 2025 12:53:19 +0300 Subject: [PATCH 03/38] collapse notifications and also allow expand on click anywhere --- src/components/notification/notification.js | 4 ++++ src/components/notification/notification.scss | 7 +++++++ src/components/notification/notification.vue | 12 ++++++++++-- src/components/status_content/status_content.js | 1 + src/components/status_content/status_content.vue | 2 +- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js index 043be1b1a..247b73848 100644 --- a/src/components/notification/notification.js +++ b/src/components/notification/notification.js @@ -64,6 +64,7 @@ const Notification = { }, methods: { toggleStatusExpanded () { + if (!this.expandable) return this.statusExpanded = !this.statusExpanded }, generateUserProfileLink (user) { @@ -136,6 +137,9 @@ const Notification = { const user = this.notification.from_profile return highlightStyle(highlight[user.screen_name]) }, + expandable () { + return (new Set(['like', '-pleroma:emoji_reaction', 'repeat'])).has(this.notification.type) + }, user () { return this.$store.getters.findUser(this.notification.from_profile.id) }, diff --git a/src/components/notification/notification.scss b/src/components/notification/notification.scss index e8895ce59..9c94d4090 100644 --- a/src/components/notification/notification.scss +++ b/src/components/notification/notification.scss @@ -1,10 +1,17 @@ // TODO Copypaste from Status, should unify it somehow +.NotificationParent { + &.-expandable { + cursor: pointer; + } +} + .Notification { border-bottom: 1px solid; border-color: var(--border); overflow-wrap: break-word; text-wrap: pretty; + &.Status { /* stylelint-disable-next-line declaration-no-important */ background-color: transparent !important; diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index a531b35d3..c9b557970 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -9,9 +9,17 @@ @interacted="interacted" /> -
+
@@ -247,7 +255,7 @@
diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index 3bf25c75b..f61ba0d05 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -53,6 +53,7 @@ const StatusContent = { props: [ 'status', 'compact', + 'collapse', 'focused', 'noHeading', 'fullContent', diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 6f5b1d613..fb08186b4 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -14,7 +14,7 @@ :toggle-showing-tall="toggleShowingTall" :toggle-expanding-subject="toggleExpandingSubject" :toggle-showing-long-subject="toggleShowingLongSubject" - :collapse="true" + :collapse="collapse" @parse-ready="$emit('parseReady', $event)" >
From 6e479d246b755806319faf387cf43a8ec74fc905 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 14 Aug 2025 12:59:51 +0300 Subject: [PATCH 04/38] visually combine subject and content into one input --- src/components/emoji_input/emoji_input.vue | 2 +- .../post_status_form/post_status_form.scss | 4 + .../post_status_form/post_status_form.vue | 125 +++++++++--------- 3 files changed, 69 insertions(+), 62 deletions(-) diff --git a/src/components/emoji_input/emoji_input.vue b/src/components/emoji_input/emoji_input.vue index a1cba33bc..de5ac8755 100644 --- a/src/components/emoji_input/emoji_input.vue +++ b/src/components/emoji_input/emoji_input.vue @@ -1,7 +1,7 @@