Merge pull request #9431 from overleaf/td-galileo-query-string

Add galileoFeatures query string parameter

GitOrigin-RevId: 19022b95490e5e664872102ed2b4ab156f955364
This commit is contained in:
Timothée Alby
2022-09-01 10:54:04 +02:00
committed by Copybot
parent 25725bd79f
commit 9e8d10bd8e
2 changed files with 8 additions and 0 deletions

View File

@@ -1116,7 +1116,13 @@ const ProjectController = {
!Features.hasFeature('saas') ||
(user.features && user.features.symbolPalette)
// It would be nice if this could go in the Galileo module but
// nothing else does that
const galileoEnabled = shouldDisplayFeature('galileo')
const galileoFeatures =
req.query && 'galileoFeatures' in req.query
? req.query.galileoFeatures.split(',').map(f => f.trim())
: ['all']
const dictionaryEditorEnabled =
!Features.hasFeature('saas') ||
@@ -1200,6 +1206,7 @@ const ProjectController = {
showNewSourceEditorOption,
showSymbolPalette,
galileoEnabled,
galileoFeatures,
showStopOnFirstError,
detachRole,
metadata: { viewport: false },