Skip to content

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

DEV: enable new lightbox by default (#35625)

David Battersby29356fa13664
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 08a4a5f1113..efc7a2130ee 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -2753,6 +2753,7 @@ en:
experimental_auto_grid_images: "Automatically wraps images in [grid] tags when 3 or more images are uploaded in the composer."
experimental_impersonation: "Impersonate a user without having to log out of your admin account."
experimental_impersonation_time_limit_minutes: "How long before an impersonation session is automatically ended."
+ experimental_lightbox: "Use PhotoSwipe to lightbox larger images."
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"
about_page_hidden_groups: "Do not show members of specific groups on the /about page."
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 4f72e772cd3..e89ea639eaa 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -4211,8 +4211,7 @@ experimental:
area: "experimental"
experimental_lightbox:
client: true
- default: false
- hidden: true
+ default: true
area: "experimental"
show_preview_for_form_templates:
client: true
diff --git a/frontend/discourse/tests/acceptance/lightbox-test.js b/frontend/discourse/tests/acceptance/lightbox-test.js
index e5a797b15e3..9769e0da551 100644
--- a/frontend/discourse/tests/acceptance/lightbox-test.js
+++ b/frontend/discourse/tests/acceptance/lightbox-test.js
@@ -27,6 +27,8 @@ acceptance("Lightbox", function (needs) {
});
test("Shows download and direct URL", async function (assert) {
+ this.siteSettings.experimental_lightbox = false;
+
await visit("/t/internationalization-localization/280");
await click(".lightbox");
@@ -51,6 +53,8 @@ acceptance("Lightbox", function (needs) {
});
test("Correctly escapes image caption", async function (assert) {
+ this.siteSettings.experimental_lightbox = false;
+
await visit("/t/internationalization-localization/280");
await click(".lightbox");
diff --git a/frontend/discourse/tests/integration/components/uppy-image-uploader-test.gjs b/frontend/discourse/tests/integration/components/uppy-image-uploader-test.gjs
index 090b9c7fa29..dda96f47f60 100644
--- a/frontend/discourse/tests/integration/components/uppy-image-uploader-test.gjs
+++ b/frontend/discourse/tests/integration/components/uppy-image-uploader-test.gjs
@@ -7,6 +7,8 @@ module("Integration | Component | uppy-image-uploader", function (hooks) {
setupRenderingTest(hooks);
test("with image", async function (assert) {
+ this.siteSettings.experimental_lightbox = false;
+
await render(
<template>
<UppyImageUploader
diff --git a/plugins/chat/spec/system/channel_message_upload_spec.rb b/plugins/chat/spec/system/channel_message_upload_spec.rb
index afe3c9534aa..1063d8abc5f 100644
--- a/plugins/chat/spec/system/channel_message_upload_spec.rb
+++ b/plugins/chat/spec/system/channel_message_upload_spec.rb
@@ -25,6 +25,7 @@ RSpec.describe "Channel message selection", type: :system do
end
it "can collapse/expand an image and still have lightbox working" do
+ SiteSetting.experimental_lightbox = false
chat.visit_channel(channel_1)
find(".chat-message-collapser-button").click
diff --git a/spec/system/admin_about_config_area_spec.rb b/spec/system/admin_about_config_area_spec.rb
index 6ac1fe06af9..9643c189b57 100644
--- a/spec/system/admin_about_config_area_spec.rb
+++ b/spec/system/admin_about_config_area_spec.rb
@@ -88,6 +88,7 @@ describe "Admin About Config Area Page", type: :system do
describe "the general settings card" do
it "can saves its fields to their corresponding site settings" do
+ SiteSetting.experimental_lightbox = false
config_area.visit
image_file = file_from_fixtures("logo.png", "images")