mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #9012 from overleaf/ab-dictionary-editor-query-override-fix
[web] Remove usage of shouldDisplayFeature superseding split test query param override GitOrigin-RevId: 6e046e7fd26140b2bd721e2f2ec9303cc2e604b8
This commit is contained in:
@@ -1111,6 +1111,7 @@ const ProjectController = {
|
||||
})
|
||||
}
|
||||
|
||||
// should not be used in place of split tests query param overrides (?my-split-test-name=my-variant)
|
||||
function shouldDisplayFeature(name, variantFlag) {
|
||||
if (req.query && req.query[name]) {
|
||||
return req.query[name] === 'true'
|
||||
@@ -1135,8 +1136,7 @@ const ProjectController = {
|
||||
}
|
||||
|
||||
const showNewSourceEditorOption =
|
||||
(newSourceEditorAssignment &&
|
||||
newSourceEditorAssignment.variant === 'codemirror') ||
|
||||
newSourceEditorAssignment?.variant === 'codemirror' ||
|
||||
user.betaProgram ||
|
||||
shouldDisplayFeature('new_source_editor', false) // also allow override via ?new_source_editor=true
|
||||
|
||||
@@ -1146,10 +1146,7 @@ const ProjectController = {
|
||||
|
||||
const dictionaryEditorEnabled =
|
||||
!Features.hasFeature('saas') ||
|
||||
shouldDisplayFeature(
|
||||
'dictionary-editor',
|
||||
dictionaryEditorAssignment.variant === 'enabled'
|
||||
)
|
||||
dictionaryEditorAssignment?.variant === 'enabled'
|
||||
|
||||
// Persistent upgrade prompts
|
||||
// in header & in share project modal
|
||||
|
||||
Reference in New Issue
Block a user