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:
@@ -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`)
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,10 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
webRouter.get(
|
||||
'*',
|
||||
expressify(
|
||||
SplitTestMiddleware.loadAssignmentsInLocals(['unified-navigation'])
|
||||
SplitTestMiddleware.loadAssignmentsInLocals([
|
||||
'unified-navigation',
|
||||
'design-system-updates',
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user