Merge pull request #5655 from overleaf/jel-detach-feature-flag

Make showNewPdfPreview a dependency of showPdfDetach

GitOrigin-RevId: 2bb2f5cd8b2cf68a28e8979713c08c0ceef33fa5
This commit is contained in:
Jessica Lawshe
2021-11-04 09:03:51 +00:00
committed by Copybot
parent 3ad686c30b
commit b90b7c92ac
2 changed files with 102 additions and 8 deletions
@@ -819,6 +819,20 @@ const ProjectController = {
return shouldDisplayFeature('enable_pdf_caching', false)
}
let showNewPdfPreview = shouldDisplayFeature(
'new_pdf_preview',
user.alphaProgram
)
const showPdfDetach = shouldDisplayFeature(
'pdf_detach',
user.alphaProgram
)
if (showPdfDetach) {
showNewPdfPreview = true
}
res.render('project/editor', {
title: project.name,
priority_title: true,
@@ -881,14 +895,8 @@ const ProjectController = {
'new_navigation_ui',
true
),
showPdfDetach: shouldDisplayFeature(
'pdf_detach',
user.alphaProgram
),
showNewPdfPreview: shouldDisplayFeature(
'new_pdf_preview',
user.alphaProgram
),
showPdfDetach,
showNewPdfPreview,
showSymbolPalette: shouldDisplayFeature(
'symbol_palette',
user.alphaProgram || user.betaProgram