Merge pull request #18590 from overleaf/td-ieee-editor-remove-blue

Disable IEEE stylesheet in IEEE editor based on feature flag

GitOrigin-RevId: 09b203e3220a868d5f0a0e413bdc4d3ff7a1792e
This commit is contained in:
Tim Down 2024-05-30 14:41:53 +01:00 committed by Copybot
parent d209c107c5
commit 1b247347e7
3 changed files with 9 additions and 3 deletions

View file

@ -335,6 +335,7 @@ const _ProjectController = {
'table-generator-promotion',
'track-pdf-download',
!anonymous && 'writefull-oauth-promotion',
'ieee-stylesheet',
].filter(Boolean)
const responses = await pProps(

View file

@ -186,12 +186,16 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
res.locals.isIEEE = brandVariation =>
brandVariation?.brand_id === IEEE_BRAND_ID
res.locals.getCssThemeModifier = function (userSettings, brandVariation) {
res.locals.getCssThemeModifier = function (
userSettings,
brandVariation,
ieeeStylesheetEnabled
) {
// Themes only exist in OL v2
if (Settings.overleaf != null) {
// The IEEE theme takes precedence over the user personal setting, i.e. a user with
// a theme setting of "light" will still get the IEE theme in IEEE branded projects.
if (res.locals.isIEEE(brandVariation)) {
if (ieeeStylesheetEnabled && res.locals.isIEEE(brandVariation)) {
return 'ieee-'
} else if (userSettings && userSettings.overallTheme != null) {
return userSettings.overallTheme

View file

@ -16,9 +16,10 @@ html(
include ./_metadata.pug
- const bootstrapVersion = bootstrap5PageStatus !== 'disabled' && (bootstrap5Override || (bootstrap5PageStatus === 'enabled' && splitTestVariants['bootstrap-5'] === 'enabled')) ? 5 : 3
- const ieeeStylesheetEnabled = splitTestVariants?.['ieee-stylesheet'] !== 'disabled'
//- Stylesheet
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation), bootstrapVersion), id="main-stylesheet")
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation, ieeeStylesheetEnabled), bootstrapVersion), id="main-stylesheet")
block css
each file in entrypointStyles(entrypoint)
link(rel='stylesheet', href=file)