mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-09 01:32:39 +00:00
Merge pull request #18764 from overleaf/td-bs5-dashboard-feature-flag
Create new feature flag for BS5 project dashboard page GitOrigin-RevId: a523bd7df94c411805ac2f5234135bc7a56d25bb
This commit is contained in:
parent
8897e439ae
commit
956aad7e43
5 changed files with 24 additions and 15 deletions
|
@ -424,9 +424,14 @@ async function projectListPage(req, res, next) {
|
|||
)
|
||||
}
|
||||
|
||||
// Get the user's assignment for the Bootstrap 5 split test, which populates
|
||||
// splitTestVariants with a value for 'bootstrap-5' and allows Pug to read it
|
||||
await SplitTestHandler.promises.getAssignment(req, res, 'bootstrap-5')
|
||||
// Get the user's assignment for this page's Bootstrap 5 split test, which
|
||||
// populates splitTestVariants with a value for the split test name and allows
|
||||
// Pug to read it
|
||||
await SplitTestHandler.promises.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'bootstrap-5-project-dashboard'
|
||||
)
|
||||
|
||||
res.render('project/list-react', {
|
||||
title: 'your_projects',
|
||||
|
|
|
@ -138,8 +138,9 @@ async function settingsPage(req, res) {
|
|||
)
|
||||
}
|
||||
|
||||
// Get the user's assignment for the Bootstrap 5 split test, which populates
|
||||
// splitTestVariants with a value for 'bootstrap-5' and allows Pug to read it
|
||||
// Get the user's assignment for this page's Bootstrap 5 split test, which
|
||||
// populates splitTestVariants with a value for the split test name and allows
|
||||
// Pug to read it
|
||||
await SplitTestHandler.promises.getAssignment(req, res, 'bootstrap-5')
|
||||
|
||||
res.render('user/settings', {
|
||||
|
|
|
@ -7,6 +7,7 @@ html(
|
|||
)
|
||||
- metadata = metadata || {}
|
||||
- let bootstrap5PageStatus = 'disabled' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||
- let bootstrap5PageSplitTest = ''
|
||||
|
||||
block entrypointVar
|
||||
|
||||
|
@ -14,8 +15,8 @@ html(
|
|||
|
||||
head
|
||||
include ./_metadata.pug
|
||||
|
||||
- const bootstrapVersion = bootstrap5PageStatus !== 'disabled' && (bootstrap5Override || (bootstrap5PageStatus === 'enabled' && splitTestVariants['bootstrap-5'] === 'enabled')) ? 5 : 3
|
||||
|
||||
- const bootstrapVersion = bootstrap5PageStatus !== 'disabled' && (bootstrap5Override || (bootstrap5PageStatus === 'enabled' && splitTestVariants[bootstrap5PageSplitTest] === 'enabled')) ? 5 : 3
|
||||
- const ieeeStylesheetEnabled = splitTestVariants?.['ieee-stylesheet'] !== 'disabled'
|
||||
|
||||
//- Stylesheet
|
||||
|
@ -26,17 +27,17 @@ html(
|
|||
|
||||
block _headLinks
|
||||
|
||||
if (typeof(suppressRelAlternateLinks) == "undefined")
|
||||
if (typeof suppressRelAlternateLinks == "undefined")
|
||||
if settings.i18n.subdomainLang
|
||||
each subdomainDetails in settings.i18n.subdomainLang
|
||||
if !subdomainDetails.hide
|
||||
link(rel="alternate", href=subdomainDetails.url+currentUrl, hreflang=subdomainDetails.lngCode)
|
||||
|
||||
link(rel="alternate", href=subdomainDetails.url + currentUrl, hreflang=subdomainDetails.lngCode)
|
||||
|
||||
if (entrypoint !== 'marketing')
|
||||
link(rel="preload", href=buildJsPath(currentLngCode + "-json.js"), as="script", nonce=scriptNonce)
|
||||
|
||||
//- Scripts
|
||||
if (typeof(suppressGoogleAnalytics) == "undefined")
|
||||
if (typeof suppressGoogleAnalytics == "undefined")
|
||||
include _google_analytics
|
||||
|
||||
block meta
|
||||
|
@ -58,7 +59,7 @@ html(
|
|||
meta(name="ol-splitTestVariants" data-type="json" content=splitTestVariants || {})
|
||||
meta(name="ol-splitTestInfo" data-type="json" content=splitTestInfo || {})
|
||||
|
||||
if (typeof(settings.algolia) != "undefined")
|
||||
if (typeof settings.algolia != "undefined")
|
||||
meta(name="ol-algolia" data-type="json" content={
|
||||
appId: settings.algolia.app_id,
|
||||
apiKey: settings.algolia.read_only_api_key,
|
||||
|
@ -74,9 +75,9 @@ html(
|
|||
|
||||
body(class=(showThinFooter ? 'thin-footer' : undefined))
|
||||
if(settings.recaptcha && settings.recaptcha.siteKeyV3)
|
||||
script(type="text/javascript", nonce=scriptNonce, src="https://www.recaptcha.net/recaptcha/api.js?render="+settings.recaptcha.siteKeyV3, defer=deferScripts)
|
||||
script(type="text/javascript", nonce=scriptNonce, src="https://www.recaptcha.net/recaptcha/api.js?render=" + settings.recaptcha.siteKeyV3, defer=deferScripts)
|
||||
|
||||
if (typeof(suppressSkipToContent) == "undefined")
|
||||
if (typeof suppressSkipToContent == "undefined")
|
||||
a(class="skip-to-content" href="#main-content") #{translate('skip_to_content')}
|
||||
|
||||
block body
|
||||
|
|
|
@ -5,7 +5,8 @@ block entrypointVar
|
|||
|
||||
block vars
|
||||
- var suppressNavContentLinks = true
|
||||
- bootstrap5PageStatus = 'queryStringOnly' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||
- bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||
- bootstrap5PageSplitTest = 'bootstrap-5-project-dashboard'
|
||||
|
||||
block append meta
|
||||
meta(name="ol-usersBestSubscription" data-type="json" content=usersBestSubscription)
|
||||
|
|
|
@ -5,6 +5,7 @@ block entrypointVar
|
|||
|
||||
block vars
|
||||
- bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||
- bootstrap5PageSplitTest = 'bootstrap-5'
|
||||
|
||||
block append meta
|
||||
meta(name="ol-hasPassword" data-type="boolean" content=hasPassword)
|
||||
|
|
Loading…
Add table
Reference in a new issue