Skip to content

A platform for community discussion. Free, open, simple.

DEV: Rename experimental_ upcoming change settings (#37589)

Martin Brennan6e8570b0fbeb
diff --git a/app/controllers/admin/form_templates_controller.rb b/app/controllers/admin/form_templates_controller.rb
index 2dfb99bc837..18cf691d10c 100644
--- a/app/controllers/admin/form_templates_controller.rb
+++ b/app/controllers/admin/form_templates_controller.rb
@@ -73,7 +73,7 @@ class Admin::FormTemplatesController < Admin::StaffController
private
def ensure_form_templates_enabled
- unless UpcomingChanges.enabled_for_user?(:experimental_form_templates, current_user)
+ unless UpcomingChanges.enabled_for_user?(:enable_form_templates, current_user)
raise Discourse::InvalidAccess.new
end
end
diff --git a/app/controllers/admin/impersonate_controller.rb b/app/controllers/admin/impersonate_controller.rb
index 815d147f83d..f236dd51ebc 100644
--- a/app/controllers/admin/impersonate_controller.rb
+++ b/app/controllers/admin/impersonate_controller.rb
@@ -13,7 +13,7 @@ class Admin::ImpersonateController < Admin::AdminController
StaffActionLogger.new(current_user).log_impersonate(user)
- if UpcomingChanges.enabled_for_user?(:experimental_impersonation, current_user)
+ if UpcomingChanges.enabled_for_user?(:impersonate_without_logout, current_user)
raise Discourse::InvalidAccess if current_user.is_impersonating
start_impersonating_user(user)
@@ -25,7 +25,7 @@ class Admin::ImpersonateController < Admin::AdminController
end
def destroy
- unless UpcomingChanges.enabled_for_user?(:experimental_impersonation, current_user)
+ unless UpcomingChanges.enabled_for_user?(:impersonate_without_logout, current_user)
raise Discourse::NotFound
end
diff --git a/app/controllers/form_templates_controller.rb b/app/controllers/form_templates_controller.rb
index 0acc0f0eeb9..2795dafaa94 100644
--- a/app/controllers/form_templates_controller.rb
+++ b/app/controllers/form_templates_controller.rb
@@ -24,7 +24,7 @@ class FormTemplatesController < ApplicationController
private
def ensure_form_templates_enabled
- unless UpcomingChanges.enabled_for_user?(:experimental_form_templates, current_user)
+ unless UpcomingChanges.enabled_for_user?(:enable_form_templates, current_user)
raise Discourse::InvalidAccess.new
end
end
diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb
index 7426c9b316f..79f25fcbec0 100644
--- a/app/controllers/static_controller.rb
+++ b/app/controllers/static_controller.rb
@@ -64,8 +64,7 @@ class StaticController < ApplicationController
return redirect_to path("/login")
end
- rename_faq =
- UpcomingChanges.enabled_for_user?(:experimental_rename_faq_to_guidelines, current_user)
+ rename_faq = UpcomingChanges.enabled_for_user?(:rename_faq_to_guidelines, current_user)
if rename_faq
redirect_paths = %w[/rules /conduct]
@@ -111,7 +110,7 @@ class StaticController < ApplicationController
@title = "#{title_prefix} - #{SiteSetting.title}"
@body = @topic.posts.first.cooked
@faq_overridden = SiteSetting.faq_url.present?
- @experimental_rename_faq_to_guidelines = rename_faq
+ @rename_faq_to_guidelines = rename_faq
render :show, layout: !request.xhr?, formats: [:html]
return
diff --git a/app/views/static/show.html.erb b/app/views/static/show.html.erb
index 1b75b979a8d..e2945d90f49 100644
--- a/app/views/static/show.html.erb
+++ b/app/views/static/show.html.erb
@@ -6,7 +6,7 @@
<% if @faq_overridden %>
<li class='nav-item-guidelines'><a class='<%= @page == 'faq' ? 'active' : '' %>' href='<%= guidelines_path %>'><%= t 'js.guidelines' %></a></li>
<li class='nav-item-faq'><a href='<%= faq_path %>'><%= t 'js.faq' %></a></li>
- <% elsif @experimental_rename_faq_to_guidelines %>
+ <% elsif @rename_faq_to_guidelines %>
<li class='nav-item-guidelines'><a class='<%= @page == 'faq' ? 'active' : '' %>' href='<%=guidelines_path%>'><%= t 'js.guidelines' %></a></li>
<% else %>
<li class='nav-item-faq'><a class='<%= @page == 'faq' ? 'active' : '' %>' href='<%=faq_path%>'><%= t 'js.faq' %></a></li>
diff --git a/config/initializers/015-track-upcoming-change-toggle.rb b/config/initializers/015-track-upcoming-change-toggle.rb
index 2ba350b7679..65798ecbe1f 100644
--- a/config/initializers/015-track-upcoming-change-toggle.rb
+++ b/config/initializers/015-track-upcoming-change-toggle.rb
@@ -14,9 +14,9 @@
# via the UI and the UpcomingChanges::Toggle service.
DiscourseEvent.on(:upcoming_change_enabled) do |setting_name|
- # Respond to event here, e.g. if setting_name == :experimental_form_templates do X.
+ # Respond to event here, e.g. if setting_name == :enable_form_templates do X.
end
DiscourseEvent.on(:upcoming_change_disabled) do |setting_name|
- # Respond to event here, e.g. if setting_name == :experimental_form_templates do X.
+ # Respond to event here, e.g. if setting_name == :enable_form_templates do X.
end
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index ed2008f26a0..19a0a05bf21 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -2725,11 +2725,11 @@ en:
default_navigation_menu_categories: "Selected categories will be displayed under Navigation Menu's Categories section by default."
default_navigation_menu_tags: "Selected tags will be displayed under Navigation Menu's Tags section by default."
experimental_new_new_view_groups: 'Enable a new topics list that combines unread and new topics and make the "Everything" link in the sidebar link to it.'
- experimental_form_templates: "Enable the form templates feature. With it, you can enforce a structured form with data validation as part of the topic creation flow."
+ enable_form_templates: "Enable the form templates feature. With it, you can enforce a structured form with data validation as part of the topic creation flow."
show_preview_for_form_templates: "Enable the preview for form templates feature"
lazy_load_categories_groups: "Lazy load category information only for users of these groups. This improves performance on sites with many categories."
- experimental_auto_grid_images: "Automatically wraps images in [grid] tags when 3 or more images are uploaded in the composer."
- experimental_impersonation: "Allow admins to impersonate a user without having to log out of their admin account."
+ enable_auto_grid_images: "Automatically wraps images in [grid] tags when 3 or more images are uploaded in the composer."
+ impersonate_without_logout: "Allow admins to impersonate a user without having to log out of their admin account."
experimental_impersonation_time_limit_minutes: "How long before an impersonation session is automatically ended."
page_loading_indicator: "Configure the loading indicator which appears during page navigations within Discourse. 'Spinner' is a full page indicator. 'Slider' shows a narrow bar at the top of the screen."
show_user_menu_avatars: "Show user avatars in the user menu"
@@ -2754,7 +2754,7 @@ en:
enable_upcoming_changes: "Enable upcoming changes"
fake_upcoming_change: "This is a fake upcoming change for testing purposes. No need to translate this string."
floating_dismiss_topics_on_mobile: "Shows a floating 'Dismiss...' button on mobile for the topic list for easier access and to free up space in the top of the topic list"
- experimental_rename_faq_to_guidelines: "This change renames the FAQ page to Guidelines. The FAQ page will still be available at /faq. The 'faq url' setting works as before."
+ rename_faq_to_guidelines: "This change renames the FAQ page to Guidelines. The FAQ page will still be available at /faq. The 'faq url' setting works as before."
enable_simplified_category_creation: "Enables a simplified category creation flow with fewer options and a cleaner interface."
enable_custom_splash_screen: "Allows customizing the loading splash screen with your own SVG image. Upload an image via the 'splash screen image' setting. Warning: This may negatively impact LCP scores and Google indexing."
modernize_foundation_theme: "This change introduces design modifcations to the Foundation theme in Discourse."
diff --git a/config/site_settings.yml b/config/site_settings.yml
index b9242894c7c..026bded4b96 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -1716,21 +1716,21 @@ posting:
max: 255
area: "posts_and_topics"
depends_on:
- - "experimental_form_templates"
+ - "enable_form_templates"
depends_behavior: "hidden"
max_form_template_content_length:
default: 5000
max: 150000
area: "posts_and_topics"
depends_on:
- - "experimental_form_templates"
+ - "enable_form_templates"
depends_behavior: "hidden"
show_preview_for_form_templates:
client: true
default: true
area: "posts_and_topics"
depends_on:
- - "experimental_form_templates"
+ - "enable_form_templates"
depends_behavior: "hidden"
group_pm_user_limit:
default: 1000
@@ -4201,7 +4201,7 @@ dashboard:
client: true
experimental:
- experimental_auto_grid_images:
+ enable_auto_grid_images:
default: false
client: true
area: "experimental"
@@ -4209,7 +4209,7 @@ experimental:
status: "experimental"
impact: "feature,all_members"
learn_more_url: "https://meta.discourse.org/t/-/394784"
- experimental_rename_faq_to_guidelines:
+ rename_faq_to_guidelines:
default: false
hidden: true
client: true
@@ -4223,7 +4223,7 @@ experimental:
client: true
hidden: true
area: "experimental"
- experimental_form_templates:
+ enable_form_templates:
client: true
default: false
hidden: true
@@ -4232,7 +4232,7 @@ experimental:
status: "experimental"
impact: "feature,all_members"
learn_more_url: "https://meta.discourse.org/t/-/278631"
- experimental_impersonation:
+ impersonate_without_logout:
default: false
hidden: true
area: "experimental"
diff --git a/db/migrate/20260206000936_rename_experimental_auto_grid_images_setting.rb b/db/migrate/20260206000936_rename_experimental_auto_grid_images_setting.rb
new file mode 100644
index 00000000000..706e8f57b46
--- /dev/null
+++ b/db/migrate/20260206000936_rename_experimental_auto_grid_images_setting.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RenameExperimentalAutoGridImagesSetting < ActiveRecord::Migration[8.0]
+ def up
+ execute <<~SQL
+ UPDATE site_settings
+ SET name = 'enable_auto_grid_images'
+ WHERE name = 'experimental_auto_grid_images'
+ SQL
+
+ execute <<~SQL
+ UPDATE upcoming_change_events
+ SET upcoming_change_name = 'enable_auto_grid_images'
+ WHERE upcoming_change_name = 'experimental_auto_grid_images'
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20260206000937_rename_experimental_rename_faq_to_guidelines_setting.rb b/db/migrate/20260206000937_rename_experimental_rename_faq_to_guidelines_setting.rb
new file mode 100644
index 00000000000..b8ccc91748d
--- /dev/null
+++ b/db/migrate/20260206000937_rename_experimental_rename_faq_to_guidelines_setting.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RenameExperimentalRenameFaqToGuidelinesSetting < ActiveRecord::Migration[8.0]
+ def up
+ execute <<~SQL
+ UPDATE site_settings
+ SET name = 'rename_faq_to_guidelines'
+ WHERE name = 'experimental_rename_faq_to_guidelines'
+ SQL
+
+ execute <<~SQL
+ UPDATE upcoming_change_events
+ SET upcoming_change_name = 'rename_faq_to_guidelines'
+ WHERE upcoming_change_name = 'experimental_rename_faq_to_guidelines'
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20260206000938_rename_experimental_form_templates_setting.rb b/db/migrate/20260206000938_rename_experimental_form_templates_setting.rb
new file mode 100644
index 00000000000..2e19ce18f0e
--- /dev/null
+++ b/db/migrate/20260206000938_rename_experimental_form_templates_setting.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RenameExperimentalFormTemplatesSetting < ActiveRecord::Migration[8.0]
+ def up
+ execute <<~SQL
+ UPDATE site_settings
+ SET name = 'enable_form_templates'
+ WHERE name = 'experimental_form_templates'
+ SQL
+
+ execute <<~SQL
+ UPDATE upcoming_change_events
+ SET upcoming_change_name = 'enable_form_templates'
+ WHERE upcoming_change_name = 'experimental_form_templates'
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/db/migrate/20260206000939_rename_experimental_impersonation_setting.rb b/db/migrate/20260206000939_rename_experimental_impersonation_setting.rb
new file mode 100644
index 00000000000..815a9e712e4
--- /dev/null
+++ b/db/migrate/20260206000939_rename_experimental_impersonation_setting.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RenameExperimentalImpersonationSetting < ActiveRecord::Migration[8.0]
+ def up
+ execute <<~SQL
+ UPDATE site_settings
+ SET name = 'impersonate_without_logout'
+ WHERE name = 'experimental_impersonation'
+ SQL
+
+ execute <<~SQL
+ UPDATE upcoming_change_events
+ SET upcoming_change_name = 'impersonate_without_logout'
+ WHERE upcoming_change_name = 'experimental_impersonation'
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/frontend/discourse/app/components/category-topic-template-editor.gjs b/frontend/discourse/app/components/category-topic-template-editor.gjs
index 15fee0ae1a1..0f555db18c1 100644
--- a/frontend/discourse/app/components/category-topic-template-editor.gjs
+++ b/frontend/discourse/app/components/category-topic-template-editor.gjs
@@ -66,7 +66,7 @@ export default class CategoryTopicTemplateEditor extends Component {
}
<template>
- {{#if this.siteSettings.experimental_form_templates}}
+ {{#if this.siteSettings.enable_form_templates}}
<div class="control-group">
<DToggleSwitch
class="toggle-template-type"
diff --git a/frontend/discourse/app/controllers/about.js b/frontend/discourse/app/controllers/about.js
index 3eb085fe01e..070ad81fa04 100644
--- a/frontend/discourse/app/controllers/about.js
+++ b/frontend/discourse/app/controllers/about.js
@@ -4,6 +4,5 @@ import { alias, gt } from "@ember/object/computed";
export default class AboutController extends Controller {
@gt("siteSettings.faq_url.length", 0) faqOverridden;
- @alias("siteSettings.experimental_rename_faq_to_guidelines")
- renameFaqToGuidelines;
+ @alias("siteSettings.rename_faq_to_guidelines") renameFaqToGuidelines;
}
diff --git a/frontend/discourse/app/lib/sidebar/admin-sidebar.js b/frontend/discourse/app/lib/sidebar/admin-sidebar.js
index c7fb57c96e1..523b8cac6a7 100644
--- a/frontend/discourse/app/lib/sidebar/admin-sidebar.js
+++ b/frontend/discourse/app/lib/sidebar/admin-sidebar.js
@@ -419,7 +419,7 @@ export default class AdminSidebarPanel extends BaseCustomSidebarPanel {
});
}
- if (siteSettings.experimental_form_templates) {
+ if (siteSettings.enable_form_templates) {
this.adminNavManager.amendLinksToSection("appearance", [
{
name: "admin_customize_form_templates",
diff --git a/frontend/discourse/app/lib/sidebar/common/community-section/faq-section-link.js b/frontend/discourse/app/lib/sidebar/common/community-section/faq-section-link.js
index 99d245224e1..a3afe733df8 100644
--- a/frontend/discourse/app/lib/sidebar/common/community-section/faq-section-link.js
+++ b/frontend/discourse/app/lib/sidebar/common/community-section/faq-section-link.js
@@ -6,9 +6,7 @@ export default class FAQSectionLink extends BaseSectionLink {
@service siteSettings;
get renameToGuidelines() {
- return (
- this.siteSettings.experimental_rename_faq_to_guidelines && !this.href
- );
+ return this.siteSettings.rename_faq_to_guidelines && !this.href;
}
get name() {
diff --git a/frontend/discourse/app/lib/uppy/composer-upload.js b/frontend/discourse/app/lib/uppy/composer-upload.js
index 1e4b998a05c..2642b363a05 100644
--- a/frontend/discourse/app/lib/uppy/composer-upload.js
+++ b/frontend/discourse/app/lib/uppy/composer-upload.js
@@ -350,7 +350,7 @@ export default class UppyComposerUpload {
const MIN_IMAGES_TO_AUTO_GRID = 3;
if (
- this.siteSettings.experimental_auto_grid_images &&
+ this.siteSettings.enable_auto_grid_images &&
this.#consecutiveImages?.length >= MIN_IMAGES_TO_AUTO_GRID &&
this.textManipulation
) {
diff --git a/frontend/discourse/app/services/composer.js b/frontend/discourse/app/services/composer.js
index 830b9bf3de2..dbe3df01cab 100644
--- a/frontend/discourse/app/services/composer.js
+++ b/frontend/discourse/app/services/composer.js
@@ -199,10 +199,7 @@ export default class ComposerService extends Service {
@computed("model.category", "skipFormTemplate")
get formTemplateIds() {
- if (
- !this.siteSettings.experimental_form_templates ||
- this.skipFormTemplate
- ) {
+ if (!this.siteSettings.enable_form_templates || this.skipFormTemplate) {
return null;
}
diff --git a/frontend/discourse/tests/acceptance/composer-form-template-test.js b/frontend/discourse/tests/acceptance/composer-form-template-test.js
index e8bf7f3ffbb..8fce463a221 100644
--- a/frontend/discourse/tests/acceptance/composer-form-template-test.js
+++ b/frontend/discourse/tests/acceptance/composer-form-template-test.js
@@ -49,7 +49,7 @@ acceptance("Composer Form Template", function (needs) {
whisperer: true,
});
needs.settings({
- experimental_form_templates: true,
+ enable_form_templates: true,
general_category_id: 1,
default_composer_category: 1,
});
diff --git a/lib/seed_data/topics.rb b/lib/seed_data/topics.rb
index eb6cb24ba86..d44187c9eb6 100644
--- a/lib/seed_data/topics.rb
+++ b/lib/seed_data/topics.rb
@@ -90,12 +90,12 @@ module SeedData
# FAQ/Guidelines
topics << {
site_setting_name: "guidelines_topic_id",
- # NOTE: experimental_rename_faq_to_guidelines is an upcoming change,
+ # NOTE: rename_faq_to_guidelines is an upcoming change,
# but we are setting this seed data on site creation, so not really
# any point being user-specific here.
title:
(
- if SiteSetting.experimental_rename_faq_to_guidelines
+ if SiteSetting.rename_faq_to_guidelines
I18n.t("guidelines_topic.guidelines_title")
else
I18n.t("guidelines_topic.title")
diff --git a/spec/requests/admin/config/upcoming_changes_controller_spec.rb b/spec/requests/admin/config/upcoming_changes_controller_spec.rb
index e7cbdf034bd..b5b4320b6f8 100644
--- a/spec/requests/admin/config/upcoming_changes_controller_spec.rb
+++ b/spec/requests/admin/config/upcoming_changes_controller_spec.rb
@@ -189,7 +189,7 @@ RSpec.describe Admin::Config::UpcomingChangesController do
end
describe "#toggle_change" do
- let(:setting_name) { "experimental_form_templates" }
+ let(:setting_name) { "enable_form_templates" }
context "when logged in as non-admin" do
before { sign_in(user) }
@@ -211,15 +211,15 @@ RSpec.describe Admin::Config::UpcomingChangesController do
end
it "toggles the setting from false to true" do
- SiteSetting.experimental_form_templates = false
+ SiteSetting.enable_form_templates = false
expect {
put "/admin/config/upcoming-changes/toggle.json", params: { setting_name:, enabled: true }
- }.to change { SiteSetting.experimental_form_templates }.from(false).to(true)
+ }.to change { SiteSetting.enable_form_templates }.from(false).to(true)
end
it "toggles the setting from true to false" do
- SiteSetting.experimental_form_templates = true
+ SiteSetting.enable_form_templates = true
expect {
put "/admin/config/upcoming-changes/toggle.json",
@@ -227,7 +227,7 @@ RSpec.describe Admin::Config::UpcomingChangesController do
setting_name:,
enabled: false,
}
- }.to change { SiteSetting.experimental_form_templates }.from(true).to(false)
+ }.to change { SiteSetting.enable_form_templates }.from(true).to(false)
end
it "logs the change in staff action logs" do
diff --git a/spec/requests/admin/form_templates_controller_spec.rb b/spec/requests/admin/form_templates_controller_spec.rb
index bf376d4a53f..c5ad8eba063 100644
--- a/spec/requests/admin/form_templates_controller_spec.rb
+++ b/spec/requests/admin/form_templates_controller_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe Admin::FormTemplatesController do
fab!(:user)
fab!(:form_template)
- before { SiteSetting.experimental_form_templates = true }
+ before { SiteSetting.enable_form_templates = true }
describe "#index" do
context "when logged in as an admin" do
@@ -33,7 +33,7 @@ RSpec.describe Admin::FormTemplatesController do
context "when experimental form templates is disabled" do
before do
sign_in(admin)
- SiteSetting.experimental_form_templates = false
+ SiteSetting.enable_form_templates = false
end
it "should not work if you are an admin" do
diff --git a/spec/requests/admin/impersonate_controller_spec.rb b/spec/requests/admin/impersonate_controller_spec.rb
index 1f1d24dff42..b3805632274 100644
--- a/spec/requests/admin/impersonate_controller_spec.rb
+++ b/spec/requests/admin/impersonate_controller_spec.rb
@@ -63,7 +63,7 @@ RSpec.describe Admin::ImpersonateController do
context "when using experimental impersonation feature" do
it "raises an invalid access error if admin is already impersonating someone" do
- SiteSetting.experimental_impersonation = true
+ SiteSetting.impersonate_without_logout = true
User.any_instance.stubs(:is_impersonating).returns(true)
post "/admin/impersonate.json", params: { username_or_email: user.username }
@@ -123,7 +123,7 @@ RSpec.describe Admin::ImpersonateController do
before { sign_in(admin) }
it "raises a not found error when experimental impersonation is disabled" do
- SiteSetting.experimental_impersonation = false
+ SiteSetting.impersonate_without_logout = false
delete "/admin/impersonate.json"
@@ -131,7 +131,7 @@ RSpec.describe Admin::ImpersonateController do
end
it "does not pass routing constraint when current user is not impersonating" do
- SiteSetting.experimental_impersonation = true
+ SiteSetting.impersonate_without_logout = true
User.any_instance.stubs(:is_impersonating).returns(false)
delete "/admin/impersonate.json"
@@ -140,7 +140,7 @@ RSpec.describe Admin::ImpersonateController do
end
it "stops impersonating" do
- SiteSetting.experimental_impersonation = true
+ SiteSetting.impersonate_without_logout = true
User.any_instance.stubs(:is_impersonating).returns(true)
delete "/admin/impersonate.json"
diff --git a/spec/requests/form_templates_controller_spec.rb b/spec/requests/form_templates_controller_spec.rb
index e029ac9cdae..7acdbbcf17d 100644
--- a/spec/requests/form_templates_controller_spec.rb
+++ b/spec/requests/form_templates_controller_spec.rb
@@ -3,7 +3,7 @@
RSpec.describe FormTemplatesController do
fab!(:user)
- before { SiteSetting.experimental_form_templates = true }
+ before { SiteSetting.enable_form_templates = true }
describe "#index" do
fab!(:form_template)
@@ -37,7 +37,7 @@ RSpec.describe FormTemplatesController do
context "when experimental form templates is disabled" do
before do
sign_in(user)
- SiteSetting.experimental_form_templates = false
+ SiteSetting.enable_form_templates = false
end
it "should not work if you are a logged in user" do
@@ -176,7 +176,7 @@ RSpec.describe FormTemplatesController do
context "when experimental form templates is disabled" do
before do
sign_in(user)
- SiteSetting.experimental_form_templates = false
+ SiteSetting.enable_form_templates = false
end
it "should not work if you are a logged in user" do
diff --git a/spec/services/upcoming_changes/toggle_spec.rb b/spec/services/upcoming_changes/toggle_spec.rb
index c5645dd01c9..44274329125 100644
--- a/spec/services/upcoming_changes/toggle_spec.rb
+++ b/spec/services/upcoming_changes/toggle_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe UpcomingChanges::Toggle do
fab!(:admin)
let(:params) { { setting_name:, enabled: } }
let(:enabled) { true }
- let(:setting_name) { :experimental_form_templates }
+ let(:setting_name) { :enable_form_templates }
let(:dependencies) { { guardian: } }
let(:options) { {} }
let(:guardian) { admin.guardian }
@@ -188,17 +188,17 @@ RSpec.describe UpcomingChanges::Toggle do
context "when enabling the setting" do
let(:enabled) { true }
- before { SiteSetting.experimental_form_templates = false }
+ before { SiteSetting.enable_form_templates = false }
it "enables the specified setting" do
- expect { result }.to change { SiteSetting.experimental_form_templates }.to(true)
+ expect { result }.to change { SiteSetting.enable_form_templates }.to(true)
end
it "creates an entry in the staff action logs with correct context" do
expect { result }.to change {
UserHistory.where(
action: UserHistory.actions[:upcoming_change_toggled],
- subject: "experimental_form_templates",
+ subject: "enable_form_templates",
).count
}.by(1)
@@ -211,7 +211,7 @@ RSpec.describe UpcomingChanges::Toggle do
expect { result }.to change {
UpcomingChangeEvent.where(
event_type: :manual_opt_in,
- upcoming_change_name: "experimental_form_templates",
+ upcoming_change_name: "enable_form_templates",
).count
}.by(1)
end
@@ -229,17 +229,17 @@ RSpec.describe UpcomingChanges::Toggle do
context "when disabling the setting" do
let(:enabled) { false }
- before { SiteSetting.experimental_form_templates = true }
+ before { SiteSetting.enable_form_templates = true }
it "disables the specified setting" do
- expect { result }.to change { SiteSetting.experimental_form_templates }.to(false)
+ expect { result }.to change { SiteSetting.enable_form_templates }.to(false)
end
it "creates an entry in the staff action logs with correct context" do
expect { result }.to change {
UserHistory.where(
action: UserHistory.actions[:upcoming_change_toggled],
- subject: "experimental_form_templates",
+ subject: "enable_form_templates",
).count
}.by(1)
@@ -252,7 +252,7 @@ RSpec.describe UpcomingChanges::Toggle do
expect { result }.to change {
UpcomingChangeEvent.where(
event_type: :manual_opt_out,
- upcoming_change_name: "experimental_form_templates",
+ upcoming_change_name: "enable_form_templates",
).count
}.by(1)
end
@@ -274,17 +274,17 @@ RSpec.describe UpcomingChanges::Toggle do
context "when enabling the setting" do
let(:enabled) { true }
- before { SiteSetting.experimental_form_templates = false }
+ before { SiteSetting.enable_form_templates = false }
it "enables the specified setting" do
- expect { result }.to change { SiteSetting.experimental_form_templates }.to(true)
+ expect { result }.to change { SiteSetting.enable_form_templates }.to(true)
end
it "does not create an entry in the staff action logs" do
expect { result }.not_to change {
UserHistory.where(
action: UserHistory.actions[:upcoming_change_toggled],
- subject: "experimental_form_templates",
+ subject: "enable_form_templates",
).count
}
end
@@ -306,17 +306,17 @@ RSpec.describe UpcomingChanges::Toggle do
context "when disabling the setting" do
let(:enabled) { false }
- before { SiteSetting.experimental_form_templates = true }
+ before { SiteSetting.enable_form_templates = true }
it "disables the specified setting" do
- expect { result }.to change { SiteSetting.experimental_form_templates }.to(false)
+ expect { result }.to change { SiteSetting.enable_form_templates }.to(false)
end
it "does not create an entry in the staff action logs" do
expect { result }.not_to change {
UserHistory.where(
action: UserHistory.actions[:upcoming_change_toggled],
- subject: "experimental_form_templates",
+ subject: "enable_form_templates",
).count
}
end
diff --git a/spec/system/admin_customize_form_templates_spec.rb b/spec/system/admin_customize_form_templates_spec.rb
index 7930db53e1f..10968a045d2 100644
--- a/spec/system/admin_customize_form_templates_spec.rb
+++ b/spec/system/admin_customize_form_templates_spec.rb
@@ -9,7 +9,7 @@ describe "Admin Customize Form Templates", type: :system do
fab!(:category)
before do
- SiteSetting.experimental_form_templates = true
+ SiteSetting.enable_form_templates = true
sign_in(admin)
end
diff --git a/spec/system/admin_whats_new_spec.rb b/spec/system/admin_whats_new_spec.rb
index ae266c72e3c..42b058c5adf 100644
--- a/spec/system/admin_whats_new_spec.rb
+++ b/spec/system/admin_whats_new_spec.rb
@@ -140,7 +140,7 @@ describe "Admin What's New Page", type: :system do
"discourse_version" => "",
"created_at" => "2023-11-10T02:52:41.462Z",
"updated_at" => "2023-11-10T04:28:47.020Z",
- "related_site_setting" => "experimental_form_templates",
+ "related_site_setting" => "enable_form_templates",
"experiment" => false,
},
],
@@ -155,7 +155,7 @@ describe "Admin What's New Page", type: :system do
end
expect(page).to have_content(I18n.t("admin_js.admin.dashboard.new_features.feature_enabled"))
whats_new_page.visit
- expect(SiteSetting.experimental_form_templates).to be true
+ expect(SiteSetting.enable_form_templates).to be true
expect(whats_new_page.enable_item_toggle.checked?).to be_truthy
end
end
@@ -175,7 +175,7 @@ describe "Admin What's New Page", type: :system do
"discourse_version" => "",
"created_at" => "2023-11-10T02:52:41.462Z",
"updated_at" => "2023-11-10T04:28:47.020Z",
- "related_site_setting" => "experimental_form_templates",
+ "related_site_setting" => "enable_form_templates",
"experiment" => false,
},
],
@@ -198,7 +198,7 @@ describe "Admin What's New Page", type: :system do
"discourse_version" => "",
"created_at" => "2023-11-10T02:52:41.462Z",
"updated_at" => "2023-11-10T04:28:47.020Z",
- "related_site_setting" => "experimental_form_templates",
+ "related_site_setting" => "enable_form_templates",
"experiment" => true,
},
],
@@ -242,7 +242,7 @@ describe "Admin What's New Page", type: :system do
"discourse_version" => "",
"created_at" => "2023-11-10T02:52:41.462Z",
"updated_at" => "2023-11-10T04:28:47.020Z",
- "related_site_setting" => "experimental_form_templates",
+ "related_site_setting" => "enable_form_templates",
"experiment" => true,
},
{
diff --git a/spec/system/composer/category_templates_spec.rb b/spec/system/composer/category_templates_spec.rb
index ea205825e7b..81ceceb1179 100644
--- a/spec/system/composer/category_templates_spec.rb
+++ b/spec/system/composer/category_templates_spec.rb
@@ -218,7 +218,7 @@ describe "Composer Form Templates", type: :system do
let(:cdp) { PageObjects::CDP.new }
before do
- SiteSetting.experimental_form_templates = true
+ SiteSetting.enable_form_templates = true
SiteSetting.authorized_extensions = "*"
sign_in user
end
diff --git a/spec/system/composer/prosemirror_images_spec.rb b/spec/system/composer/prosemirror_images_spec.rb
index 8b732a097b4..309c22cbb6a 100644
--- a/spec/system/composer/prosemirror_images_spec.rb
+++ b/spec/system/composer/prosemirror_images_spec.rb
@@ -166,8 +166,8 @@ describe "Composer - ProseMirror - Images", type: :system do
end
end
- describe "auto-grid functionality with experimental_auto_grid_images" do
- before { SiteSetting.experimental_auto_grid_images = true }
+ describe "auto-grid functionality with enable_auto_grid_images" do
+ before { SiteSetting.enable_auto_grid_images = true }
it "automatically wraps 3+ uploaded images in a grid" do
open_composer
file_path_1 = file_from_fixtures("logo.png", "images").path
diff --git a/spec/system/composer/template_validation_spec.rb b/spec/system/composer/template_validation_spec.rb
index 66b30f77769..46641e712ae 100644
--- a/spec/system/composer/template_validation_spec.rb
+++ b/spec/system/composer/template_validation_spec.rb
@@ -65,7 +65,7 @@ describe "Composer Form Template Validations", type: :system do
let(:topic_title) { "A topic about Batman" }
before do
- SiteSetting.experimental_form_templates = true
+ SiteSetting.enable_form_templates = true
sign_in user
end
diff --git a/spec/system/composer_uploads_spec.rb b/spec/system/composer_uploads_spec.rb
index 5be9cbc3dcb..7b22b21f723 100644
--- a/spec/system/composer_uploads_spec.rb
+++ b/spec/system/composer_uploads_spec.rb
@@ -178,7 +178,7 @@ describe "Uploading files in the composer", type: :system do
end
context "when multiple images are uploaded" do
- before { SiteSetting.experimental_auto_grid_images = true }
+ before { SiteSetting.enable_auto_grid_images = true }
%w[en fr de].each do |locale|
before { SiteSetting.default_locale = locale }
@@ -245,7 +245,7 @@ describe "Uploading files in the composer", type: :system do
end
it "does not automatically wrap images in [grid] tags when setting is disabled" do
- SiteSetting.experimental_auto_grid_images = false
+ SiteSetting.enable_auto_grid_images = false
visit "/new-topic"
expect(composer).to be_opened
diff --git a/spec/system/edit_category_form_templates_spec.rb b/spec/system/edit_category_form_templates_spec.rb
index 55a2b9df6af..b1844ca23cd 100644
--- a/spec/system/edit_category_form_templates_spec.rb
+++ b/spec/system/edit_category_form_templates_spec.rb
@@ -12,7 +12,7 @@ describe "Edit Category Form Templates", type: :system do
let(:category_page) { PageObjects::Pages::Category.new }
before do
- SiteSetting.experimental_form_templates = true
+ SiteSetting.enable_form_templates = true
sign_in(admin)
end
diff --git a/spec/system/impersonation_spec.rb b/spec/system/impersonation_spec.rb
index b15739483e9..ff388787675 100644
--- a/spec/system/impersonation_spec.rb
+++ b/spec/system/impersonation_spec.rb
@@ -7,7 +7,7 @@ describe "Impersonation", type: :system do
let(:dialog) { PageObjects::Components::Dialog.new }
before do
- SiteSetting.experimental_impersonation = true
+ SiteSetting.impersonate_without_logout = true
sign_in(admin)
end