@delmaredigital/payload-experiments 0.4.0-rc.10 → 0.4.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/MetricSourceSelect.js +10 -3
- package/dist/admin/copy/blocks.js +3 -3
- package/dist/admin/copy/goals.d.ts +15 -8
- package/dist/admin/copy/goals.js +18 -8
- package/dist/admin/copy/newTest.d.ts +3 -2
- package/dist/admin/copy/newTest.js +3 -2
- package/dist/admin/surface/SurfaceShell.d.ts +4 -2
- package/dist/admin/surface/SurfaceShell.js +25 -3
- package/dist/admin/surface/TestRowMenu.d.ts +7 -0
- package/dist/admin/surface/TestRowMenu.js +9 -2
- package/dist/admin/surface/TestsHome.js +8 -1
- package/dist/admin/surface/goals/DeleteGoalDialog.d.ts +7 -0
- package/dist/admin/surface/goals/DeleteGoalDialog.js +42 -0
- package/dist/admin/surface/goals/GoalForm.d.ts +1 -0
- package/dist/admin/surface/goals/GoalForm.js +280 -191
- package/dist/admin/surface/goals/GoalsList.js +102 -33
- package/dist/admin/surface/goals/data.d.ts +2 -0
- package/dist/admin/surface/goals/data.js +9 -0
- package/dist/admin/surface/goals/goals.css +3 -2
- package/dist/admin/surface/goals/goals.model.d.ts +2 -2
- package/dist/admin/surface/goals/goals.model.js +7 -12
- package/dist/admin/surface/home.model.d.ts +1 -0
- package/dist/admin/surface/home.model.js +5 -1
- package/dist/admin/surface/newTest/NewTest.js +56 -29
- package/dist/admin/surface/newTest/PageWizard.d.ts +3 -1
- package/dist/admin/surface/newTest/PageWizard.js +14 -14
- package/dist/admin/surface/newTest/newTest.css +3 -3
- package/dist/admin/surface/results/ResultsHeader.d.ts +1 -1
- package/dist/admin/surface/results/ResultsHeader.js +69 -41
- package/dist/admin/surface/surface.css +20 -1
- package/dist/admin/surface/test/TestPage.js +46 -34
- package/dist/admin/surface/useXpStepNav.d.ts +11 -0
- package/dist/admin/surface/useXpStepNav.js +14 -0
- package/dist/admin/views/TestsSurfaceClient.js +27 -3
- package/dist/blocks/createExperimentBlock.js +1 -1
- package/dist/blocks/formState.js +1 -1
- package/dist/collections/metrics.js +12 -5
- package/dist/collections/serialize.js +3 -2
- package/dist/db/snapshots.d.ts +1 -0
- package/dist/goals/sourceLabel.d.ts +2 -0
- package/dist/goals/sourceLabel.js +4 -0
- package/dist/plugin.js +51 -1
- package/dist/puck/editor/ExperimentSlotEditor.d.ts +2 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +96 -43
- package/dist/puck/editor/QuickTestActions.d.ts +2 -2
- package/dist/puck/editor/QuickTestActions.js +42 -27
- package/dist/puck/editor/ResultsReadout.d.ts +3 -1
- package/dist/puck/editor/ResultsReadout.js +28 -16
- package/dist/puck/editor/VersionBuilder.d.ts +2 -1
- package/dist/puck/editor/VersionBuilder.js +14 -8
- package/dist/puck/editor/copy.d.ts +3 -3
- package/dist/puck/editor/copy.js +4 -4
- package/dist/puck/editor/editor.chrome.css +9 -1
- package/dist/puck/editor/editor.css +10 -1
- package/dist/puck/nestedTestCopy.js +1 -1
- package/dist/puck/slotConfig.d.ts +1 -1
- package/dist/puck/slotConfig.js +1 -1
- package/dist/results/analyse.d.ts +2 -0
- package/dist/results/analyse.js +2 -2
- package/dist/results/verdict.d.ts +1 -1
- package/dist/results/verdict.js +7 -6
- package/dist/server/runResults.js +2 -1
- package/dist/testSurface/PreviewLinks.d.ts +2 -1
- package/dist/testSurface/PreviewLinks.js +3 -3
- package/dist/testSurface/actions/DecideDialog.d.ts +3 -2
- package/dist/testSurface/actions/DecideDialog.js +21 -12
- package/dist/testSurface/actions/LifecycleAction.d.ts +2 -1
- package/dist/testSurface/actions/LifecycleAction.js +3 -1
- package/dist/testSurface/actions/actions.model.js +6 -5
- package/dist/testSurface/actions/decide.model.d.ts +1 -0
- package/dist/testSurface/actions/decide.model.js +1 -0
- package/dist/testSurface/allocation.model.js +6 -3
- package/dist/testSurface/copy/actions.d.ts +12 -9
- package/dist/testSurface/copy/actions.js +12 -9
- package/dist/testSurface/copy/advanced.d.ts +10 -0
- package/dist/testSurface/copy/advanced.js +10 -0
- package/dist/testSurface/copy/arms.d.ts +1 -1
- package/dist/testSurface/copy/arms.js +1 -1
- package/dist/testSurface/copy/audience.d.ts +4 -3
- package/dist/testSurface/copy/audience.js +5 -4
- package/dist/testSurface/copy/common.d.ts +2 -2
- package/dist/testSurface/copy/common.js +2 -2
- package/dist/testSurface/copy/metrics.d.ts +6 -0
- package/dist/testSurface/copy/metrics.js +8 -0
- package/dist/testSurface/copy/readiness.d.ts +3 -3
- package/dist/testSurface/copy/readiness.js +5 -5
- package/dist/testSurface/copy/recommendation.d.ts +4 -4
- package/dist/testSurface/copy/recommendation.js +4 -4
- package/dist/testSurface/copy/results.d.ts +13 -9
- package/dist/testSurface/copy/results.js +15 -9
- package/dist/testSurface/copy/review.d.ts +12 -9
- package/dist/testSurface/copy/review.js +13 -9
- package/dist/testSurface/copy/setting.d.ts +1 -2
- package/dist/testSurface/copy/setting.js +1 -2
- package/dist/testSurface/copy/surface.js +1 -1
- package/dist/testSurface/copy/testPage.d.ts +13 -9
- package/dist/testSurface/copy/testPage.js +16 -13
- package/dist/testSurface/format/date.d.ts +1 -0
- package/dist/testSurface/format/date.js +11 -0
- package/dist/testSurface/labels.d.ts +1 -2
- package/dist/testSurface/labels.js +2 -3
- package/dist/testSurface/lockedNotice.model.d.ts +2 -0
- package/dist/testSurface/lockedNotice.model.js +31 -0
- package/dist/testSurface/results/results.model.d.ts +3 -2
- package/dist/testSurface/results/results.model.js +10 -9
- package/dist/testSurface/surface/pageBlock/pageBlock.model.js +1 -1
- package/dist/testSurface/surface/pageBlock/parts.js +17 -7
- package/dist/testSurface/surface/pagePicker/PageCombobox.js +0 -5
- package/dist/testSurface/surface/readiness/ActionDialogs.d.ts +1 -1
- package/dist/testSurface/surface/readiness/ActionDialogs.js +54 -33
- package/dist/testSurface/surface/readiness/Banner.d.ts +3 -1
- package/dist/testSurface/surface/readiness/Banner.js +86 -75
- package/dist/testSurface/surface/readiness/SaveStatus.d.ts +5 -2
- package/dist/testSurface/surface/readiness/SaveStatus.js +8 -7
- package/dist/testSurface/surface/readiness/readiness.model.js +1 -1
- package/dist/testSurface/surface/results/ResultsBody.d.ts +4 -1
- package/dist/testSurface/surface/results/ResultsBody.js +119 -80
- package/dist/testSurface/surface/results/recommendation.model.js +3 -3
- package/dist/testSurface/surface/setting/parts.js +31 -28
- package/dist/testSurface/surface/setting/setting.css +2 -1
- package/dist/testSurface/surface/test/AdvancedSection.js +10 -4
- package/dist/testSurface/surface/test/GoalSection.js +11 -11
- package/dist/testSurface/surface/test/LengthSection.js +20 -13
- package/dist/testSurface/surface/test/PageHoldout.d.ts +1 -1
- package/dist/testSurface/surface/test/PageHoldout.js +7 -7
- package/dist/testSurface/surface/test/ReadinessBar.d.ts +1 -1
- package/dist/testSurface/surface/test/ReadinessBar.js +4 -10
- package/dist/testSurface/surface/test/Section.js +8 -0
- package/dist/testSurface/surface/test/TargetingSection.js +7 -2
- package/dist/testSurface/surface/test/VersionsSection.js +88 -68
- package/dist/testSurface/surface/test/fields.d.ts +4 -3
- package/dist/testSurface/surface/test/fields.js +10 -16
- package/dist/testSurface/surface/test/pageParts.js +3 -1
- package/dist/testSurface/surface/test/testPage.css +9 -1
- package/dist/testSurface/surfaceUrls.d.ts +1 -0
- package/dist/testSurface/surfaceUrls.js +4 -0
- package/dist/ui/Dialog.js +25 -0
- package/dist/ui/Inputs.js +0 -1
- package/dist/ui/ui.css +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentConfig } from '@puckeditor/core';
|
|
2
2
|
import { type ExperimentSlotProps } from '../types/puck.js';
|
|
3
|
-
export declare const experimentSlotLabel = "
|
|
3
|
+
export declare const experimentSlotLabel = "Test block";
|
|
4
4
|
export declare const experimentSlotFields: NonNullable<ComponentConfig<ExperimentSlotProps>['fields']>;
|
|
5
5
|
export declare const experimentSlotDefaultProps: NonNullable<ComponentConfig<ExperimentSlotProps>['defaultProps']>;
|
package/dist/puck/slotConfig.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EXPERIMENT_SLOT_TYPE } from '../types/puck.js';
|
|
2
2
|
import { createExperimentSlotField } from './experimentSlotField.js';
|
|
3
3
|
import { slotLabels } from './copy.js';
|
|
4
|
-
export const experimentSlotLabel = '
|
|
4
|
+
export const experimentSlotLabel = 'Test block';
|
|
5
5
|
export const experimentSlotFields = {
|
|
6
6
|
experiment: createExperimentSlotField(),
|
|
7
7
|
// Puck 0.24's defaultSlots prepends each slot, reversing declaration order in the outline.
|
|
@@ -60,6 +60,8 @@ export interface MetricUnitData {
|
|
|
60
60
|
}
|
|
61
61
|
export type AnalysePhaseInput = {
|
|
62
62
|
phase: AnalysisPhase;
|
|
63
|
+
/** The test's control can be absent from the two rollout arms. */
|
|
64
|
+
controlLabel?: string;
|
|
63
65
|
/** The runner logs failures; injecting this keeps analysis free of I/O imports. */
|
|
64
66
|
onMetricError?: (error: unknown, metricId: DocId) => void;
|
|
65
67
|
status: 'running' | 'stopped' | 'decided';
|
package/dist/results/analyse.js
CHANGED
|
@@ -7,7 +7,7 @@ import { guardrailStatus } from './guardrails.js';
|
|
|
7
7
|
import { remainingPower } from './power.js';
|
|
8
8
|
import { assembleSnapshot, jsonInterval } from './snapshot.js';
|
|
9
9
|
import { exposureSrm } from './srm.js';
|
|
10
|
-
import { computeVerdict } from './verdict.js';
|
|
10
|
+
import { computeVerdict, verdictGroupLabel } from './verdict.js';
|
|
11
11
|
const severity = {
|
|
12
12
|
ok: 0,
|
|
13
13
|
insufficient: 1,
|
|
@@ -341,7 +341,7 @@ const severity = {
|
|
|
341
341
|
guardrails: verdictGuardrails,
|
|
342
342
|
power,
|
|
343
343
|
plannedDurationPassed: to - from >= analysis.plannedDurationDays * 86_400_000,
|
|
344
|
-
originalLabel: phase.arms.find((arm)=>arm.kind === 'control')?.label
|
|
344
|
+
originalLabel: verdictGroupLabel('control', input.controlLabel ?? phase.arms.find((arm)=>arm.kind === 'control')?.label),
|
|
345
345
|
controlArm: baselineArm.key
|
|
346
346
|
};
|
|
347
347
|
const verdictInput = rollout ? {
|
|
@@ -74,7 +74,7 @@ interface VerdictInputFields {
|
|
|
74
74
|
feasible: boolean;
|
|
75
75
|
};
|
|
76
76
|
plannedDurationPassed: boolean;
|
|
77
|
-
/**
|
|
77
|
+
/** The frozen label of the test's control version, including for rollouts. */
|
|
78
78
|
originalLabel: string;
|
|
79
79
|
controlArm: string;
|
|
80
80
|
}
|
package/dist/results/verdict.js
CHANGED
|
@@ -26,6 +26,7 @@ function chance(value) {
|
|
|
26
26
|
}
|
|
27
27
|
/** Apply spec §8.5 in order to already-computed results; no inference is performed here. */ export function computeVerdict(input) {
|
|
28
28
|
const rollout = input.phaseKind === 'rollout';
|
|
29
|
+
const controlLabel = input.originalLabel;
|
|
29
30
|
const make = (row, code, finding, action, detail, recommendedArm, line, worstArm)=>({
|
|
30
31
|
row,
|
|
31
32
|
code,
|
|
@@ -61,7 +62,7 @@ function chance(value) {
|
|
|
61
62
|
null,
|
|
62
63
|
null
|
|
63
64
|
];
|
|
64
|
-
return make('R3', 'rollout-readout', `Since shipping ${winner}: ${percent(lift)} vs the holdout (CI ${percent(ci[0])} to ${percent(ci[1])}).`, null,
|
|
65
|
+
return make('R3', 'rollout-readout', `Since shipping ${winner}: ${percent(lift)} vs the holdout (CI ${percent(ci[0])} to ${percent(ci[1])}).`, null, `This describes the shipped version compared with people still seeing ${controlLabel}.`, null, guardrailLine(input));
|
|
65
66
|
}
|
|
66
67
|
const failing = input.guardrails.find((item)=>item.status === 'failing');
|
|
67
68
|
if (failing) return make(3, 'guardrail-failing', `Stop: ${failing.worstArmLabel} harms ${failing.name}.`, null, 'An outcome that must stay safe has become worse.', input.controlArm, undefined, failing.worstArm);
|
|
@@ -69,7 +70,7 @@ function chance(value) {
|
|
|
69
70
|
const smallest = compared.find((item)=>item.n === minimum);
|
|
70
71
|
const fewest = converters.find((item)=>item.converters === minimumConverters);
|
|
71
72
|
const groupLabel = (group)=>{
|
|
72
|
-
if (!group || group.kind === 'control') return
|
|
73
|
+
if (!group || group.kind === 'control') return controlLabel;
|
|
73
74
|
const label = input.exposures.perArm.find((item)=>item.arm === group.arm)?.label ?? input.primary.comparisons.find((item)=>item.arm === group.arm)?.label;
|
|
74
75
|
return verdictGroupLabel(group.arm, label);
|
|
75
76
|
};
|
|
@@ -88,11 +89,11 @@ function chance(value) {
|
|
|
88
89
|
...better
|
|
89
90
|
].sort((a, b)=>direction * (b.lift - a.lift))[0];
|
|
90
91
|
const worst = worse[0];
|
|
91
|
-
if (variants.length > 0 && worse.length === variants.length) return make(5, 'original-better',
|
|
92
|
-
if (worst && !best) return make(6, 'worse-none-better', `${labels(worse)} ${worse.length === 1 ? 'is' : 'are'} worse; no variant is better.`, `Decide for
|
|
92
|
+
if (variants.length > 0 && worse.length === variants.length) return make(5, 'original-better', `${controlLabel} is better.`, `Decide for ${controlLabel}.`, 'Every tested alternative performed worse.', input.controlArm);
|
|
93
|
+
if (worst && !best) return make(6, 'worse-none-better', `${labels(worse)} ${worse.length === 1 ? 'is' : 'are'} worse; no variant is better.`, `Decide for ${controlLabel} or restart without ${worse.length === 1 ? 'it' : 'them'}.`, 'At least one alternative performed worse and none improved the main outcome.', input.controlArm, undefined, worst.arm);
|
|
93
94
|
if (best && !worst) {
|
|
94
|
-
const finding = better.length >= 2 ? `${better.length === 2 ? 'Both' : `All ${better.length} variants`} beat
|
|
95
|
-
return make(7, 'winner', finding, null,
|
|
95
|
+
const finding = better.length >= 2 ? `${better.length === 2 ? 'Both' : `All ${better.length} variants`} beat ${controlLabel}; not tested against each other — ${best.label} has the larger improvement.` : input.method === 'bayesian' ? `${best.label} is very likely better${chance(best.chanceToWin)}.` : `${best.label} is statistically better: ${percent(best.lift)} (CI ${percent(best.ci[0])} to ${percent(best.ci[1])}).`;
|
|
96
|
+
return make(7, 'winner', finding, null, `The main outcome improved compared with ${controlLabel}.`, best.arm, guardrailLine(input));
|
|
96
97
|
}
|
|
97
98
|
if (best && worst) return make(8, 'mixed', `Mixed: ${labels(better)} better, ${labels(worse)} worse.`, 'Review before deciding.', 'The tested alternatives moved the main outcome in different directions.', best.arm, undefined, worst.arm);
|
|
98
99
|
if (input.status === 'running' && !input.plannedDurationPassed) {
|
|
@@ -315,7 +315,8 @@ async function analyseCandidate(exec, candidate, options, now, deadline, unavail
|
|
|
315
315
|
armMismatch: await armMismatchCount(exec, query),
|
|
316
316
|
identityConflictShare: userIds.length ? identityConflicts.size / userIds.length : 0,
|
|
317
317
|
...phase.phaseKind === 'rollout' ? {
|
|
318
|
-
winnerArm: phase.arms.find((arm)=>arm.kind !== 'holdout').key
|
|
318
|
+
winnerArm: phase.arms.find((arm)=>arm.kind !== 'holdout').key,
|
|
319
|
+
controlLabel: candidate.testArms.find((arm)=>arm.kind === 'control')?.label
|
|
319
320
|
} : {}
|
|
320
321
|
});
|
|
321
322
|
if (rapidActivity) snapshot.health = [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DocId } from '../types/contracts.js';
|
|
2
2
|
import type { PreflightResult } from '../types/endpoints.js';
|
|
3
|
-
export declare function PreviewLinks({ experimentId, placements, arms, flagPoint, apiRoute }: {
|
|
3
|
+
export declare function PreviewLinks({ experimentId, placements, arms, flagPoint, apiRoute, showEditLinks }: {
|
|
4
|
+
showEditLinks?: boolean;
|
|
4
5
|
apiRoute: string;
|
|
5
6
|
flagPoint?: string;
|
|
6
7
|
experimentId: DocId;
|
|
@@ -9,7 +9,7 @@ import { placementLabel } from './placementLabel.js';
|
|
|
9
9
|
import { TEST_PAGE } from './copy/testPage.js';
|
|
10
10
|
import { API_MESSAGES, refusalMessage } from './copy/common.js';
|
|
11
11
|
import { actionablePreviewPages } from './previewLinks.model.js';
|
|
12
|
-
export function PreviewLinks({ experimentId, placements, arms, flagPoint, apiRoute }) {
|
|
12
|
+
export function PreviewLinks({ experimentId, placements, arms, flagPoint, apiRoute, showEditLinks = true }) {
|
|
13
13
|
const api = useApi(apiRoute);
|
|
14
14
|
const inFlight = useRef(false);
|
|
15
15
|
const [busy, setBusy] = useState(false);
|
|
@@ -86,8 +86,8 @@ export function PreviewLinks({ experimentId, placements, arms, flagPoint, apiRou
|
|
|
86
86
|
arm.label?.trim() || armLabel(arm.key)
|
|
87
87
|
]
|
|
88
88
|
}, arm.key)) : null,
|
|
89
|
-
placement.editorUrl ? /*#__PURE__*/ _jsx(Button, {
|
|
90
|
-
variant: "
|
|
89
|
+
showEditLinks && placement.editorUrl ? /*#__PURE__*/ _jsx(Button, {
|
|
90
|
+
variant: "secondary",
|
|
91
91
|
size: "sm",
|
|
92
92
|
href: placement.editorUrl,
|
|
93
93
|
"aria-label": pages.length > 1 ? `${TEST_PAGE.editOnPage}: ${placementLabel(placement)}` : undefined,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DocId } from '../../types/contracts.js';
|
|
2
|
-
import type { PreflightResult } from '../../types/endpoints.js';
|
|
2
|
+
import type { ResultsResponse, PreflightResult } from '../../types/endpoints.js';
|
|
3
3
|
import { type ActionGroup } from './actions.model.js';
|
|
4
|
-
export declare function DecideDialog({ id, name, phase, arms, checks, unavailable, pending, onClose, apiRoute, onSuccess, onRefusal }: {
|
|
4
|
+
export declare function DecideDialog({ id, name, phase, arms, results, checks, unavailable, pending, onClose, apiRoute, onSuccess, onRefusal }: {
|
|
5
5
|
apiRoute: string;
|
|
6
6
|
name?: string;
|
|
7
7
|
phase?: number;
|
|
@@ -11,6 +11,7 @@ export declare function DecideDialog({ id, name, phase, arms, checks, unavailabl
|
|
|
11
11
|
onSuccess?: (doc?: Record<string, unknown>) => void;
|
|
12
12
|
id: DocId;
|
|
13
13
|
arms?: readonly ActionGroup[];
|
|
14
|
+
results?: ResultsResponse;
|
|
14
15
|
checks?: PreflightResult['checks'];
|
|
15
16
|
onClose: () => void;
|
|
16
17
|
}): import("react").JSX.Element;
|
|
@@ -6,23 +6,23 @@ import { Select, Textarea, TextInput } from '../../ui/Inputs.js';
|
|
|
6
6
|
import { unsupportedContentCopy } from '../copy/readiness.js';
|
|
7
7
|
import { useApi } from '../useApi.js';
|
|
8
8
|
import { reloadPage } from '../reload.js';
|
|
9
|
-
import {
|
|
9
|
+
import { Banner } from '../../ui/Banner.js';
|
|
10
10
|
import { ACTIONS_COPY as C, actionTitle, decideCopy } from '../copy/actions.js';
|
|
11
11
|
import { READINESS_COPY } from '../copy/readiness.js';
|
|
12
|
-
import { isDestructiveAction } from './actions.model.js';
|
|
12
|
+
import { actionGroupLabel, isDestructiveAction } from './actions.model.js';
|
|
13
13
|
import { decideState } from './decide.model.js';
|
|
14
14
|
import { ConfirmDialog } from '../../ui/Dialog.js';
|
|
15
15
|
import { notifyTestDocument } from '../surface/watchTestDocument.js';
|
|
16
|
-
export function DecideDialog({ id, name, phase, arms, checks = [], unavailable, pending, onClose, apiRoute, onSuccess, onRefusal }) {
|
|
16
|
+
export function DecideDialog({ id, name, phase, arms, results, checks = [], unavailable, pending, onClose, apiRoute, onSuccess, onRefusal }) {
|
|
17
17
|
const api = useApi(apiRoute);
|
|
18
|
-
const [snapshot, setSnapshot] = useState(null);
|
|
18
|
+
const [snapshot, setSnapshot] = useState(results?.snapshot ?? null);
|
|
19
19
|
const [roundArms, setRoundArms] = useState();
|
|
20
20
|
const frozenArms = roundArms ?? arms;
|
|
21
21
|
const [chosen, setChosenArm] = useState();
|
|
22
22
|
const chosenArm = chosen === undefined ? snapshot?.verdict.recommendedArm ?? null : chosen;
|
|
23
23
|
const [note, setNote] = useState('');
|
|
24
24
|
const [typed, setTyped] = useState('');
|
|
25
|
-
const [loading, setLoading] = useState(
|
|
25
|
+
const [loading, setLoading] = useState(!results);
|
|
26
26
|
const [busy, setBusy] = useState(false);
|
|
27
27
|
const inFlight = useRef(false);
|
|
28
28
|
const refreshing = useRef(false);
|
|
@@ -42,6 +42,7 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
42
42
|
typed
|
|
43
43
|
});
|
|
44
44
|
useEffect(()=>{
|
|
45
|
+
if (results) return;
|
|
45
46
|
let current = true;
|
|
46
47
|
void api.results(id, {
|
|
47
48
|
phase
|
|
@@ -63,7 +64,8 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
63
64
|
}, [
|
|
64
65
|
api,
|
|
65
66
|
id,
|
|
66
|
-
phase
|
|
67
|
+
phase,
|
|
68
|
+
results
|
|
67
69
|
]);
|
|
68
70
|
async function refresh() {
|
|
69
71
|
if (refreshing.current) return;
|
|
@@ -110,7 +112,10 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
110
112
|
setBusy(false);
|
|
111
113
|
}
|
|
112
114
|
const enabled = !unavailable && !pending && !statusRefused && !busy && !loading && !loadFailed && state.canSubmit;
|
|
115
|
+
const noEvidence = !loading && !loadFailed && state.noEvidence;
|
|
116
|
+
const control = actionGroupLabel('control', frozenArms?.find((arm)=>arm.key === 'control')?.label);
|
|
113
117
|
const label = state.options.find((option)=>option.value === chosenArm)?.label;
|
|
118
|
+
const noteRequired = state.guarded && Boolean(label);
|
|
114
119
|
return /*#__PURE__*/ _jsxs(ConfirmDialog, {
|
|
115
120
|
title: name ? actionTitle(C.titleLead.decide, name) : C.decide,
|
|
116
121
|
description: C.decideBody,
|
|
@@ -123,7 +128,7 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
123
128
|
cancelLabel: C.cancel,
|
|
124
129
|
error: error?.message ?? (unavailable ? C.decisionUnavailable : !loading && !frozenArms ? C.decideRoundMissing : null),
|
|
125
130
|
confirm: {
|
|
126
|
-
label: C.decide,
|
|
131
|
+
label: noEvidence ? C.decideAnyway : C.decide,
|
|
127
132
|
disabled: !enabled,
|
|
128
133
|
destructive: isDestructiveAction('decide'),
|
|
129
134
|
onClick: submit
|
|
@@ -143,10 +148,14 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
143
148
|
role: "status",
|
|
144
149
|
children: C.loading
|
|
145
150
|
}) : null,
|
|
151
|
+
noEvidence ? /*#__PURE__*/ _jsx(Banner, {
|
|
152
|
+
tone: "warning",
|
|
153
|
+
children: C.noEvidence
|
|
154
|
+
}) : null,
|
|
146
155
|
/*#__PURE__*/ _jsxs(Select, {
|
|
147
156
|
id: "xp-winner",
|
|
148
157
|
name: "xp-winner",
|
|
149
|
-
label: C.
|
|
158
|
+
label: C.winningVersion,
|
|
150
159
|
value: chosenArm ?? '',
|
|
151
160
|
disabled: busy || loading,
|
|
152
161
|
required: true,
|
|
@@ -157,7 +166,7 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
157
166
|
children: [
|
|
158
167
|
/*#__PURE__*/ _jsx("option", {
|
|
159
168
|
value: "",
|
|
160
|
-
children:
|
|
169
|
+
children: C.chooseVersion
|
|
161
170
|
}),
|
|
162
171
|
state.options.map((option)=>/*#__PURE__*/ _jsx("option", {
|
|
163
172
|
value: option.value,
|
|
@@ -166,7 +175,7 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
166
175
|
]
|
|
167
176
|
}),
|
|
168
177
|
label ? /*#__PURE__*/ _jsx("p", {
|
|
169
|
-
children: decideCopy(label, !!frozenArms?.some((group)=>group.key === 'holdout'), chosenArm === 'control')
|
|
178
|
+
children: decideCopy(label, !!frozenArms?.some((group)=>group.key === 'holdout'), control, chosenArm === 'control')
|
|
170
179
|
}) : null,
|
|
171
180
|
checks.filter((check)=>check.code === 'make-content-unsupported' && check.warning).map((check)=>/*#__PURE__*/ _jsx("p", {
|
|
172
181
|
children: unsupportedContentCopy(typeof check.detail === 'string' ? check.detail : 'This page')
|
|
@@ -176,9 +185,9 @@ export function DecideDialog({ id, name, phase, arms, checks = [], unavailable,
|
|
|
176
185
|
}) : null,
|
|
177
186
|
/*#__PURE__*/ _jsx(Textarea, {
|
|
178
187
|
id: "xp-note",
|
|
179
|
-
label: C.note,
|
|
188
|
+
label: noteRequired ? C.requiredNote : C.note,
|
|
180
189
|
value: note,
|
|
181
|
-
required:
|
|
190
|
+
required: noteRequired,
|
|
182
191
|
readOnly: busy,
|
|
183
192
|
onChange: (event)=>{
|
|
184
193
|
if (chosenArm !== null) setChosenArm(chosenArm);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ActionTestApi, SurfaceProps } from '../surface/contracts.js';
|
|
2
2
|
import { type ExperimentAction } from './actions.model.js';
|
|
3
|
-
export declare function LifecycleButton({ action, reason, showReason, disabled, busy, onClick }: {
|
|
3
|
+
export declare function LifecycleButton({ action, reason, showReason, disabled, ariaDisabled, busy, onClick }: {
|
|
4
4
|
action: ExperimentAction;
|
|
5
5
|
reason?: string;
|
|
6
6
|
showReason?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
ariaDisabled?: boolean;
|
|
8
9
|
busy?: boolean;
|
|
9
10
|
onClick: () => void;
|
|
10
11
|
}): import("react").JSX.Element;
|
|
@@ -6,7 +6,7 @@ import { AddMetricAction, AllocateAction, ConfirmAction } from '../surface/readi
|
|
|
6
6
|
import { ReleasePagesDialog } from '../surface/results/ReleasePages.js';
|
|
7
7
|
import { actionGroupLabel, availableActions } from './actions.model.js';
|
|
8
8
|
import { DecideDialog } from './DecideDialog.js';
|
|
9
|
-
export function LifecycleButton({ action, reason, showReason = true, disabled, busy, onClick }) {
|
|
9
|
+
export function LifecycleButton({ action, reason, showReason = true, disabled, ariaDisabled, busy, onClick }) {
|
|
10
10
|
const id = useId();
|
|
11
11
|
const help = showReason ? reason ?? action.hint : action.hint;
|
|
12
12
|
return /*#__PURE__*/ _jsxs("span", {
|
|
@@ -16,9 +16,11 @@ export function LifecycleButton({ action, reason, showReason = true, disabled, b
|
|
|
16
16
|
variant: action.tone === 'danger' ? 'danger' : action.tone === 'primary' ? 'primary' : 'secondary',
|
|
17
17
|
busy: busy,
|
|
18
18
|
disabled: disabled || !!reason,
|
|
19
|
+
"aria-disabled": ariaDisabled || undefined,
|
|
19
20
|
"aria-describedby": help ? id : undefined,
|
|
20
21
|
title: !showReason ? reason : undefined,
|
|
21
22
|
onClick: (event)=>{
|
|
23
|
+
if (ariaDisabled) return;
|
|
22
24
|
event.currentTarget.focus();
|
|
23
25
|
onClick();
|
|
24
26
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { contentDone } from '../../contentDone.js';
|
|
2
2
|
import { armLabel } from '../labels.js';
|
|
3
|
-
import { ACTIONS_COPY as C, actionTitle, hardCodedLabel, makeContentCopy, releaseCopy } from '../copy/actions.js';
|
|
3
|
+
import { ACTIONS_COPY as C, actionTitle, archiveCopy, discardCopy, hardCodedLabel, makeContentCopy, releaseCopy, stopCopy } from '../copy/actions.js';
|
|
4
4
|
import { REVIEW_COPY } from '../copy/review.js';
|
|
5
5
|
import { READINESS_COPY } from '../copy/readiness.js';
|
|
6
6
|
import { DELETE_TEST } from '../copy/testPage.js';
|
|
@@ -54,6 +54,7 @@ export function availableActions({ name, status, kind, arms = [], allocation, de
|
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
const start = action('start', status === 'stopped' ? C.restart : C.start, status === 'stopped' ? C.restartBody : C.startBody, 'primary');
|
|
57
|
+
const control = actionGroupLabel('control', arms?.find((group)=>group.kind === 'control' || group.key === 'control')?.label);
|
|
57
58
|
const decide = canReadResults ? [
|
|
58
59
|
action('decide', C.decide, C.decideBody, 'primary')
|
|
59
60
|
] : [];
|
|
@@ -72,19 +73,19 @@ export function availableActions({ name, status, kind, arms = [], allocation, de
|
|
|
72
73
|
remove
|
|
73
74
|
];
|
|
74
75
|
if (status === 'running') return [
|
|
75
|
-
action('stop', C.stop, C.stopBody, 'danger'),
|
|
76
76
|
...decide,
|
|
77
77
|
action('add-metric', READINESS_COPY.addGoal, ''),
|
|
78
78
|
{
|
|
79
79
|
...action('allocate', READINESS_COPY.allocate, REVIEW_COPY.allocationBody),
|
|
80
80
|
unavailable: allocation !== undefined && allocation >= 100 ? READINESS_COPY.everyone : undefined
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
|
+
action('stop', C.stop, stopCopy(control), 'danger')
|
|
82
83
|
];
|
|
83
84
|
if (status === 'stopped') return [
|
|
84
85
|
start,
|
|
85
86
|
...decide,
|
|
86
87
|
{
|
|
87
|
-
...action('archive', C.archive,
|
|
88
|
+
...action('archive', C.archive, archiveCopy(control), 'secondary', {
|
|
88
89
|
mode: 'stopped'
|
|
89
90
|
}),
|
|
90
91
|
hint: DELETE_TEST.archiveFirst
|
|
@@ -107,7 +108,7 @@ export function availableActions({ name, status, kind, arms = [], allocation, de
|
|
|
107
108
|
mode: 'after-content'
|
|
108
109
|
})
|
|
109
110
|
] : [],
|
|
110
|
-
action('discard', C.discard,
|
|
111
|
+
action('discard', C.discard, discardCopy(control), 'danger', {
|
|
111
112
|
mode: 'discard'
|
|
112
113
|
}, 'discard'),
|
|
113
114
|
...kind === 'code' && winner && winner.kind !== 'holdout' ? [
|
|
@@ -4,10 +4,13 @@ const percent = (value)=>String(Math.round(value * 10) / 10);
|
|
|
4
4
|
export function allocationSentence({ allocation, unitType, arms, layer, status }) {
|
|
5
5
|
const groups = arms.filter((group)=>group.kind !== 'holdout');
|
|
6
6
|
if (!groups.length || !Number.isFinite(allocation)) return '';
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const control = groups.find((group)=>group.kind === 'control' || group.key === 'control');
|
|
8
|
+
const labelOf = (group)=>group.label?.trim() || armLabel(group.key);
|
|
9
|
+
const controlLabel = control ? labelOf(control) : armLabel('control');
|
|
10
|
+
const equal = groups.length > 1 && groups.every((group)=>group.weight === groups[0].weight);
|
|
11
|
+
const shares = equal ? eachVersion(percent(allocation * groups[0].weight / 100)) : groups.map((group)=>groupShare(percent(allocation * group.weight / 100), labelOf(group))).join(', ');
|
|
9
12
|
const holdout = arms.find((group)=>group.kind === 'holdout');
|
|
10
|
-
let sentence = participation(percent(allocation), peopleLabel[unitType], shares) + (holdout ? holdoutClause(percent(holdout.weight)) : '') + (allocation < 100 ? holdout ? holdoutRemainder : uncounted : '');
|
|
13
|
+
let sentence = participation(percent(allocation), peopleLabel[unitType], shares) + (holdout ? holdoutClause(percent(holdout.weight), controlLabel) : '') + (allocation < 100 ? holdout ? holdoutRemainder(controlLabel) : uncounted(controlLabel) : '');
|
|
11
14
|
if ((holdout || layer || status === 'running') && !sentence.endsWith('.')) sentence += '.';
|
|
12
15
|
if (layer) sentence += layerSentence(layer.name, layer.used, layer.free);
|
|
13
16
|
return sentence;
|
|
@@ -12,10 +12,6 @@ export declare const ACTIONS_COPY: {
|
|
|
12
12
|
readonly discard: "Discard winner";
|
|
13
13
|
readonly startBody: "The test will start showing versions to visitors and collecting results.";
|
|
14
14
|
readonly restartBody: "Visitors will start seeing test versions again. New results go into a new round, and earlier results are kept.";
|
|
15
|
-
readonly stopBody: "Visitors will go back to the Original. The test stops collecting data and keeps its results. Starting again begins a new round.";
|
|
16
|
-
readonly original: "Everyone will see the Original.";
|
|
17
|
-
readonly discardBody: "Visitors go back to the Original. The test moves to Archived and keeps its results and decision note. You can then delete it.";
|
|
18
|
-
readonly archiveBody: "The test moves out of the active list into Archived. It won't collect any more data, and visitors will keep seeing the Original. You can still view the results or delete the test later. You can't restart it.";
|
|
19
15
|
readonly finishBody: "The updated content stays in place. The test moves to Archived and keeps its results. You can then delete it.";
|
|
20
16
|
readonly hardCodedBody: "The test moves to Archived and keeps its results. The site will use the version your developer made permanent. You can then delete the test.";
|
|
21
17
|
readonly confirmPermanentWinner: "Confirm permanent winner";
|
|
@@ -34,11 +30,15 @@ export declare const ACTIONS_COPY: {
|
|
|
34
30
|
readonly decideRoundMissing: "Couldn't find the versions from this round. Close this dialog and check the current round.";
|
|
35
31
|
readonly actionChanged: "This test changed. Close this dialog to see the current actions.";
|
|
36
32
|
readonly noResults: "There are no results yet.";
|
|
37
|
-
readonly noRecommendation: "The results don't recommend a
|
|
38
|
-
readonly different: "You chose a different
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
33
|
+
readonly noRecommendation: "The results don't recommend a version yet.";
|
|
34
|
+
readonly different: "You chose a different version than the results recommend.";
|
|
35
|
+
readonly winningVersion: "Winning version";
|
|
36
|
+
readonly chooseVersion: "Choose a version";
|
|
37
|
+
readonly note: "Decision note (optional)";
|
|
38
|
+
readonly requiredNote: "Decision note (required for this choice)";
|
|
41
39
|
readonly confirmation: "Confirmation";
|
|
40
|
+
readonly noEvidence: "No one has taken part yet, so there's nothing to compare. Deciding now picks a version without evidence.";
|
|
41
|
+
readonly decideAnyway: "Decide anyway";
|
|
42
42
|
readonly typePhrase: "Type the following to confirm:";
|
|
43
43
|
readonly cancel: "Cancel";
|
|
44
44
|
readonly retry: "Retry";
|
|
@@ -74,7 +74,10 @@ export declare const ACTIONS_COPY: {
|
|
|
74
74
|
export declare const actionTitle: (action: string, test: string) => string;
|
|
75
75
|
export declare const actionTitleFor: (action: string, test: string) => string;
|
|
76
76
|
export declare const actionsForTest: (test: string) => string;
|
|
77
|
-
export declare const
|
|
77
|
+
export declare const stopCopy: (control: string) => string;
|
|
78
|
+
export declare const discardCopy: (control: string) => string;
|
|
79
|
+
export declare const archiveCopy: (control: string) => string;
|
|
80
|
+
export declare const decideCopy: (winner: string, holdout: boolean, control: string, isControl: boolean) => string;
|
|
78
81
|
export declare const releaseCopy: (winner: string) => string;
|
|
79
82
|
export declare const makeContentCopy: (winner: string, kind: "block" | "page" | "flag") => string;
|
|
80
83
|
export declare const hardCodedLabel: (winner: string) => string;
|
|
@@ -12,10 +12,6 @@ export const ACTIONS_COPY = {
|
|
|
12
12
|
discard: 'Discard winner',
|
|
13
13
|
startBody: 'The test will start showing versions to visitors and collecting results.',
|
|
14
14
|
restartBody: 'Visitors will start seeing test versions again. New results go into a new round, and earlier results are kept.',
|
|
15
|
-
stopBody: 'Visitors will go back to the Original. The test stops collecting data and keeps its results. Starting again begins a new round.',
|
|
16
|
-
original: 'Everyone will see the Original.',
|
|
17
|
-
discardBody: 'Visitors go back to the Original. The test moves to Archived and keeps its results and decision note. You can then delete it.',
|
|
18
|
-
archiveBody: "The test moves out of the active list into Archived. It won't collect any more data, and visitors will keep seeing the Original. You can still view the results or delete the test later. You can't restart it.",
|
|
19
15
|
finishBody: 'The updated content stays in place. The test moves to Archived and keeps its results. You can then delete it.',
|
|
20
16
|
hardCodedBody: 'The test moves to Archived and keeps its results. The site will use the version your developer made permanent. You can then delete the test.',
|
|
21
17
|
confirmPermanentWinner: 'Confirm permanent winner',
|
|
@@ -34,11 +30,15 @@ export const ACTIONS_COPY = {
|
|
|
34
30
|
decideRoundMissing: "Couldn't find the versions from this round. Close this dialog and check the current round.",
|
|
35
31
|
actionChanged: 'This test changed. Close this dialog to see the current actions.',
|
|
36
32
|
noResults: 'There are no results yet.',
|
|
37
|
-
noRecommendation: "The results don't recommend a
|
|
38
|
-
different: 'You chose a different
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
noRecommendation: "The results don't recommend a version yet.",
|
|
34
|
+
different: 'You chose a different version than the results recommend.',
|
|
35
|
+
winningVersion: 'Winning version',
|
|
36
|
+
chooseVersion: 'Choose a version',
|
|
37
|
+
note: 'Decision note (optional)',
|
|
38
|
+
requiredNote: 'Decision note (required for this choice)',
|
|
41
39
|
confirmation: 'Confirmation',
|
|
40
|
+
noEvidence: "No one has taken part yet, so there's nothing to compare. Deciding now picks a version without evidence.",
|
|
41
|
+
decideAnyway: 'Decide anyway',
|
|
42
42
|
typePhrase: 'Type the following to confirm:',
|
|
43
43
|
cancel: 'Cancel',
|
|
44
44
|
retry: 'Retry',
|
|
@@ -74,7 +74,10 @@ export const ACTIONS_COPY = {
|
|
|
74
74
|
export const actionTitle = (action, test)=>`${action} “${test}”?`;
|
|
75
75
|
export const actionTitleFor = (action, test)=>`${action} for “${test}”?`;
|
|
76
76
|
export const actionsForTest = (test)=>`Actions for ${test}`;
|
|
77
|
-
export const
|
|
77
|
+
export const stopCopy = (control)=>`Visitors will go back to ${control}. The test stops collecting data and keeps its results. Starting again begins a new round.`;
|
|
78
|
+
export const discardCopy = (control)=>`Visitors go back to ${control}. The test moves to Archived and keeps its results and decision note. You can then delete it.`;
|
|
79
|
+
export const archiveCopy = (control)=>`The test moves out of the active list into Archived. It won't collect any more data, and visitors will keep seeing ${control}. You can still view the results or delete the test later. You can't restart it.`;
|
|
80
|
+
export const decideCopy = (winner, holdout, control, isControl)=>holdout && !isControl ? `Everyone except the holdout will see ${winner}. The holdout keeps seeing ${control} so we can measure the shipped change.` : `Everyone will see ${winner}.`;
|
|
78
81
|
export const releaseCopy = (winner)=>`The holdout will see ${winner} too. Measuring since shipping ends.`;
|
|
79
82
|
export const makeContentCopy = (winner, kind)=>kind === 'flag' ? `Saves ${winner}'s settings as the new defaults so the test can be archived.` : kind === 'page' ? `Archives the test and keeps serving ${winner} at the test's addresses. The pages and results are kept.` : `Copies ${winner} into the page content so the test can be archived.`;
|
|
80
83
|
export const hardCodedLabel = (winner)=>`The developer has hard-coded ${winner}`;
|
|
@@ -45,6 +45,16 @@ export declare const ADVANCED_COPY: {
|
|
|
45
45
|
readonly label: "Unit type";
|
|
46
46
|
readonly help: "Count visitors or signed-in users, as chosen at creation.";
|
|
47
47
|
};
|
|
48
|
+
readonly kinds: {
|
|
49
|
+
readonly block: "Page block";
|
|
50
|
+
readonly flag: "Setting";
|
|
51
|
+
readonly code: "Developer code";
|
|
52
|
+
readonly page: "Whole page";
|
|
53
|
+
};
|
|
54
|
+
readonly units: {
|
|
55
|
+
readonly visitor: "Each visitor";
|
|
56
|
+
readonly user: "Each signed-in user";
|
|
57
|
+
};
|
|
48
58
|
readonly inheritedWindow: "Use each goal's window";
|
|
49
59
|
readonly automaticTuning: "Automatic (5,000)";
|
|
50
60
|
readonly sequential: "Sequential";
|
|
@@ -45,6 +45,16 @@ export const ADVANCED_COPY = {
|
|
|
45
45
|
label: 'Unit type',
|
|
46
46
|
help: 'Count visitors or signed-in users, as chosen at creation.'
|
|
47
47
|
},
|
|
48
|
+
kinds: {
|
|
49
|
+
block: 'Page block',
|
|
50
|
+
flag: 'Setting',
|
|
51
|
+
code: 'Developer code',
|
|
52
|
+
page: 'Whole page'
|
|
53
|
+
},
|
|
54
|
+
units: {
|
|
55
|
+
visitor: 'Each visitor',
|
|
56
|
+
user: 'Each signed-in user'
|
|
57
|
+
},
|
|
48
58
|
inheritedWindow: "Use each goal's window",
|
|
49
59
|
automaticTuning: 'Automatic (5,000)',
|
|
50
60
|
sequential: 'Sequential',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ARM_LABELS as GROUP_LABELS } from '../../labels/arms.js';
|
|
2
2
|
export { ISSUE_COPY, issueMessage } from '../../arms/copy.js';
|
|
3
3
|
export declare const ARMS_COPY: {
|
|
4
|
-
readonly holdout:
|
|
4
|
+
readonly holdout: (control: string) => string;
|
|
5
5
|
readonly pageRequired: "Enter a page path for this group.";
|
|
6
6
|
readonly pageInvalid: "Use a page path starting with /, without a host, query or fragment.";
|
|
7
7
|
readonly paramRequired: "Enter a value for {label}.";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { ARM_LABELS as GROUP_LABELS } from '../../labels/arms.js';
|
|
2
2
|
export { ISSUE_COPY, issueMessage } from '../../arms/copy.js';
|
|
3
3
|
export const ARMS_COPY = {
|
|
4
|
-
holdout:
|
|
4
|
+
holdout: (control)=>`The holdout sees ${control} and is measured but not compared during the test. After you decide, it keeps seeing ${control} so the winner can be compared with it.`,
|
|
5
5
|
pageRequired: 'Enter a page path for this group.',
|
|
6
6
|
pageInvalid: 'Use a page path starting with /, without a host, query or fragment.',
|
|
7
7
|
paramRequired: 'Enter a value for {label}.',
|
|
@@ -23,9 +23,10 @@ export declare const NUMBER_OP_LABELS: {
|
|
|
23
23
|
export declare const participation: (allocation: string, people: string, groups: string) => string;
|
|
24
24
|
export declare const eachVersion: (share: string) => string;
|
|
25
25
|
export declare const groupShare: (share: string, label: string) => string;
|
|
26
|
-
export declare const uncounted
|
|
27
|
-
export declare const holdoutClause: (weight: string) => string;
|
|
28
|
-
export declare const holdoutRemainder
|
|
26
|
+
export declare const uncounted: (control: string) => string;
|
|
27
|
+
export declare const holdoutClause: (weight: string, control: string) => string;
|
|
28
|
+
export declare const holdoutRemainder: (control: string) => string;
|
|
29
|
+
export declare const holdoutContent: (control: string) => string;
|
|
29
30
|
export declare const layerSentence: (name: string, used: number, free: number) => string;
|
|
30
31
|
export declare const peopleLabel: {
|
|
31
32
|
readonly visitor: "visitors";
|
|
@@ -22,10 +22,11 @@ export const NUMBER_OP_LABELS = {
|
|
|
22
22
|
};
|
|
23
23
|
export const participation = (allocation, people, groups)=>`${allocation}% of ${people} take part: about ${groups}`;
|
|
24
24
|
export const eachVersion = (share)=>`${share}% see each version`;
|
|
25
|
-
export const groupShare = (share, label)=>`${share}% see ${label
|
|
26
|
-
export const uncounted =
|
|
27
|
-
export const holdoutClause = (weight)=>`; the holdout (${weight}% of them) sees
|
|
28
|
-
export const holdoutRemainder =
|
|
25
|
+
export const groupShare = (share, label)=>`${share}% see ${label}`;
|
|
26
|
+
export const uncounted = (control)=>`; the rest see ${control} and are not counted`;
|
|
27
|
+
export const holdoutClause = (weight, control)=>`; the holdout (${weight}% of them) sees ${control} and is measured`;
|
|
28
|
+
export const holdoutRemainder = (control)=>`; everyone else sees ${control} and is not counted`;
|
|
29
|
+
export const holdoutContent = (control)=>`Sees ${control}`;
|
|
29
30
|
export const layerSentence = (name, used, free)=>` Uses ${used} of the 100 slices in layer ${name}; ${free} are free.`;
|
|
30
31
|
export const peopleLabel = {
|
|
31
32
|
visitor: 'visitors',
|
|
@@ -18,9 +18,9 @@ export declare const API_MESSAGES: {
|
|
|
18
18
|
};
|
|
19
19
|
export declare const LOCKED_MESSAGES: {
|
|
20
20
|
readonly creation: "Set when the test was created.";
|
|
21
|
-
readonly running: "Locked while the test is running
|
|
21
|
+
readonly running: "Locked while the test is running. Stop the test to change this.";
|
|
22
22
|
readonly runningAllocation: "To include more people, use \"Let more people in\" at the bottom of the page. To include fewer, stop the test; the change applies when you start it again.";
|
|
23
|
-
readonly runningMetrics: "
|
|
23
|
+
readonly runningMetrics: "Use \"Add a goal\" to track another goal. The main goal is fixed for this round.";
|
|
24
24
|
readonly decided: "Locked after the decision.";
|
|
25
25
|
readonly archived: "Archived tests can't be changed.";
|
|
26
26
|
readonly other: "Can't be changed in this state.";
|
|
@@ -19,9 +19,9 @@ export const API_MESSAGES = {
|
|
|
19
19
|
};
|
|
20
20
|
export const LOCKED_MESSAGES = {
|
|
21
21
|
creation: 'Set when the test was created.',
|
|
22
|
-
running: 'Locked while the test is running
|
|
22
|
+
running: 'Locked while the test is running. Stop the test to change this.',
|
|
23
23
|
runningAllocation: 'To include more people, use "Let more people in" at the bottom of the page. To include fewer, stop the test; the change applies when you start it again.',
|
|
24
|
-
runningMetrics: '
|
|
24
|
+
runningMetrics: 'Use "Add a goal" to track another goal. The main goal is fixed for this round.',
|
|
25
25
|
decided: 'Locked after the decision.',
|
|
26
26
|
archived: "Archived tests can't be changed.",
|
|
27
27
|
other: "Can't be changed in this state."
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export declare const GOAL_ROLES: {
|
|
2
|
+
readonly primary: "Main goal";
|
|
3
|
+
readonly secondary: "Also tracked";
|
|
4
|
+
readonly guardrail: "Must not get worse";
|
|
5
|
+
};
|
|
1
6
|
export declare const METRICS_COPY: {
|
|
2
7
|
readonly source: "Measured by";
|
|
3
8
|
readonly browserWritablePrimary: "Visitors' browsers report this goal. Automated traffic can affect the results. For important decisions, use a goal your server records.";
|
|
@@ -8,3 +13,4 @@ export declare const METRIC_KIND_LABELS: {
|
|
|
8
13
|
readonly count: "count";
|
|
9
14
|
readonly revenue: "amount";
|
|
10
15
|
};
|
|
16
|
+
export declare function percentileTail(quantile: number): number;
|