A platform for community discussion. Free, open, simple.
DEV: bump new chat reactions popup to permanent (#43684)
David Battersby88c60108511b
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjsindex bd551d83ecf..67cadfc491b 100644--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs@@ -22,38 +22,13 @@ export default class ChatMessageReaction extends Component {@service currentUser;@service menu;@service site;- @service siteSettings;- @service tooltip;- registerTooltip = modifier((element) => {- if (- this.args.disableTooltip ||- this.useReactionsUsersPopup ||- !this.popoverContent?.length- ) {- return;- }-- const instance = this.tooltip.register(element, {- content: this.description,- identifier: "chat-message-reaction-tooltip",- animated: false,- placement: "top",- fallbackPlacements: ["bottom"],- triggers: this.site.mobileView ? ["hold"] : ["hover"],- });-- return () => {- instance.destroy();- };- });-- // With the new reactions popup enabled, hovering (desktop) or long-pressing- // (mobile) a reaction opens a users popup centred on that reaction. Each- // reaction registers its own popup; the shared `groupIdentifier` ensures only- // one is open at a time, so moving to another reaction opens a fresh popup.+ // Hovering (desktop) or long-pressing (mobile) a reaction opens a users popup+ // centred on that reaction. Each reaction registers its own popup; the shared+ // `groupIdentifier` ensures only one is open at a time, so moving to another+ // reaction opens a fresh popup.registerReactionsUsersPopup = modifier((element) => {- if (!this.useReactionsUsersPopup) {+ if (this.args.disableTooltip) {return;}@@ -128,15 +103,6 @@ export default class ChatMessageReaction extends Component {#reactionsUsersPopupInstance = null;#closeReactionsUsersPopupTimer = null;- // When the new reactions popup is enabled the reaction opens a users popup, so- // the names tooltip is suppressed here.- get useReactionsUsersPopup() {- return (- this.siteSettings.enable_new_chat_reactions_popup &&- !this.args.disableTooltip- );- }-get showCount() {return this.args.showCount ?? true;}@@ -239,7 +205,6 @@ export default class ChatMessageReaction extends Component {title={{this.emojiString}}type="button"{{on "click" this.handleClick passive=true}}- {{this.registerTooltip}}{{this.registerReactionsUsersPopup}}><imgdiff --git a/plugins/chat/assets/stylesheets/common/chat-message.scss b/plugins/chat/assets/stylesheets/common/chat-message.scssindex beebe289a0a..d8ff6d8d149 100644--- a/plugins/chat/assets/stylesheets/common/chat-message.scss+++ b/plugins/chat/assets/stylesheets/common/chat-message.scss@@ -24,18 +24,6 @@}}-[data-content][data-identifier="chat-message-reaction-tooltip"] {- font-size: var(--font-down-1);-- .fk-d-tooltip__inner-content {- display: block;- }-- .emoji {- padding-left: 0.25rem;- }-}-.chat-message {align-items: flex-start;padding: 0.25em 0.5em 0.25em 0.75em;diff --git a/plugins/chat/config/settings.yml b/plugins/chat/config/settings.ymlindex c20b8ab7f1a..3e7ed11e486 100644--- a/plugins/chat/config/settings.yml+++ b/plugins/chat/config/settings.yml@@ -15,7 +15,7 @@ chat:hidden: trueclient: trueupcoming_change:- status: "stable"+ status: "permanent"impact: "feature,all_members"learn_more_url: "https://meta.discourse.org/t/-/406004"enable_public_channels:diff --git a/plugins/chat/test/javascripts/components/chat-message-reaction-test.gjs b/plugins/chat/test/javascripts/components/chat-message-reaction-test.gjsindex e37757cb8ab..191dbb30714 100644--- a/plugins/chat/test/javascripts/components/chat-message-reaction-test.gjs+++ b/plugins/chat/test/javascripts/components/chat-message-reaction-test.gjs@@ -77,8 +77,6 @@ module("Component | ChatMessageReaction", function (hooks) {});test("opens the users popup on focus, not only on hover", async function (assert) {- this.siteSettings.enable_new_chat_reactions_popup = true;-const fabricators = new ChatFabricators(getOwner(this));const message = fabricators.message();const reaction = fabricators.reaction({ emoji: "heart", count: 1 });