Remove editor split tests (#14985)

* Remove source-editor-toolbar split test
* Remove editor-left-menu split test
* Remove paste-html split test
* Remove figure-modal split test
* Remove rich-text split test
* Remove table-generator split test

GitOrigin-RevId: e3fe415b81ff0135d8764cd3f3c91b1dd4a77cf0
This commit is contained in:
Alf Eaton
2023-10-03 15:11:56 +01:00
committed by Copybot
parent d57ed3627b
commit 1b27d1b60f
18 changed files with 165 additions and 214 deletions
@@ -636,49 +636,6 @@ const ProjectController = {
}
)
},
editorLeftMenuAssignment(cb) {
SplitTestHandler.getAssignment(
req,
res,
'editor-left-menu',
(error, assignment) => {
// do not fail editor load if assignment fails
if (error) {
cb(null, { variant: 'default' })
} else {
cb(null, assignment)
}
}
)
},
// this is only needed until the survey link is removed from the toolbar
richTextAssignment(cb) {
SplitTestHandler.getAssignment(
req,
res,
'rich-text',
(error, assignment) => {
// do not fail editor load if assignment fails
if (error) {
cb(null, { variant: 'default' })
} else {
cb(null, assignment)
}
}
)
},
figureModalAssignment(cb) {
SplitTestHandler.getAssignment(req, res, 'figure-modal', () => {
// We'll pick up the assignment from the res.locals assignment.
cb()
})
},
tableGeneratorAssignment(cb) {
SplitTestHandler.getAssignment(req, res, 'table-generator', () => {
// We'll pick up the assignment from the res.locals assignment.
cb()
})
},
tableGeneratorPromotionAssignment(cb) {
SplitTestHandler.getAssignment(
req,
@@ -690,27 +647,6 @@ const ProjectController = {
}
)
},
pasteHtmlAssignment(cb) {
SplitTestHandler.getAssignment(req, res, 'paste-html', () => {
// We'll pick up the assignment from the res.locals assignment.
cb()
})
},
sourceEditorToolbarAssigment(cb) {
SplitTestHandler.getAssignment(
req,
res,
'source-editor-toolbar',
(error, assignment) => {
// do not fail editor load if assignment fails
if (error) {
cb(null, { variant: 'default' })
} else {
cb(null, assignment)
}
}
)
},
historyViewAssignment(cb) {
SplitTestHandler.getAssignment(
req,
@@ -761,8 +697,6 @@ const ProjectController = {
isInvitedMember,
brandVariation,
pdfjsAssignment,
editorLeftMenuAssignment,
sourceEditorToolbarAssigment,
historyViewAssignment,
reviewPanelAssignment,
projectTags,
@@ -853,9 +787,6 @@ const ProjectController = {
// Allow override via legacy_source_editor=true in query string
shouldDisplayFeature('legacy_source_editor')
const editorLeftMenuReact =
editorLeftMenuAssignment?.variant === 'react'
const showSymbolPalette =
!Features.hasFeature('saas') ||
(user.features && user.features.symbolPalette)
@@ -889,7 +820,6 @@ const ProjectController = {
bodyClasses: ['editor'],
project_id: project._id,
projectName: project.name,
editorLeftMenuReact,
user: {
id: userId,
email: user.email,
@@ -943,9 +873,7 @@ const ProjectController = {
pdfjsVariant: pdfjsAssignment.variant,
debugPdfDetach,
showLegacySourceEditor,
showSourceToolbar:
!showLegacySourceEditor &&
sourceEditorToolbarAssigment.variant === 'enabled',
showSourceToolbar: !showLegacySourceEditor,
showSymbolPalette,
symbolPaletteAvailable: Features.hasFeature('symbol-palette'),
detachRole,