Skip to content

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

DEV: remove splash_screen site setting (#39758)

Kris0cfc928ad0a9
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 780ee38bebf..e73059f906b 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -89,6 +89,11 @@ class ApplicationController < ActionController::Base
end
helper_method :use_crawler_layout?
+ def include_splash_screen?
+ !Rails.env.test?
+ end
+ helper_method :include_splash_screen?
+
def perform_refresh_session
refresh_session(current_user) unless @readonly_mode
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c5d9fbbd28e..6ecf719a9ec 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -528,11 +528,6 @@ module ApplicationHelper
end
end
- def include_splash_screen?
- # A bit basic for now but will be expanded later
- SiteSetting.splash_screen
- end
-
def custom_splash_screen_enabled?
@custom_splash_screen_enabled ||= SiteSetting.splash_screen_image.is_a?(Upload)
end
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index d38f36b0ca6..eb764c579d9 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -2764,7 +2764,6 @@ en:
welcome_banner_page_visibility: "Determines on which pages the welcome banner will appear."
welcome_banner_text_color: "When the 'Welcome banner image' setting has been configured, use this setting to change the banner text color to ensure it remains readable. When left blank or when no image has been uploaded, the active theme controls the color."
- splash_screen: "Displays a temporary loading screen while site assets load"
splash_screen_image: "An SVG image to display on the splash screen while the site loads. Animated SVGs should only use CSS transform or opacity animations. Use unique names for CSS classes and keyframes. You can use var(--primary), var(--secondary), and var(--tertiary) to reference theme colors."
navigation_menu: "Specify sidebar or header dropdown as the main navigation menu for your site. Sidebar is recommended."
default_navigation_menu_categories: "Selected categories will be displayed under Navigation Menu's Categories section by default."
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 0425279aaf7..c80d1d3e127 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -3901,10 +3901,6 @@ uncategorized:
default: false
area: "users"
- splash_screen:
- default: true
- area: "interface"
-
splash_screen_image:
default: ""
type: upload
diff --git a/db/migrate/20260505161704_drop_splash_screen_site_setting.rb b/db/migrate/20260505161704_drop_splash_screen_site_setting.rb
new file mode 100644
index 00000000000..ede74edb466
--- /dev/null
+++ b/db/migrate/20260505161704_drop_splash_screen_site_setting.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+class DropSplashScreenSiteSetting < ActiveRecord::Migration[8.0]
+ def up
+ execute <<~SQL
+ DELETE FROM site_settings
+ WHERE name = 'splash_screen'
+ SQL
+ end
+
+ def down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
diff --git a/spec/requests/application_controller_spec.rb b/spec/requests/application_controller_spec.rb
index a613130f595..f7865e274f5 100644
--- a/spec/requests/application_controller_spec.rb
+++ b/spec/requests/application_controller_spec.rb
@@ -760,20 +760,18 @@ RSpec.describe ApplicationController do
describe "splash_screen" do
let(:admin) { Fabricate(:admin) }
- before { admin }
+ before do
+ admin
+ allow_any_instance_of(ApplicationController).to receive(:include_splash_screen?).and_return(
+ true,
+ )
+ end
- it "adds a preloader splash screen when enabled" do
+ it "adds a preloader splash screen" do
get "/"
expect(response.status).to eq(200)
expect(response.body).to include("d-splash")
-
- SiteSetting.splash_screen = false
-
- get "/"
-
- expect(response.status).to eq(200)
- expect(response.body).not_to include("d-splash")
end
context "with color schemes" do
diff --git a/spec/support/system_helpers.rb b/spec/support/system_helpers.rb
index cbeed423fdf..c6278edaf21 100644
--- a/spec/support/system_helpers.rb
+++ b/spec/support/system_helpers.rb
@@ -70,7 +70,6 @@ module SystemHelpers
SiteSetting.port = Capybara.server_port
SiteSetting.external_system_avatars_url = ""
SiteSetting.enable_user_tips = false
- SiteSetting.splash_screen = false
SiteSetting.allowed_internal_hosts =
(
SiteSetting.allowed_internal_hosts.to_s.split("|") +