[web] Compile time warning split test (#8813)

* Implement compile time warning split test

* Add i18n for compile time warning

* Memoize CompileTimeWarning component

* Reuse startFreeTrial() function from account-upgrade

* Improve usage of react bootstrap native properties

* Cleanup compile-time-warning

* Move all logic into CompileTimeWarning component

* Only show compile time warning to project owners

* Handle compile time warning in detached mode and while switching layout

GitOrigin-RevId: 4fc40acfc113f91c81a6744c14c0f8b3ef766e39
This commit is contained in:
Alexandre Bourdin
2022-07-13 10:33:47 +02:00
committed by Copybot
parent fc8b8ad606
commit 517855a060
9 changed files with 184 additions and 1 deletions
@@ -949,6 +949,25 @@ const ProjectController = {
}
)
},
compileTimeWarningAssignment: [
'user',
(results, cb) => {
if (results.user?.features?.compileTimeout <= 60) {
SplitTestHandler.getAssignment(
req,
res,
'compile-time-warning',
{},
() => {
// do not fail editor load if assignment fails
cb()
}
)
} else {
cb()
}
},
],
},
(
err,