Merge pull request #12316 from overleaf/td-history-view-shell-and-split-test
Add empty shell for React history view, viewable based on split test GitOrigin-RevId: 97241d56a052648c7a0d293d323dad4b00ad4159
This commit is contained in:
@@ -1054,6 +1054,21 @@ const ProjectController = {
|
||||
}
|
||||
)
|
||||
},
|
||||
historyViewAssignment(cb) {
|
||||
SplitTestHandler.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'history-view',
|
||||
(error, assignment) => {
|
||||
// do not fail editor load if assignment fails
|
||||
if (error) {
|
||||
cb(null, { variant: 'default' })
|
||||
} else {
|
||||
cb(null, assignment)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
accessCheckForOldCompileDomainAssigment(cb) {
|
||||
SplitTestHandler.getAssignment(
|
||||
req,
|
||||
@@ -1138,6 +1153,7 @@ const ProjectController = {
|
||||
editorLeftMenuAssignment,
|
||||
richTextAssignment,
|
||||
onboardingVideoTourAssignment,
|
||||
historyViewAssignment,
|
||||
}
|
||||
) => {
|
||||
if (err != null) {
|
||||
@@ -1333,6 +1349,7 @@ const ProjectController = {
|
||||
showCM6SwitchAwaySurvey: Settings.showCM6SwitchAwaySurvey,
|
||||
richTextVariant: richTextAssignment.variant,
|
||||
showOnboardingVideoTour,
|
||||
historyViewReact: historyViewAssignment.variant === 'react',
|
||||
})
|
||||
timer.done()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
aside.editor-sidebar.full-size#history-file-tree(
|
||||
ng-show="history.isReact && ui.view == 'history'"
|
||||
)
|
||||
@@ -13,12 +13,13 @@ else
|
||||
.ui-layout-center
|
||||
include ./header-react
|
||||
|
||||
include ./history/toolbarV2.pug
|
||||
if (!historyViewReact)
|
||||
include ./history/toolbarV2.pug
|
||||
|
||||
main#ide-body(
|
||||
ng-cloak,
|
||||
role="main",
|
||||
ng-class="{ 'ide-history-open' : (ui.view == 'history' && history.isV2) }",
|
||||
ng-class="{ 'ide-history-open' : (ui.view == 'history' && history.isV2 && !history.isReact) }",
|
||||
layout="main",
|
||||
ng-hide="state.loading",
|
||||
resize-on="layout:chat:resize,history:toggle,layout:flat-screen:toggle,south-pane-toggled",
|
||||
@@ -33,13 +34,19 @@ else
|
||||
)
|
||||
.ui-layout-west
|
||||
include ./file-tree-react
|
||||
include ./file-tree-history
|
||||
include ./history/fileTreeV2
|
||||
if (historyViewReact)
|
||||
include ./file-tree-history-react
|
||||
else
|
||||
include ./file-tree-history
|
||||
include ./history/fileTreeV2
|
||||
|
||||
.ui-layout-center
|
||||
include ./editor
|
||||
|
||||
include ./history
|
||||
if (historyViewReact)
|
||||
history-root
|
||||
else
|
||||
include ./history
|
||||
|
||||
if !isRestrictedTokenMember
|
||||
.ui-layout-east
|
||||
|
||||
Reference in New Issue
Block a user