From 2075f61abb059e6f7b0614b15b48051b7d65820c Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Fri, 24 Oct 2025 16:51:18 +1000 Subject: [PATCH] FEATURE: Promote discourse_reactions_allow_any_emoji out of experimental (#35589) Followup f002aa4022f6bdf897710f413bdea68f4bd712ed We are renaming `discourse_reactions_experimental_allow_any_emoji` to `discourse_reactions_allow_any_emoji` and moving it out of the Experimental site setting area. We originally kept this setting experimental because we thought there might besome moderation concerts around allowing any emoji to be used. However, we later realised the `emoji_deny_list` core site setting can be used to effectively restrict which emoji are allowed to be used here. The setting `discourse_reactions_allow_any_emoji` remains off by default. I also added some of the discourse-reactions settings to the `emojis` site setting area to make them easier to find. --- .../custom_reactions_controller.rb | 2 +- .../components/discourse-reactions-picker.gjs | 6 ++---- .../config/locales/server.en.yml | 2 +- plugins/discourse-reactions/config/settings.yml | 6 ++++-- ...course_reactions_experimental_allow_any_emoji.rb | 13 +++++++++++++ plugins/discourse-reactions/plugin.rb | 2 +- ...custom_reactions_controller_custom_emoji_spec.rb | 8 ++++---- .../spec/system/reactions_post_spec.rb | 4 ++-- .../discourse-reactions-custom-emoji-test.js | 10 +++++----- 9 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 plugins/discourse-reactions/db/migrate/20251024020353_rename_discourse_reactions_experimental_allow_any_emoji.rb diff --git a/plugins/discourse-reactions/app/controllers/discourse_reactions/custom_reactions_controller.rb b/plugins/discourse-reactions/app/controllers/discourse_reactions/custom_reactions_controller.rb index 289069adfaf..3ccbb62bf3e 100644 --- a/plugins/discourse-reactions/app/controllers/discourse_reactions/custom_reactions_controller.rb +++ b/plugins/discourse-reactions/app/controllers/discourse_reactions/custom_reactions_controller.rb @@ -12,7 +12,7 @@ class DiscourseReactions::CustomReactionsController < ApplicationController reaction = params[:reaction] invalid_reaction = - if SiteSetting.discourse_reactions_experimental_allow_any_emoji + if SiteSetting.discourse_reactions_allow_any_emoji !Emoji.exists?(reaction) else DiscourseReactions::Reaction.valid_reactions.exclude?(params[:reaction]) diff --git a/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-picker.gjs b/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-picker.gjs index 58c55c1c501..26702774aff 100644 --- a/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-picker.gjs +++ b/plugins/discourse-reactions/assets/javascripts/discourse/components/discourse-reactions-picker.gjs @@ -89,7 +89,7 @@ export default class DiscourseReactionsPicker extends Component { get optimalColsCount() { let count = this.reactionInfo.length; - if (this.siteSettings.discourse_reactions_experimental_allow_any_emoji) { + if (this.siteSettings.discourse_reactions_allow_any_emoji) { count += 1; } @@ -181,9 +181,7 @@ export default class DiscourseReactionsPicker extends Component { {{emoji reaction.id}} {{/each}} - {{#if - this.siteSettings.discourse_reactions_experimental_allow_any_emoji - }} + {{#if this.siteSettings.discourse_reactions_allow_any_emoji}}