From c817c5ed98985fcd9a874a2f65f73ceaa493df4c Mon Sep 17 00:00:00 2001 From: Tim Down <158919+timdown@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:31:49 +0100 Subject: [PATCH] Merge pull request #20667 from overleaf/td-bs5-always-enabled-option Add option to always enable BS5 for a particular page GitOrigin-RevId: f338c4f4be87aae1a2a239a2b36b738616aabaed --- services/web/app/views/layout-base.pug | 4 ++-- .../web/app/views/layout-website-redesign-bootstrap-5.pug | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/services/web/app/views/layout-base.pug b/services/web/app/views/layout-base.pug index b567ada69a..493024b39c 100644 --- a/services/web/app/views/layout-base.pug +++ b/services/web/app/views/layout-base.pug @@ -7,7 +7,7 @@ html( ) - metadata = metadata || {} - let bootstrap5PageStatus = 'disabled' // One of 'disabled', 'enabled', and 'queryStringOnly' - - let bootstrap5PageSplitTest = '' + - let bootstrap5PageSplitTest = '' // Limits Bootstrap 5 usage on this page to users with an assignment of "enabled" for the specified split test. If left empty and bootstrap5PageStatus is "enabled", the page always uses Bootstrap 5. - let isWebsiteRedesign = false block entrypointVar @@ -17,7 +17,7 @@ html( head include ./_metadata.pug - - const bootstrapVersion = bootstrap5PageStatus !== 'disabled' && (bootstrap5Override || (bootstrap5PageStatus === 'enabled' && splitTestVariants[bootstrap5PageSplitTest] === 'enabled')) ? 5 : 3 + - const bootstrapVersion = bootstrap5PageStatus !== 'disabled' && (bootstrap5Override || (bootstrap5PageStatus === 'enabled' && (bootstrap5PageSplitTest === '' || splitTestVariants[bootstrap5PageSplitTest] === 'enabled'))) ? 5 : 3 - const ieeeStylesheetEnabled = splitTestVariants?.['ieee-stylesheet'] !== 'disabled' //- Stylesheet diff --git a/services/web/app/views/layout-website-redesign-bootstrap-5.pug b/services/web/app/views/layout-website-redesign-bootstrap-5.pug index 12f01ac953..d1354a617d 100644 --- a/services/web/app/views/layout-website-redesign-bootstrap-5.pug +++ b/services/web/app/views/layout-website-redesign-bootstrap-5.pug @@ -6,7 +6,6 @@ include ./_mixins/bootstrap_js block entrypointVar - entrypoint = 'marketing' - bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly' - - bootstrap5Override = true - isWebsiteRedesign = true block body @@ -27,4 +26,4 @@ block body != moduleIncludes("contactModal-marketing-bootstrap-5", locals) block prepend foot-scripts - +bootstrap-js(5) \ No newline at end of file + +bootstrap-js(5)