Skip to content

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

FEATURE: Enable system Horizon (#33374)

Krzysztof Kotlarek912c4f855a7c
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 5eab5be55b0..677fa9df611 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -4045,7 +4045,7 @@ experimental:
default: false
experimental_system_themes:
type: list
- default: ""
+ default: "horizon"
hidden: true
allow_any: false
choices:
diff --git a/db/migrate/20250627022651_enable_horizon_for_existing_sites.rb b/db/migrate/20250627022651_enable_horizon_for_existing_sites.rb
new file mode 100644
index 00000000000..8956c9e46ff
--- /dev/null
+++ b/db/migrate/20250627022651_enable_horizon_for_existing_sites.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+class EnableHorizonForExistingSites < ActiveRecord::Migration[7.2]
+ def change
+ execute <<~SQL if Migration::Helpers.existing_site?
+ INSERT INTO site_settings(name, data_type, value, created_at, updated_at)
+ VALUES('experimental_system_themes', 8, 'horizon', NOW(), NOW())
+ ON CONFLICT (name) DO NOTHING
+ SQL
+ end
+end
diff --git a/spec/requests/admin/color_schemes_controller_spec.rb b/spec/requests/admin/color_schemes_controller_spec.rb
index 02d61ab28f6..c7c7ca09462 100644
--- a/spec/requests/admin/color_schemes_controller_spec.rb
+++ b/spec/requests/admin/color_schemes_controller_spec.rb
@@ -33,6 +33,7 @@ RSpec.describe Admin::ColorSchemesController do
end
it "filters colors belonging to experimental system themes" do
+ SiteSetting.experimental_system_themes = ""
get "/admin/color_schemes.json"
expect(response.status).to eq(200)
scheme_names = response.parsed_body.map { |scheme| scheme["name"] }
diff --git a/spec/requests/admin/themes_controller_spec.rb b/spec/requests/admin/themes_controller_spec.rb
index 558dcbaf675..285d487d781 100644
--- a/spec/requests/admin/themes_controller_spec.rb
+++ b/spec/requests/admin/themes_controller_spec.rb
@@ -478,6 +478,7 @@ RSpec.describe Admin::ThemesController do
end
it "filters experimental system themes" do
+ SiteSetting.experimental_system_themes = ""
get "/admin/themes.json"
expect(response.status).to eq(200)
theme_names = response.parsed_body["themes"].map { |theme| theme[:name] }