From aa5d01b572c6fd0b1cb7f47486d9b518300ab3f0 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Tue, 14 Sep 2021 11:55:48 +0530 Subject: [PATCH] fix: Hide quoted replies by default from messages (#3009) Fixes: #2009 , #2365 --- .../widgets/conversation/Message.vue | 36 +++++++----- .../widgets/conversation/bubble/Text.vue | 56 ++++++++++++++++++- .../dashboard/i18n/locale/en/chatlist.json | 4 +- .../shared/mixins/messageFormatterMixin.js | 1 + 4 files changed, 81 insertions(+), 16 deletions(-) diff --git a/app/javascript/dashboard/components/widgets/conversation/Message.vue b/app/javascript/dashboard/components/widgets/conversation/Message.vue index 3b716d9eb..e5de1b040 100644 --- a/app/javascript/dashboard/components/widgets/conversation/Message.vue +++ b/app/javascript/dashboard/components/widgets/conversation/Message.vue @@ -12,6 +12,7 @@ :message="message" :is-email="isEmailContentType" :readable-time="readableTime" + :display-quoted-button="displayQuotedButton" /> - -
+
+
@@ -19,6 +39,20 @@ export default { type: Boolean, default: true, }, + displayQuotedButton: { + type: Boolean, + default: false, + }, + }, + data() { + return { + showQuotedContent: false, + }; + }, + methods: { + toggleQuotedContent() { + this.showQuotedContent = !this.showQuotedContent; + }, }, }; @@ -53,4 +87,24 @@ export default { font-size: var(--font-size-normal); } } + +.show--quoted { + blockquote { + display: block; + } +} + +.hide--quoted { + blockquote { + display: none; + } +} + +.quoted-text--button { + color: var(--s-400); + cursor: pointer; + font-size: var(--font-size-mini); + padding-bottom: var(--space-small); + padding-top: var(--space-small); +} diff --git a/app/javascript/dashboard/i18n/locale/en/chatlist.json b/app/javascript/dashboard/i18n/locale/en/chatlist.json index f30c89196..3445aeb95 100644 --- a/app/javascript/dashboard/i18n/locale/en/chatlist.json +++ b/app/javascript/dashboard/i18n/locale/en/chatlist.json @@ -85,6 +85,8 @@ "VIEW_TWEET_IN_TWITTER": "View tweet in Twitter", "REPLY_TO_TWEET": "Reply to this tweet", "NO_MESSAGES": "No Messages", - "NO_CONTENT": "No content available" + "NO_CONTENT": "No content available", + "HIDE_QUOTED_TEXT": "Hide Quoted Text", + "SHOW_QUOTED_TEXT": "Show Quoted Text" } } diff --git a/app/javascript/shared/mixins/messageFormatterMixin.js b/app/javascript/shared/mixins/messageFormatterMixin.js index 3d6902bfe..21096409d 100644 --- a/app/javascript/shared/mixins/messageFormatterMixin.js +++ b/app/javascript/shared/mixins/messageFormatterMixin.js @@ -34,6 +34,7 @@ export default { 'lang', 'align', 'size', + 'border', ], }); },