mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 05:42:55 +00:00
Merge pull request #15262 from overleaf/td-ide-page-feature-flag
Add IDE page split test handling GitOrigin-RevId: 911e6d842ad473fcdb99d9715aeea18f02907a99
This commit is contained in:
parent
a39a3286b4
commit
ec085a0807
1 changed files with 18 additions and 1 deletions
|
@ -678,6 +678,21 @@ const ProjectController = {
|
|||
}
|
||||
)
|
||||
},
|
||||
idePageAssignment(cb) {
|
||||
SplitTestHandler.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'ide-page',
|
||||
(error, assignment) => {
|
||||
// do not fail editor load if assignment fails
|
||||
if (error) {
|
||||
cb(null, { variant: 'default' })
|
||||
} else {
|
||||
cb(null, assignment)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
projectTags(cb) {
|
||||
if (!userId) {
|
||||
return cb(null, [])
|
||||
|
@ -700,6 +715,7 @@ const ProjectController = {
|
|||
pdfjsAssignment,
|
||||
historyViewAssignment,
|
||||
reviewPanelAssignment,
|
||||
idePageAssignment,
|
||||
projectTags,
|
||||
}
|
||||
) => {
|
||||
|
@ -805,7 +821,7 @@ const ProjectController = {
|
|||
!Features.hasFeature('saas') ||
|
||||
req.query?.personal_access_token === 'true'
|
||||
|
||||
const idePageReact = req.query?.['ide-page'] === 'react'
|
||||
const idePageReact = idePageAssignment.variant === 'react'
|
||||
|
||||
const template =
|
||||
detachRole === 'detached'
|
||||
|
@ -885,6 +901,7 @@ const ProjectController = {
|
|||
showCM6SwitchAwaySurvey: Settings.showCM6SwitchAwaySurvey,
|
||||
historyViewReact: historyViewAssignment.variant === 'react',
|
||||
isReviewPanelReact: reviewPanelAssignment.variant === 'react',
|
||||
idePageReact,
|
||||
showPersonalAccessToken,
|
||||
hasTrackChangesFeature: Features.hasFeature('track-changes'),
|
||||
projectTags,
|
||||
|
|
Loading…
Reference in a new issue