From 9e8d10bd8e585a9898e2abdf68ec379a8bfd252c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Thu, 1 Sep 2022 10:54:04 +0200 Subject: [PATCH] Merge pull request #9431 from overleaf/td-galileo-query-string Add galileoFeatures query string parameter GitOrigin-RevId: 19022b95490e5e664872102ed2b4ab156f955364 --- services/web/app/src/Features/Project/ProjectController.js | 7 +++++++ services/web/app/views/project/editor/meta.pug | 1 + 2 files changed, 8 insertions(+) diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 6439cc4d11..a79a5ab235 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -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 }, diff --git a/services/web/app/views/project/editor/meta.pug b/services/web/app/views/project/editor/meta.pug index 626dab6731..e91e219df4 100644 --- a/services/web/app/views/project/editor/meta.pug +++ b/services/web/app/views/project/editor/meta.pug @@ -23,6 +23,7 @@ meta(name="ol-debugPdfDetach" data-type="boolean" content=debugPdfDetach) meta(name="ol-showNewSourceEditorOption" data-type="boolean" content=showNewSourceEditorOption) meta(name="ol-showSymbolPalette" data-type="boolean" content=showSymbolPalette) meta(name="ol-galileoEnabled" data-type="boolean" content=galileoEnabled) +meta(name="ol-galileoFeatures" data-type="json" content=galileoFeatures) meta(name="ol-detachRole" data-type="string" content=detachRole) meta(name="ol-showUpgradePrompt" data-type="boolean" content=showUpgradePrompt) meta(name="ol-showStopOnFirstError" data-type="boolean" content=showStopOnFirstError)