Merge pull request #10045 from overleaf/jel-new-css

[web] Load new CSS if split test enabled

GitOrigin-RevId: 87ef524affa58d931b622d2f70ca6dcff7adc53c
This commit is contained in:
Jessica Lawshe
2022-10-25 08:03:57 +00:00
committed by Copybot
parent 049d7573d8
commit ebed539e6d
6 changed files with 88 additions and 1 deletions
@@ -197,6 +197,11 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
}
res.locals.buildCssPath = function (themeModifier = '') {
if (
res.locals.splitTestVariants?.['design-system-updates'] === 'enabled'
) {
themeModifier = `main-${themeModifier}`
}
return res.locals.buildStylesheetPath(`${themeModifier}style.css`)
}
+4 -1
View File
@@ -79,7 +79,10 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
webRouter.get(
'*',
expressify(
SplitTestMiddleware.loadAssignmentsInLocals(['unified-navigation'])
SplitTestMiddleware.loadAssignmentsInLocals([
'unified-navigation',
'design-system-updates',
])
)
)