mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-01 23:03:14 +00: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:
parent
4198eb2789
commit
2aef71b0b8
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue