From bcca1692c60b658e25b93f30e96591b3bfd3d16a Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 30 Nov 2023 19:41:28 +0100 Subject: [PATCH] =?UTF-8?q?FIX:=20disables=20tooltip=20on=20desktop=20mess?= =?UTF-8?q?age=20menu=E2=80=99s=20reaction=20(#24650)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../discourse/components/chat-message-actions-desktop.gjs | 1 + .../discourse/components/chat-message-reaction.gjs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs index bacbfe11ff7..710fa5da92c 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs @@ -142,6 +142,7 @@ export default class ChatMessageActionsDesktop extends Component { @onReaction={{this.messageInteractor.react}} @message={{this.message}} @showCount={{false}} + @disableTooltip={{true}} /> {{/each}} {{/if}} diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs index aaee26fad16..db7b912ebfc 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs @@ -19,7 +19,7 @@ export default class ChatMessageReaction extends Component { @tracked isActive = false; registerTooltip = modifier((element) => { - if (!this.popoverContent?.length) { + if (this.disableTooltip || !this.popoverContent?.length) { return; } @@ -37,6 +37,10 @@ export default class ChatMessageReaction extends Component { }; }); + get disableTooltip() { + return this.args.disableTooltip ?? false; + } + get showCount() { return this.args.showCount ?? true; }