From 245e9f30a4825beb86fcbfcf718208752748e5b4 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 9 Oct 2023 18:25:57 +0200 Subject: [PATCH] FIX: minor chat styleguide fixes (#23849) - makes message take full width - allows to remove the thread state - removes non-existing component (mention warning) --- .../discourse/components/styleguide/organisms/chat.hbs | 1 - .../chat/assets/javascripts/discourse/models/chat-message.js | 5 +++++ plugins/chat/assets/stylesheets/common/chat-message.scss | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.hbs b/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.hbs index e883457235a..692feffd8fa 100644 --- a/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.hbs +++ b/plugins/chat/assets/javascripts/discourse/components/styleguide/organisms/chat.hbs @@ -3,7 +3,6 @@ -

Modals

diff --git a/plugins/chat/assets/javascripts/discourse/models/chat-message.js b/plugins/chat/assets/javascripts/discourse/models/chat-message.js index fa184629793..4bbb10e7d75 100644 --- a/plugins/chat/assets/javascripts/discourse/models/chat-message.js +++ b/plugins/chat/assets/javascripts/discourse/models/chat-message.js @@ -115,6 +115,11 @@ export default class ChatMessage { } set thread(thread) { + if (!thread) { + this._thread = null; + return; + } + this._thread = this.channel.threadsManager.add(this.channel, thread, { replace: true, }); diff --git a/plugins/chat/assets/stylesheets/common/chat-message.scss b/plugins/chat/assets/stylesheets/common/chat-message.scss index ea179c45e39..458c7a04e3e 100644 --- a/plugins/chat/assets/stylesheets/common/chat-message.scss +++ b/plugins/chat/assets/stylesheets/common/chat-message.scss @@ -177,6 +177,7 @@ .chat-message-container { background-color: var(--d-content-background, var(--secondary)); + width: 100%; &.-errored { color: var(--primary-medium);