Merge pull request #8073 from overleaf/ta-td-dictionary

Add UI to Remove Words from Dictionary

GitOrigin-RevId: a28d865e3c968d6fff113237fcf4143b77af046e
This commit is contained in:
Miguel Serrano
2022-05-25 08:09:45 +00:00
committed by Copybot
parent 5676ec2eed
commit 430b7528b2
14 changed files with 281 additions and 1 deletions
@@ -893,6 +893,22 @@ const ProjectController = {
}
)
},
dictionaryEditorAssignment(cb) {
SplitTestHandler.getAssignment(
req,
res,
'dictionary-editor',
{},
(error, assignment) => {
// do not fail editor load if assignment fails
if (error) {
cb(null, { variant: 'default' })
} else {
cb(null, assignment)
}
}
)
},
persistentUpgradePromptsAssignment(cb) {
SplitTestHandler.getAssignment(
req,
@@ -923,6 +939,7 @@ const ProjectController = {
newSourceEditorAssignment,
pdfDetachAssignment,
pdfjsAssignment,
dictionaryEditorAssignment,
persistentUpgradePromptsAssignment,
}
) => {
@@ -1029,6 +1046,11 @@ const ProjectController = {
!Features.hasFeature('saas') ||
(user.features && user.features.symbolPalette)
const dictionaryEditorEnabled = shouldDisplayFeature(
'dictionary-editor',
dictionaryEditorAssignment.variant === 'enabled'
)
// Persistent upgrade prompts
const showHeaderUpgradePrompt =
persistentUpgradePromptsAssignment.variant ===
@@ -1098,6 +1120,7 @@ const ProjectController = {
wsUrl,
showSupport: Features.hasFeature('support'),
pdfjsVariant: pdfjsAssignment.variant,
dictionaryEditorEnabled,
showPdfDetach,
debugPdfDetach,
showNewSourceEditorOption,