Merge pull request #14951 from overleaf/ab-split-test-calculator

[web] Split test calculator

GitOrigin-RevId: 53a84a64d69c47d692f215dee351af635a5dcceb
This commit is contained in:
Alexandre Bourdin 2024-01-12 11:09:12 +01:00 committed by Copybot
parent 384633e41e
commit ddd9334bd6
4 changed files with 31 additions and 1 deletions

2
package-lock.json generated
View file

@ -43293,6 +43293,7 @@
"@overleaf/logger": "*",
"@overleaf/metrics": "*",
"@overleaf/o-error": "*",
"@overleaf/promise-utils": "*",
"@overleaf/redis-wrapper": "*",
"@overleaf/settings": "*",
"@overleaf/stream-utils": "^0.1.0",
@ -53704,6 +53705,7 @@
"@overleaf/logger": "*",
"@overleaf/metrics": "*",
"@overleaf/o-error": "*",
"@overleaf/promise-utils": "*",
"@overleaf/redis-wrapper": "*",
"@overleaf/settings": "*",
"@overleaf/stream-utils": "^0.1.0",

View file

@ -106,7 +106,6 @@ async function createSplitTest(
const splitTest = new SplitTest({
name: (name || '').trim(),
description: info.description,
expectedEndDate: info.expectedEndDate,
ticketUrl: info.ticketUrl,
reportsUrls: info.reportsUrls,
winningVariant: info.winningVariant,
@ -122,6 +121,9 @@ async function createSplitTest(
author: userId,
},
],
expectedEndDate: info.expectedEndDate,
expectedUplift: info.expectedUplift,
requiredCohortSize: info.requiredCohortSize,
})
return _saveSplitTest(splitTest)
}

View file

@ -130,6 +130,14 @@ const SplitTestSchema = new Schema(
type: Date,
required: false,
},
requiredCohortSize: {
type: Number,
required: false,
},
expectedUplift: {
type: Number,
required: false,
},
ticketUrl: {
type: String,
required: false,

View file

@ -17,3 +17,21 @@
max-height: calc(100vh - 40vh);
overflow-y: auto;
}
.hr-sect {
display: flex;
flex-basis: 100%;
align-items: center;
color: rgba(0, 0, 0, 0.35);
margin: 8px 0;
}
.hr-sect:before,
.hr-sect:after {
content: '';
flex-grow: 1;
background: rgba(0, 0, 0, 0.35);
height: 1px;
font-size: 0;
line-height: 0;
margin: 0 8px;
}