@delmaredigital/payload-experiments 0.4.0-rc.7 → 0.4.0
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/README.md +9 -15
- package/dist/admin/MetricSourceSelect.js +10 -3
- package/dist/admin/armSelect/armSelect.model.d.ts +1 -1
- package/dist/admin/blocks/BlockPanel.d.ts +1 -0
- package/dist/admin/blocks/BlockPanel.js +75 -29
- package/dist/admin/blocks/model.js +7 -6
- package/dist/admin/copy/blocks.d.ts +14 -11
- package/dist/admin/copy/blocks.js +33 -22
- package/dist/admin/copy/goals.d.ts +15 -8
- package/dist/admin/copy/goals.js +18 -8
- package/dist/admin/copy/newTest.d.ts +10 -7
- package/dist/admin/copy/newTest.js +14 -7
- package/dist/admin/copy/status.d.ts +1 -1
- package/dist/admin/copy/status.js +2 -1
- package/dist/admin/pageCollections.d.ts +1 -0
- package/dist/admin/pageCollections.js +3 -0
- package/dist/admin/placementStatus.model.js +5 -3
- package/dist/admin/status.model.d.ts +1 -0
- package/dist/admin/status.model.js +2 -1
- package/dist/admin/surface/ResultsRoute.js +12 -10
- package/dist/admin/surface/SurfaceShell.d.ts +4 -2
- package/dist/admin/surface/SurfaceShell.js +28 -3
- package/dist/admin/surface/TestRowMenu.d.ts +13 -0
- package/dist/admin/surface/TestRowMenu.js +163 -0
- package/dist/admin/surface/TestsHome.d.ts +4 -3
- package/dist/admin/surface/TestsHome.js +224 -52
- package/dist/admin/surface/TestsSurface.js +2 -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 -198
- 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 +15 -8
- package/dist/admin/surface/home.model.js +22 -18
- package/dist/admin/surface/newTest/NewTest.d.ts +3 -3
- package/dist/admin/surface/newTest/NewTest.js +156 -96
- package/dist/admin/surface/newTest/PageWizard.d.ts +4 -1
- package/dist/admin/surface/newTest/PageWizard.js +99 -68
- package/dist/admin/surface/newTest/newTest.css +28 -11
- package/dist/admin/surface/results/ResultsHeader.d.ts +1 -1
- package/dist/admin/surface/results/ResultsHeader.js +98 -66
- package/dist/admin/surface/surface.css +29 -0
- package/dist/admin/surface/test/TestPage.js +46 -38
- 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/admin/views/buildSurfaceProps.js +18 -66
- package/dist/arms/copy.d.ts +13 -3
- package/dist/arms/copy.js +5 -4
- package/dist/blocks/createExperimentBlock.js +1 -1
- package/dist/blocks/formState.js +2 -2
- package/dist/collections/experiments/armInvariants.js +8 -5
- package/dist/collections/experiments/config.js +8 -3
- package/dist/collections/experiments/deleteGuard.js +2 -2
- package/dist/collections/experiments/lockHook.js +21 -2
- package/dist/collections/experiments/pickSlug.js +2 -0
- package/dist/collections/metrics.js +12 -5
- package/dist/collections/metricsGuards.js +2 -0
- package/dist/collections/serialize.js +8 -6
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/db/adapter.d.ts +9 -1
- package/dist/db/adapter.js +77 -1
- package/dist/db/delete.d.ts +1 -1
- package/dist/db/delete.js +2 -4
- package/dist/db/events.d.ts +9 -0
- package/dist/db/events.js +42 -8
- package/dist/db/executor.d.ts +7 -1
- package/dist/db/executor.js +7 -3
- package/dist/db/pageCopies.d.ts +5 -0
- package/dist/db/pageCopies.js +31 -0
- package/dist/db/results.d.ts +5 -1
- package/dist/db/results.js +21 -5
- package/dist/db/snapshots.d.ts +2 -0
- package/dist/endpoints/deleteImpact.js +2 -1
- package/dist/endpoints/duplicateOriginal.d.ts +38 -0
- package/dist/endpoints/duplicateOriginal.js +414 -0
- package/dist/endpoints/editorSurface.js +1 -1
- package/dist/endpoints/events.js +103 -39
- package/dist/endpoints/index.js +22 -8
- package/dist/endpoints/pages.js +245 -66
- package/dist/endpoints/placementStatus.js +8 -4
- package/dist/endpoints/results.d.ts +1 -1
- package/dist/endpoints/results.js +9 -2
- package/dist/endpoints/routeId.d.ts +2 -2
- package/dist/endpoints/routeId.js +11 -5
- package/dist/endpoints/summary.js +46 -12
- package/dist/endpoints/testVersion.d.ts +2 -0
- package/dist/endpoints/testVersion.js +38 -0
- package/dist/endpoints/transitions.js +41 -29
- package/dist/errors.d.ts +4 -0
- package/dist/errors.js +6 -0
- package/dist/events/request.d.ts +6 -2
- package/dist/events/request.js +35 -8
- package/dist/events/rows.d.ts +1 -1
- package/dist/events/rows.js +24 -8
- package/dist/events/writable.d.ts +9 -0
- package/dist/events/writable.js +13 -0
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/rsc.d.ts +1 -0
- package/dist/exports/rsc.js +1 -0
- package/dist/goals/fairness.js +2 -2
- package/dist/goals/picker/copy.js +1 -1
- package/dist/goals/sourceLabel.d.ts +2 -0
- package/dist/goals/sourceLabel.js +4 -0
- package/dist/hooks/hostHook.js +6 -2
- package/dist/hooks/pageGuard.js +4 -0
- package/dist/hooks/trackPageCopies.d.ts +11 -0
- package/dist/hooks/trackPageCopies.js +7 -0
- package/dist/labels/arms.d.ts +3 -0
- package/dist/labels/arms.js +8 -0
- package/dist/lib/fetchAllDocs.d.ts +1 -1
- package/dist/manifest/compile.js +8 -5
- package/dist/onInit.js +14 -0
- package/dist/options.d.ts +2 -0
- package/dist/options.js +23 -2
- package/dist/plugin.js +56 -2
- package/dist/proxy/pageNavigation.d.ts +4 -0
- package/dist/proxy/pageNavigation.js +28 -0
- package/dist/proxy/resolve.js +52 -25
- package/dist/puck/editor/ConfigureTestDrawer.d.ts +7 -7
- package/dist/puck/editor/ConfigureTestDrawer.js +40 -29
- package/dist/puck/editor/ExperimentSlotEditor.d.ts +2 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +376 -139
- package/dist/puck/editor/LeftoverVersions.js +17 -32
- package/dist/puck/editor/QuickTestActions.d.ts +6 -3
- package/dist/puck/editor/QuickTestActions.js +55 -33
- package/dist/puck/editor/ResultsReadout.d.ts +4 -1
- package/dist/puck/editor/ResultsReadout.js +28 -15
- package/dist/puck/editor/VersionBuilder.d.ts +17 -4
- package/dist/puck/editor/VersionBuilder.js +175 -112
- package/dist/puck/editor/armWrites.js +2 -2
- package/dist/puck/editor/armsCache.js +1 -3
- package/dist/puck/editor/copy.d.ts +14 -7
- package/dist/puck/editor/copy.js +26 -13
- package/dist/puck/editor/editor.chrome.css +10 -8
- package/dist/puck/editor/editor.css +15 -9
- package/dist/puck/editor/editor.model.d.ts +1 -0
- package/dist/puck/editor/placementsCache.d.ts +4 -0
- package/dist/puck/editor/usePageSaveReadiness.d.ts +6 -0
- package/dist/puck/editor/usePageSaveReadiness.js +31 -0
- package/dist/puck/nestedTestCopy.js +2 -2
- package/dist/puck/slotConfig.d.ts +1 -1
- package/dist/puck/slotConfig.js +1 -1
- package/dist/results/aggregate.d.ts +6 -3
- package/dist/results/aggregate.js +9 -9
- package/dist/results/analyse.d.ts +2 -0
- package/dist/results/analyse.js +2 -2
- package/dist/results/health.d.ts +8 -0
- package/dist/results/health.js +28 -0
- package/dist/results/identityCredit.d.ts +1 -0
- package/dist/results/identityCredit.js +4 -1
- package/dist/results/verdict.d.ts +4 -4
- package/dist/results/verdict.js +15 -11
- package/dist/runtime/cookie.d.ts +10 -2
- package/dist/runtime/cookie.js +38 -6
- package/dist/runtime/cookieOptions.d.ts +6 -0
- package/dist/runtime/cookieOptions.js +14 -0
- package/dist/runtime/proxyRuntime.d.ts +1 -0
- package/dist/runtime/proxyRuntime.js +18 -8
- package/dist/runtime/signing.d.ts +1 -0
- package/dist/runtime/signing.js +5 -0
- package/dist/sanitizeReadinessDetail.d.ts +2 -2
- package/dist/sanitizeReadinessDetail.js +20 -2
- package/dist/server/getAssignments.js +11 -10
- package/dist/server/recordContentChange.d.ts +1 -1
- package/dist/server/recordContentChange.js +11 -2
- package/dist/server/resolveExperimentBlocks.js +2 -4
- package/dist/server/resolveExperimentData.js +2 -5
- package/dist/server/runResults.js +54 -15
- package/dist/server/startExperiment.d.ts +20 -0
- package/dist/server/startExperiment.js +70 -0
- package/dist/server/trackConversion.js +10 -13
- package/dist/testSurface/PreviewLinks.d.ts +2 -1
- package/dist/testSurface/PreviewLinks.js +3 -3
- package/dist/testSurface/actions/DecideDialog.d.ts +10 -4
- package/dist/testSurface/actions/DecideDialog.js +93 -63
- package/dist/testSurface/actions/LifecycleAction.d.ts +17 -0
- package/dist/testSurface/actions/LifecycleAction.js +107 -0
- package/dist/testSurface/actions/MakeContentResult.d.ts +4 -3
- package/dist/testSurface/actions/MakeContentResult.js +10 -2
- package/dist/testSurface/actions/actions.model.d.ts +13 -5
- package/dist/testSurface/actions/actions.model.js +75 -22
- 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/api.d.ts +9 -6
- package/dist/testSurface/api.js +43 -23
- package/dist/testSurface/copy/actions.d.ts +37 -14
- package/dist/testSurface/copy/actions.js +40 -17
- 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 +8 -6
- package/dist/testSurface/copy/common.js +8 -6
- package/dist/testSurface/copy/languages.d.ts +1 -0
- package/dist/testSurface/copy/languages.js +1 -0
- package/dist/testSurface/copy/metrics.d.ts +7 -0
- package/dist/testSurface/copy/metrics.js +9 -0
- package/dist/testSurface/copy/pages.d.ts +67 -7
- package/dist/testSurface/copy/pages.js +74 -7
- package/dist/testSurface/copy/readiness.d.ts +20 -7
- package/dist/testSurface/copy/readiness.js +36 -10
- package/dist/testSurface/copy/recommendation.d.ts +1 -22
- package/dist/testSurface/copy/recommendation.js +2 -22
- package/dist/testSurface/copy/results.d.ts +21 -12
- package/dist/testSurface/copy/results.js +24 -13
- package/dist/testSurface/copy/review.d.ts +13 -10
- package/dist/testSurface/copy/review.js +14 -10
- package/dist/testSurface/copy/setting.d.ts +1 -2
- package/dist/testSurface/copy/setting.js +1 -2
- package/dist/testSurface/copy/surface.d.ts +11 -2
- package/dist/testSurface/copy/surface.js +14 -11
- package/dist/testSurface/copy/testPage.d.ts +36 -12
- package/dist/testSurface/copy/testPage.js +53 -16
- package/dist/testSurface/format/date.d.ts +5 -2
- package/dist/testSurface/format/date.js +24 -8
- package/dist/testSurface/format/roundProgress.d.ts +6 -0
- package/dist/testSurface/format/roundProgress.js +15 -0
- package/dist/testSurface/format/useDateFormatter.d.ts +3 -0
- package/dist/testSurface/format/useDateFormatter.js +8 -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/readPreflight.d.ts +4 -0
- package/dist/testSurface/readPreflight.js +6 -0
- package/dist/testSurface/readinessRead.d.ts +3 -0
- package/dist/testSurface/readinessRead.js +4 -0
- package/dist/testSurface/results/CiChart.js +2 -1
- package/dist/testSurface/results/DataTable.d.ts +1 -1
- package/dist/testSurface/results/DataTable.js +4 -3
- package/dist/testSurface/results/VerdictHero.d.ts +3 -2
- package/dist/testSurface/results/VerdictHero.js +5 -1
- package/dist/testSurface/results/legacy.d.ts +0 -5
- package/dist/testSurface/results/legacy.js +0 -14
- package/dist/testSurface/results/results.css +2 -2
- package/dist/testSurface/results/results.model.d.ts +9 -4
- package/dist/testSurface/results/results.model.js +31 -23
- package/dist/testSurface/results/snapshot.d.ts +2 -0
- package/dist/testSurface/results/snapshot.js +3 -0
- package/dist/testSurface/surface/contracts.d.ts +13 -1
- package/dist/testSurface/surface/editorPlacement.d.ts +3 -3
- package/dist/testSurface/surface/editorPlacement.js +2 -2
- package/dist/testSurface/surface/pageBlock/pageBlock.model.js +3 -3
- package/dist/testSurface/surface/pageBlock/parts.js +25 -12
- package/dist/testSurface/surface/pagePicker/CopyRoute.d.ts +8 -1
- package/dist/testSurface/surface/pagePicker/CopyRoute.js +243 -22
- package/dist/testSurface/surface/pagePicker/PageCombobox.d.ts +15 -4
- package/dist/testSurface/surface/pagePicker/PageCombobox.js +300 -197
- package/dist/testSurface/surface/pagePicker/pagePicker.css +73 -10
- package/dist/testSurface/surface/pagePicker/pagePicker.model.d.ts +5 -3
- package/dist/testSurface/surface/pagePicker/pagePicker.model.js +17 -2
- package/dist/testSurface/surface/readiness/ActionDialogs.d.ts +9 -5
- package/dist/testSurface/surface/readiness/ActionDialogs.js +241 -230
- package/dist/testSurface/surface/readiness/Banner.d.ts +5 -1
- package/dist/testSurface/surface/readiness/Banner.js +113 -141
- package/dist/testSurface/surface/readiness/SaveStatus.d.ts +8 -4
- package/dist/testSurface/surface/readiness/SaveStatus.js +23 -22
- package/dist/testSurface/surface/readiness/readiness.model.d.ts +20 -6
- package/dist/testSurface/surface/readiness/readiness.model.js +168 -21
- package/dist/testSurface/surface/readiness/useTransition.d.ts +6 -4
- package/dist/testSurface/surface/readiness/useTransition.js +57 -14
- package/dist/testSurface/surface/results/ReleasePages.d.ts +6 -3
- package/dist/testSurface/surface/results/ReleasePages.js +42 -41
- package/dist/testSurface/surface/results/ResultsBody.d.ts +11 -4
- package/dist/testSurface/surface/results/ResultsBody.js +221 -118
- package/dist/testSurface/surface/results/recommendation.model.d.ts +6 -9
- package/dist/testSurface/surface/results/recommendation.model.js +15 -59
- package/dist/testSurface/surface/results/useResults.d.ts +13 -8
- package/dist/testSurface/surface/results/useResults.js +3 -2
- package/dist/testSurface/surface/setting/parts.js +89 -46
- package/dist/testSurface/surface/setting/setting.css +2 -1
- package/dist/testSurface/surface/test/AdvancedSection.js +11 -4
- package/dist/testSurface/surface/test/DeleteTest.d.ts +10 -2
- package/dist/testSurface/surface/test/DeleteTest.js +173 -74
- package/dist/testSurface/surface/test/GoalSection.js +18 -14
- package/dist/testSurface/surface/test/LengthSection.js +24 -13
- package/dist/testSurface/surface/test/PageHoldout.d.ts +1 -1
- package/dist/testSurface/surface/test/PageHoldout.js +11 -8
- package/dist/testSurface/surface/test/ReadinessBar.d.ts +2 -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 +82 -12
- package/dist/testSurface/surface/test/TestSurface.js +73 -37
- package/dist/testSurface/surface/test/VersionsSection.js +141 -91
- package/dist/testSurface/surface/test/fields.d.ts +32 -6
- package/dist/testSurface/surface/test/fields.js +166 -52
- package/dist/testSurface/surface/test/pageParts.js +27 -12
- package/dist/testSurface/surface/test/testPage.css +9 -2
- package/dist/testSurface/surface/test/testPage.model.d.ts +1 -0
- package/dist/testSurface/surface/test/testPage.model.js +6 -0
- package/dist/testSurface/surface/testDocument.model.d.ts +3 -0
- package/dist/testSurface/surface/testDocument.model.js +4 -1
- package/dist/testSurface/surface/useTestDocument.d.ts +21 -5
- package/dist/testSurface/surface/useTestDocument.js +472 -167
- package/dist/testSurface/surface/watchTestDocument.d.ts +15 -0
- package/dist/testSurface/surface/watchTestDocument.js +181 -0
- package/dist/testSurface/surfaceUrls.d.ts +1 -0
- package/dist/testSurface/surfaceUrls.js +4 -0
- package/dist/testSurface/useApi.d.ts +8 -5
- package/dist/testSurface/useOnTestReturn.d.ts +2 -0
- package/dist/testSurface/useOnTestReturn.js +27 -0
- package/dist/testSurface/useReadinessPolling.js +3 -1
- package/dist/transitions/addMetric.d.ts +2 -5
- package/dist/transitions/addMetric.js +5 -1
- package/dist/transitions/allocate.d.ts +2 -2
- package/dist/transitions/allocate.js +3 -1
- package/dist/transitions/archive.d.ts +1 -1
- package/dist/transitions/archive.js +3 -2
- package/dist/transitions/checkStart.d.ts +1 -0
- package/dist/transitions/checkStart.js +17 -6
- package/dist/transitions/decide.d.ts +1 -1
- package/dist/transitions/decide.js +5 -3
- package/dist/transitions/deleteExperiment.d.ts +2 -2
- package/dist/transitions/deleteExperiment.js +17 -7
- package/dist/transitions/kernel.d.ts +4 -0
- package/dist/transitions/kernel.js +9 -4
- package/dist/transitions/makeContent.d.ts +2 -1
- package/dist/transitions/makeContent.js +12 -8
- package/dist/transitions/nestedPlacementNames.d.ts +2 -2
- package/dist/transitions/nestedPlacementNames.js +4 -5
- package/dist/transitions/pageAddress.d.ts +6 -0
- package/dist/transitions/pageAddress.js +71 -0
- package/dist/transitions/pageVersions.d.ts +1 -1
- package/dist/transitions/phaseRecord.d.ts +2 -0
- package/dist/transitions/phaseRecord.js +5 -0
- package/dist/transitions/placementInteractions.d.ts +3 -3
- package/dist/transitions/placementInteractions.js +8 -7
- package/dist/transitions/placements.d.ts +2 -0
- package/dist/transitions/placements.js +5 -5
- package/dist/transitions/preflightData.d.ts +3 -2
- package/dist/transitions/preflightData.js +77 -43
- package/dist/transitions/releaseHoldout.d.ts +2 -1
- package/dist/transitions/releaseHoldout.js +3 -1
- package/dist/transitions/releasePages.d.ts +2 -1
- package/dist/transitions/releasePages.js +3 -1
- package/dist/transitions/resolveCaps.d.ts +2 -4
- package/dist/transitions/start.d.ts +7 -9
- package/dist/transitions/start.js +75 -39
- package/dist/transitions/startReads.d.ts +7 -0
- package/dist/transitions/startReads.js +28 -0
- package/dist/transitions/stop.d.ts +2 -1
- package/dist/transitions/stop.js +3 -2
- package/dist/types/armKey.d.ts +2 -0
- package/dist/types/armKey.js +1 -0
- package/dist/types/contracts.d.ts +17 -4
- package/dist/types/endpoints.d.ts +89 -17
- package/dist/types/endpoints.js +1 -1
- package/dist/types/runtime.d.ts +15 -9
- package/dist/types/snapshot.d.ts +2 -0
- package/dist/types/surface.d.ts +7 -9
- package/dist/ui/ChipsInput.d.ts +8 -1
- package/dist/ui/ChipsInput.js +17 -4
- package/dist/ui/Dialog.d.ts +21 -2
- package/dist/ui/Dialog.js +101 -4
- package/dist/ui/Inputs.js +0 -1
- package/dist/ui/ui.css +5 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { GOAL_ROLES } from './metrics.js';
|
|
1
2
|
export const RESULTS_COPY = {
|
|
2
|
-
chooseGroup: 'Choose a group',
|
|
3
3
|
tests: 'Tests',
|
|
4
4
|
results: 'Results',
|
|
5
5
|
test: 'Test',
|
|
@@ -39,7 +39,6 @@ export const RESULTS_COPY = {
|
|
|
39
39
|
chanceToWin: 'Chance to win',
|
|
40
40
|
risk: 'Risk',
|
|
41
41
|
comparison: 'Comparison',
|
|
42
|
-
original: 'Original',
|
|
43
42
|
holdout: 'Measured, not compared',
|
|
44
43
|
holdoutBaseline: 'Holdout · baseline',
|
|
45
44
|
shippedGroup: 'the winner',
|
|
@@ -58,19 +57,22 @@ export const RESULTS_COPY = {
|
|
|
58
57
|
infeasible: 'A clear answer would take more than 90 days at this traffic.',
|
|
59
58
|
noCap: 'Not capped: fewer than 20 people had this outcome in the 90 days before Start, so every value counts in full.',
|
|
60
59
|
quality: 'Data quality',
|
|
61
|
-
missingWinner:
|
|
62
|
-
missingWinnerNext: '
|
|
63
|
-
srm: "Traffic isn't splitting as set.
|
|
60
|
+
missingWinner: "The stored winner is missing from this round's results.",
|
|
61
|
+
missingWinnerNext: 'Refresh results. If the problem continues, contact a developer before trusting these results.',
|
|
62
|
+
srm: "Traffic isn't splitting as set. Caching, a page placed twice, or automated traffic could affect the split.",
|
|
63
|
+
srmAction: "Don't trust these results. Ask a developer to check for caching, a page placed twice, or automated traffic.",
|
|
64
64
|
multiGroup: 'People who saw more than one group were excluded.',
|
|
65
65
|
multiGroupNext: 'Check for caching or a page placed twice before trusting the results.',
|
|
66
66
|
mismatch: "Beacons that didn't match the assigned group were ignored.",
|
|
67
67
|
mismatchNext: 'Check that the page reports the group it actually showed.',
|
|
68
|
+
rapidBrowserEvents: 'A larger share of visitors acted within seconds of arriving on one version than on another. One version may make it easier to act quickly, or some activity may be automated.',
|
|
69
|
+
rapidBrowserEventsNext: 'Check where the action appears in each version and ask your site team to review the traffic before choosing a winner.',
|
|
68
70
|
identity: 'Some linked identities were seen in different groups.',
|
|
69
71
|
identityNext: 'Check identity linking at sign-in and registration.',
|
|
70
72
|
tooFew: 'Too few people have seen the compared groups.',
|
|
71
73
|
tooFewNext: 'Keep collecting results until each compared group reaches the planned minimum.',
|
|
72
74
|
layerFull: 'The layer has fewer slices reserved than the requested allocation.',
|
|
73
|
-
layerNext: 'Free
|
|
75
|
+
layerNext: 'Free up room in the layer to include more people.',
|
|
74
76
|
unavailable: {
|
|
75
77
|
'source-failed': "couldn't be read this time; the next results run will try again.",
|
|
76
78
|
'source-unavailable': "can't be read because its data source is no longer available. Ask a developer to check this goal.",
|
|
@@ -81,7 +83,7 @@ export const RESULTS_COPY = {
|
|
|
81
83
|
'not-supplied': "has no data for this results run; the next results run will try again.",
|
|
82
84
|
'analysis-failed': "couldn't be calculated this time; the next results run will try again."
|
|
83
85
|
},
|
|
84
|
-
unavailableNext: '
|
|
86
|
+
unavailableNext: 'Refresh results. If the problem continues, contact a developer.',
|
|
85
87
|
loading: 'Loading results…',
|
|
86
88
|
refreshing: 'Refreshing…',
|
|
87
89
|
retryPreview: 'Retry preview links',
|
|
@@ -89,11 +91,13 @@ export const RESULTS_COPY = {
|
|
|
89
91
|
empty: 'No results yet — the first results appear within the hour after Start.',
|
|
90
92
|
retry: 'Retry',
|
|
91
93
|
round: 'Round',
|
|
92
|
-
recompute: '
|
|
93
|
-
recomputing: '
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
recompute: 'Refresh results',
|
|
95
|
+
recomputing: 'Refreshing…',
|
|
96
|
+
updated: (time)=>`Updated ${time}`,
|
|
97
|
+
previousRound: 'Choose the latest test round to decide.',
|
|
98
|
+
primary: GOAL_ROLES.primary,
|
|
99
|
+
secondary: `${GOAL_ROLES.secondary} (not used for the decision)`,
|
|
100
|
+
guardrail: GOAL_ROLES.guardrail,
|
|
97
101
|
chart: 'Confidence interval over time',
|
|
98
102
|
noHistory: 'Not enough history yet.'
|
|
99
103
|
};
|
|
@@ -101,10 +105,14 @@ export const pagesReleasedCopy = (date, name)=>`Pages released ${date}${name ? `
|
|
|
101
105
|
export const roundLabel = (round, kind)=>`Round ${round} · ${kind}`;
|
|
102
106
|
export const decidedTitle = (winner)=>`Decided: ${winner}`;
|
|
103
107
|
export const shippingTitle = (winner)=>`Since shipping ${winner}`;
|
|
104
|
-
export const
|
|
108
|
+
export const keepRunningTo = (date)=>`Keep running to the planned end (${date}).`;
|
|
109
|
+
export const pastPlannedEnd = (date)=>`The planned end was ${date}.`;
|
|
110
|
+
export const moreDays = (days)=>`At this traffic, a clear answer needs about ${days} more ${days === '1' ? 'day' : 'days'}.`;
|
|
105
111
|
export const collectingCopy = (n, minimum, conversions, conversionMinimum)=>`${n} of ${minimum} people, ${conversions} of ${conversionMinimum} conversions`;
|
|
106
112
|
export const uncappedTotal = (total)=>`Total ${total} (not capped)`;
|
|
107
113
|
export const cappedCount = (count, cap)=>`${count} capped at ${cap}`;
|
|
114
|
+
export const revenueCapHelp = (threshold)=>`Amounts above ${threshold} are limited in the comparison. Totals include the full amounts.`;
|
|
115
|
+
export const percentileCapHelp = (tail)=>revenueCapHelp(tail === 0 ? 'the largest amount from the 90 days before the test' : `the cutoff for the largest ${tail}% of amounts from the 90 days before the test`);
|
|
108
116
|
export const atLeast = (bound)=>`at least ${bound}`;
|
|
109
117
|
export const atMost = (bound)=>`at most ${bound}`;
|
|
110
118
|
export const intervalCopy = (low, high)=>`${low} to ${high}`;
|
|
@@ -120,3 +128,6 @@ export const chartSummary = (metric, groups, from, to, changes = [])=>`${metric}
|
|
|
120
128
|
}).format(changes)}.` : ''}`;
|
|
121
129
|
export const contentChangeTitle = (date)=>`Content changed ${date} by an editor`;
|
|
122
130
|
export const daysOfPlan = (days, planned)=>`${days} of ${planned}`;
|
|
131
|
+
/** Use the frozen control label in the fixed wording stored by older verdict writers. */ export function verdictControlCopy(sentence, control) {
|
|
132
|
+
return sentence.replace(/^The Original is better\.(?= Decide for the Original\.$|$)/, ()=>`${control} is better.`).replace(/(^|\. )Decide for the Original(?=\.$| or restart without (?:it|them)\.$)/, (_, boundary)=>`${boundary}Decide for ${control}`).replace(/^((?:Both|All \d+ variants) beat )the Original;/, (_, lead)=>`${lead}${control};`).replace(/^(The main outcome improved compared with |This describes the shipped version compared with people still seeing )the Original\.$/, (_, lead)=>`${lead}${control}.`).replace(/(^|\. )((?:Smallest group so far|Fewest conversions so far): )Original,/g, (_, boundary, lead)=>`${boundary}${lead}${control},`);
|
|
133
|
+
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
export declare const REVIEW_COPY: {
|
|
2
|
-
readonly noBaseline: "No data yet for this
|
|
2
|
+
readonly noBaseline: "No data yet for this goal.";
|
|
3
3
|
readonly preview: "Preview";
|
|
4
|
-
readonly previewBlocked: "Your browser blocked the preview window. Allow pop-ups for this site
|
|
4
|
+
readonly previewBlocked: "Your browser blocked the preview window. Allow pop-ups for this site.";
|
|
5
5
|
readonly placedTimes: (n: number) => string;
|
|
6
6
|
readonly raise: "Raise allocation";
|
|
7
|
-
readonly addMetric: "Add a
|
|
7
|
+
readonly addMetric: "Add a goal";
|
|
8
8
|
readonly allocationBody: "Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.";
|
|
9
9
|
readonly allocationInvalid: "Enter a whole percentage higher than the current allocation and no more than 100.";
|
|
10
|
-
readonly role: "
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
10
|
+
readonly role: "How it counts";
|
|
11
|
+
readonly primary: "Main goal";
|
|
12
|
+
readonly supporting: "Also tracked";
|
|
13
|
+
readonly guardrail: "Must not get worse";
|
|
14
|
+
readonly metric: "Goal";
|
|
15
|
+
readonly chooseMetric: "Choose a goal";
|
|
16
|
+
readonly loadingMetrics: "Loading goals…";
|
|
17
|
+
readonly createGoal: "Create a goal";
|
|
18
|
+
readonly noMetrics: "There are no goals yet.";
|
|
19
|
+
readonly allMetricsAttached: "Every goal is already on this test.";
|
|
17
20
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
+
import { GOAL_ROLES } from './metrics.js';
|
|
1
2
|
export const REVIEW_COPY = {
|
|
2
|
-
noBaseline: 'No data yet for this
|
|
3
|
+
noBaseline: 'No data yet for this goal.',
|
|
3
4
|
preview: 'Preview',
|
|
4
|
-
previewBlocked: 'Your browser blocked the preview window. Allow pop-ups for this site
|
|
5
|
+
previewBlocked: 'Your browser blocked the preview window. Allow pop-ups for this site.',
|
|
5
6
|
placedTimes: (n)=>`(placed ${n} times on this page)`,
|
|
6
7
|
raise: 'Raise allocation',
|
|
7
|
-
addMetric: 'Add a
|
|
8
|
+
addMetric: 'Add a goal',
|
|
8
9
|
allocationBody: 'Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.',
|
|
9
10
|
allocationInvalid: 'Enter a whole percentage higher than the current allocation and no more than 100.',
|
|
10
|
-
role: '
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
role: 'How it counts',
|
|
12
|
+
primary: GOAL_ROLES.primary,
|
|
13
|
+
supporting: GOAL_ROLES.secondary,
|
|
14
|
+
guardrail: GOAL_ROLES.guardrail,
|
|
15
|
+
metric: 'Goal',
|
|
16
|
+
chooseMetric: 'Choose a goal',
|
|
17
|
+
loadingMetrics: 'Loading goals…',
|
|
18
|
+
createGoal: 'Create a goal',
|
|
19
|
+
noMetrics: 'There are no goals yet.',
|
|
20
|
+
allMetricsAttached: 'Every goal is already on this test.'
|
|
17
21
|
};
|
|
@@ -3,8 +3,7 @@ export declare const SETTING_COPY: {
|
|
|
3
3
|
readonly setValues: "Set values";
|
|
4
4
|
readonly setting: "Setting";
|
|
5
5
|
readonly choose: "Choose the setting first.";
|
|
6
|
-
readonly current: "Current
|
|
7
|
-
readonly holdout: "Sees the Original.";
|
|
6
|
+
readonly current: "Current";
|
|
8
7
|
readonly yes: "Yes";
|
|
9
8
|
readonly no: "No";
|
|
10
9
|
readonly empty: "Not set";
|
|
@@ -18,7 +18,15 @@ export declare const SURFACE_COPY: {
|
|
|
18
18
|
readonly retry: "Try again";
|
|
19
19
|
readonly empty: "Create a test to learn what works.";
|
|
20
20
|
readonly clear: "Clear";
|
|
21
|
-
readonly groups:
|
|
21
|
+
readonly groups: {
|
|
22
|
+
readonly attention: "Needs attention";
|
|
23
|
+
readonly running: "Running";
|
|
24
|
+
readonly ready: "Ready to start";
|
|
25
|
+
readonly draft: "Draft";
|
|
26
|
+
readonly stopped: "Stopped";
|
|
27
|
+
readonly decided: "Decided";
|
|
28
|
+
readonly archived: "Archived";
|
|
29
|
+
};
|
|
22
30
|
readonly kinds: {
|
|
23
31
|
readonly block: "Page block";
|
|
24
32
|
readonly flag: "Setting";
|
|
@@ -26,13 +34,14 @@ export declare const SURFACE_COPY: {
|
|
|
26
34
|
readonly page: "Whole page";
|
|
27
35
|
};
|
|
28
36
|
readonly ready: "Ready to start";
|
|
37
|
+
readonly readyAgain: "Ready to start a new round";
|
|
29
38
|
readonly next: "Review setup";
|
|
30
39
|
readonly continue: "Continue setup";
|
|
31
40
|
readonly results: "View results";
|
|
32
41
|
readonly open: "Open";
|
|
33
42
|
readonly health: {
|
|
34
43
|
readonly red: "Needs attention";
|
|
35
|
-
readonly amber: "
|
|
44
|
+
readonly amber: "Needs attention";
|
|
36
45
|
readonly green: "On track";
|
|
37
46
|
};
|
|
38
47
|
readonly backToSetup: "Back to setup";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { READINESS_COPY } from './readiness.js';
|
|
1
2
|
export const SURFACE_COPY = {
|
|
2
3
|
title: 'Tests',
|
|
3
4
|
test: 'Test',
|
|
@@ -18,14 +19,15 @@ export const SURFACE_COPY = {
|
|
|
18
19
|
retry: 'Try again',
|
|
19
20
|
empty: 'Create a test to learn what works.',
|
|
20
21
|
clear: 'Clear',
|
|
21
|
-
groups:
|
|
22
|
-
|
|
23
|
-
'Running',
|
|
24
|
-
'Ready to start',
|
|
25
|
-
'Draft',
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
|
|
22
|
+
groups: {
|
|
23
|
+
attention: READINESS_COPY.needsAttention,
|
|
24
|
+
running: 'Running',
|
|
25
|
+
ready: 'Ready to start',
|
|
26
|
+
draft: 'Draft',
|
|
27
|
+
stopped: 'Stopped',
|
|
28
|
+
decided: 'Decided',
|
|
29
|
+
archived: 'Archived'
|
|
30
|
+
},
|
|
29
31
|
kinds: {
|
|
30
32
|
block: 'Page block',
|
|
31
33
|
flag: 'Setting',
|
|
@@ -33,19 +35,20 @@ export const SURFACE_COPY = {
|
|
|
33
35
|
page: 'Whole page'
|
|
34
36
|
},
|
|
35
37
|
ready: 'Ready to start',
|
|
38
|
+
readyAgain: 'Ready to start a new round',
|
|
36
39
|
next: 'Review setup',
|
|
37
40
|
continue: 'Continue setup',
|
|
38
41
|
results: 'View results',
|
|
39
42
|
open: 'Open',
|
|
40
43
|
health: {
|
|
41
|
-
red:
|
|
42
|
-
amber:
|
|
44
|
+
red: READINESS_COPY.needsAttention,
|
|
45
|
+
amber: READINESS_COPY.needsAttention,
|
|
43
46
|
green: 'On track'
|
|
44
47
|
},
|
|
45
48
|
backToSetup: 'Back to setup'
|
|
46
49
|
};
|
|
47
50
|
export function runningLine(days, planned, people) {
|
|
48
|
-
return `
|
|
51
|
+
return `Day ${days} of ${planned} · ${people} people so far`;
|
|
49
52
|
}
|
|
50
53
|
export function decidedLine(date, winner) {
|
|
51
54
|
return `Decided ${date}: ${winner}`;
|
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
import type { ExperimentKind } from '../../types/contracts.js';
|
|
1
2
|
export declare const TEST_PAGE: {
|
|
2
3
|
readonly noAudienceRules: "No audience choices are available here. Everyone eligible takes part; leave this section as it is.";
|
|
3
4
|
readonly editVersionsOnCanvas: "Edit version content on the canvas.";
|
|
4
5
|
readonly clickPageGroup: "On this test's page";
|
|
5
6
|
readonly clickGoalHelp: "A click shows interest, not the result you want.";
|
|
6
|
-
readonly staleEdit: "
|
|
7
|
+
readonly staleEdit: "This test changed. Reload to see the latest settings and discard your unfinished edits.";
|
|
7
8
|
readonly reload: "Reload";
|
|
9
|
+
readonly reloadAfterError: "Reload to discard your unfinished edits and try again.";
|
|
10
|
+
readonly draftNotSaved: "Your edit is still unsaved.";
|
|
11
|
+
readonly conflictChoice: "Your edit is unsaved. Choose which value to keep. Saving your edit replaces the saved value shown below.";
|
|
12
|
+
readonly keepEdit: "Save my edit";
|
|
13
|
+
readonly retryEdit: "Try saving again";
|
|
14
|
+
readonly editInvalid: "Enter a valid value before saving.";
|
|
15
|
+
readonly detachedEdit: (field: string) => string;
|
|
16
|
+
readonly discardEdit: "Discard edit";
|
|
17
|
+
readonly savedValueChanged: "This field changed while you were editing.";
|
|
18
|
+
readonly savedValue: "Saved value";
|
|
19
|
+
readonly emptyValue: "(empty)";
|
|
20
|
+
readonly useSavedValue: "Use saved value";
|
|
8
21
|
readonly loading: "Loading test…";
|
|
9
22
|
readonly forbidden: "You don't have access to this test.";
|
|
10
23
|
readonly missing: "This test no longer exists.";
|
|
@@ -37,9 +50,11 @@ export declare const TEST_PAGE: {
|
|
|
37
50
|
};
|
|
38
51
|
readonly hypothesis: "Why are you testing this? (optional)";
|
|
39
52
|
readonly hypothesisPlaceholder: "We believe … will … because …";
|
|
40
|
-
readonly notPlaced: "
|
|
41
|
-
readonly onPage: "
|
|
42
|
-
readonly openPage: "Open
|
|
53
|
+
readonly notPlaced: "This test needs a block on a page. Add it to a Test block.";
|
|
54
|
+
readonly onPage: "Page:";
|
|
55
|
+
readonly openPage: "Open page";
|
|
56
|
+
readonly published: "Published";
|
|
57
|
+
readonly draft: "Draft";
|
|
43
58
|
readonly editedOnPage: "Versions are edited on the page.";
|
|
44
59
|
readonly editOnPage: "Edit on page";
|
|
45
60
|
readonly empty: "Empty";
|
|
@@ -48,8 +63,9 @@ export declare const TEST_PAGE: {
|
|
|
48
63
|
readonly ready: "Content ready";
|
|
49
64
|
readonly emptySlot: "Nothing in this slot yet";
|
|
50
65
|
readonly pageBinding: "Each version is a whole page at its own address.";
|
|
66
|
+
readonly partialSlotContent: "Some slots empty";
|
|
51
67
|
readonly pageAddress: "Page address";
|
|
52
|
-
readonly
|
|
68
|
+
readonly valueColumn: "Value";
|
|
53
69
|
readonly label: "Version label";
|
|
54
70
|
readonly weight: "Share (%)";
|
|
55
71
|
readonly balanceHelp: "Changing a share balances the other versions so the total stays at 100%.";
|
|
@@ -60,17 +76,18 @@ export declare const TEST_PAGE: {
|
|
|
60
76
|
readonly invalidShare: "Use a whole number from 0 to 100.";
|
|
61
77
|
readonly holdoutPrefix: "Holdout: ";
|
|
62
78
|
readonly allocation: "How many people take part";
|
|
79
|
+
readonly everyoneMatches: "Everyone who matches the audience takes part.";
|
|
63
80
|
readonly traffic: "How people are split";
|
|
64
81
|
readonly otherGoals: "Other goals (optional)";
|
|
65
82
|
readonly otherGoalsTitle: "Other goals";
|
|
66
83
|
readonly dontTrack: "Don't track";
|
|
67
|
-
readonly watch: "
|
|
84
|
+
readonly watch: "Also tracked";
|
|
68
85
|
readonly mustNotWorsen: "Must not get worse";
|
|
69
|
-
readonly otherGoalsHelp: "
|
|
70
|
-
readonly goal: "
|
|
86
|
+
readonly otherGoalsHelp: "Also tracked goals appear in results. Choose Must not get worse to get a warning when a version hurts that goal.";
|
|
87
|
+
readonly goal: "Main goal";
|
|
71
88
|
readonly goalHelp: "The one thing you want more of. It decides the winner.";
|
|
72
89
|
readonly guardrailsShort: "Must not get worse";
|
|
73
|
-
readonly secondaryShort: "Also
|
|
90
|
+
readonly secondaryShort: "Also tracked";
|
|
74
91
|
readonly manageGoals: "Manage goals";
|
|
75
92
|
readonly chooseGoal: "Choose a goal";
|
|
76
93
|
readonly goalsError: "Couldn't load goals. Try again.";
|
|
@@ -82,6 +99,7 @@ export declare const TEST_PAGE: {
|
|
|
82
99
|
readonly addRule: "Add a rule";
|
|
83
100
|
readonly removeRule: "Remove rule";
|
|
84
101
|
readonly blockPathRule: "This rule no longer applies to page block tests; remove it.";
|
|
102
|
+
readonly targetingValue: (attribute: string) => string;
|
|
85
103
|
readonly attribute: "Attribute";
|
|
86
104
|
readonly comparison: "Comparison";
|
|
87
105
|
readonly value: "Value";
|
|
@@ -90,6 +108,7 @@ export declare const TEST_PAGE: {
|
|
|
90
108
|
readonly reach: "About how many people will see this per day?";
|
|
91
109
|
readonly reachHelp: "A rough number is fine. It only sets the suggested length.";
|
|
92
110
|
readonly duration: "Planned length (days)";
|
|
111
|
+
readonly endDate: "Planned end date";
|
|
93
112
|
readonly noSuggestion: "Enter a daily number above to get a suggestion. 4 weeks is a safe default.";
|
|
94
113
|
readonly chooseGoalSuggestion: "Choose a goal to get a suggestion.";
|
|
95
114
|
readonly required: "(required)";
|
|
@@ -113,18 +132,23 @@ export declare const DELETE_TEST: {
|
|
|
113
132
|
readonly changedPages: (count: number) => string;
|
|
114
133
|
readonly unreadablePages: (count: number, total: number) => string;
|
|
115
134
|
readonly pageWinner: "These addresses will change where they send visitors:";
|
|
116
|
-
readonly content: "Deleting the test does not delete your page content.
|
|
135
|
+
readonly content: "Deleting the test does not delete your page content. A Test block that used this test stays on its page and says the test was deleted.";
|
|
136
|
+
readonly runningSteps: readonly ["Stop the test.", "Archive the test."];
|
|
137
|
+
readonly archiveFirst: "You can delete this test after it is archived.";
|
|
138
|
+
readonly close: "Close";
|
|
139
|
+
readonly labelWithCode: (label: string, code: string) => string;
|
|
117
140
|
readonly allLocales: "All languages";
|
|
118
141
|
readonly locales: (names: string) => string;
|
|
119
142
|
readonly action: "Delete test";
|
|
120
143
|
readonly cancel: "Cancel";
|
|
121
144
|
readonly deleted: "Test deleted.";
|
|
122
145
|
readonly title: (name: string) => string;
|
|
123
|
-
readonly consequences: "This permanently deletes the test and all its rounds and results.";
|
|
146
|
+
readonly consequences: "This permanently deletes the test and all its rounds and results. You can't undo this.";
|
|
124
147
|
readonly alreadyDeleted: "This test was already deleted.";
|
|
125
148
|
readonly checking: "Checking what visitors will see…";
|
|
126
|
-
readonly checkFailed: "Couldn
|
|
149
|
+
readonly checkFailed: "Couldn't check what visitors will see after deletion. You can still choose to delete this test.";
|
|
127
150
|
readonly noEffect: "Deleting this test will not change what visitors see.";
|
|
128
151
|
readonly versionChange: (before: string, after: string) => string;
|
|
129
152
|
readonly morePages: (count: number) => string;
|
|
130
153
|
};
|
|
154
|
+
export declare function deleteStatusCopy(status: string, kind?: ExperimentKind): string;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
+
import { GOAL_ROLES } from './metrics.js';
|
|
2
|
+
import { API_MESSAGES } from './common.js';
|
|
1
3
|
import { PLACEMENT_LANGUAGES } from './languages.js';
|
|
2
|
-
const guardrailsShort = 'Must not get worse';
|
|
3
|
-
const secondaryShort = 'Also keep an eye on';
|
|
4
4
|
export const TEST_PAGE = {
|
|
5
5
|
noAudienceRules: 'No audience choices are available here. Everyone eligible takes part; leave this section as it is.',
|
|
6
6
|
editVersionsOnCanvas: 'Edit version content on the canvas.',
|
|
7
7
|
clickPageGroup: "On this test's page",
|
|
8
8
|
clickGoalHelp: 'A click shows interest, not the result you want.',
|
|
9
|
-
staleEdit: '
|
|
9
|
+
staleEdit: 'This test changed. Reload to see the latest settings and discard your unfinished edits.',
|
|
10
10
|
reload: 'Reload',
|
|
11
|
+
reloadAfterError: 'Reload to discard your unfinished edits and try again.',
|
|
12
|
+
draftNotSaved: 'Your edit is still unsaved.',
|
|
13
|
+
conflictChoice: 'Your edit is unsaved. Choose which value to keep. Saving your edit replaces the saved value shown below.',
|
|
14
|
+
keepEdit: 'Save my edit',
|
|
15
|
+
retryEdit: 'Try saving again',
|
|
16
|
+
editInvalid: 'Enter a valid value before saving.',
|
|
17
|
+
detachedEdit: (field)=>`Your edit to “${field}” is still unsaved. Return to the field to finish it, or copy your edit and discard it here.`,
|
|
18
|
+
discardEdit: 'Discard edit',
|
|
19
|
+
savedValueChanged: 'This field changed while you were editing.',
|
|
20
|
+
savedValue: 'Saved value',
|
|
21
|
+
emptyValue: '(empty)',
|
|
22
|
+
useSavedValue: 'Use saved value',
|
|
11
23
|
loading: 'Loading test…',
|
|
12
24
|
forbidden: "You don't have access to this test.",
|
|
13
25
|
missing: 'This test no longer exists.',
|
|
@@ -40,9 +52,11 @@ export const TEST_PAGE = {
|
|
|
40
52
|
},
|
|
41
53
|
hypothesis: 'Why are you testing this? (optional)',
|
|
42
54
|
hypothesisPlaceholder: 'We believe … will … because …',
|
|
43
|
-
notPlaced: '
|
|
44
|
-
onPage: '
|
|
45
|
-
openPage: 'Open
|
|
55
|
+
notPlaced: 'This test needs a block on a page. Add it to a Test block.',
|
|
56
|
+
onPage: 'Page:',
|
|
57
|
+
openPage: 'Open page',
|
|
58
|
+
published: 'Published',
|
|
59
|
+
draft: 'Draft',
|
|
46
60
|
editedOnPage: 'Versions are edited on the page.',
|
|
47
61
|
editOnPage: 'Edit on page',
|
|
48
62
|
empty: 'Empty',
|
|
@@ -51,8 +65,9 @@ export const TEST_PAGE = {
|
|
|
51
65
|
ready: 'Content ready',
|
|
52
66
|
emptySlot: 'Nothing in this slot yet',
|
|
53
67
|
pageBinding: 'Each version is a whole page at its own address.',
|
|
68
|
+
partialSlotContent: 'Some slots empty',
|
|
54
69
|
pageAddress: 'Page address',
|
|
55
|
-
|
|
70
|
+
valueColumn: 'Value',
|
|
56
71
|
label: 'Version label',
|
|
57
72
|
weight: 'Share (%)',
|
|
58
73
|
balanceHelp: 'Changing a share balances the other versions so the total stays at 100%.',
|
|
@@ -63,17 +78,18 @@ export const TEST_PAGE = {
|
|
|
63
78
|
invalidShare: 'Use a whole number from 0 to 100.',
|
|
64
79
|
holdoutPrefix: 'Holdout: ',
|
|
65
80
|
allocation: 'How many people take part',
|
|
81
|
+
everyoneMatches: 'Everyone who matches the audience takes part.',
|
|
66
82
|
traffic: 'How people are split',
|
|
67
83
|
otherGoals: 'Other goals (optional)',
|
|
68
84
|
otherGoalsTitle: 'Other goals',
|
|
69
85
|
dontTrack: "Don't track",
|
|
70
|
-
watch:
|
|
71
|
-
mustNotWorsen:
|
|
72
|
-
otherGoalsHelp: "
|
|
73
|
-
goal:
|
|
86
|
+
watch: GOAL_ROLES.secondary,
|
|
87
|
+
mustNotWorsen: GOAL_ROLES.guardrail,
|
|
88
|
+
otherGoalsHelp: "Also tracked goals appear in results. Choose Must not get worse to get a warning when a version hurts that goal.",
|
|
89
|
+
goal: GOAL_ROLES.primary,
|
|
74
90
|
goalHelp: 'The one thing you want more of. It decides the winner.',
|
|
75
|
-
guardrailsShort,
|
|
76
|
-
secondaryShort,
|
|
91
|
+
guardrailsShort: GOAL_ROLES.guardrail,
|
|
92
|
+
secondaryShort: GOAL_ROLES.secondary,
|
|
77
93
|
manageGoals: 'Manage goals',
|
|
78
94
|
chooseGoal: 'Choose a goal',
|
|
79
95
|
goalsError: "Couldn't load goals. Try again.",
|
|
@@ -85,6 +101,7 @@ export const TEST_PAGE = {
|
|
|
85
101
|
addRule: 'Add a rule',
|
|
86
102
|
removeRule: 'Remove rule',
|
|
87
103
|
blockPathRule: 'This rule no longer applies to page block tests; remove it.',
|
|
104
|
+
targetingValue: (attribute)=>`Value for ${attribute}`,
|
|
88
105
|
attribute: 'Attribute',
|
|
89
106
|
comparison: 'Comparison',
|
|
90
107
|
value: 'Value',
|
|
@@ -93,6 +110,7 @@ export const TEST_PAGE = {
|
|
|
93
110
|
reach: 'About how many people will see this per day?',
|
|
94
111
|
reachHelp: 'A rough number is fine. It only sets the suggested length.',
|
|
95
112
|
duration: 'Planned length (days)',
|
|
113
|
+
endDate: 'Planned end date',
|
|
96
114
|
noSuggestion: 'Enter a daily number above to get a suggestion. 4 weeks is a safe default.',
|
|
97
115
|
chooseGoalSuggestion: 'Choose a goal to get a suggestion.',
|
|
98
116
|
required: '(required)',
|
|
@@ -115,10 +133,10 @@ export const DELETE_TEST = {
|
|
|
115
133
|
cancel: 'Cancel',
|
|
116
134
|
deleted: 'Test deleted.',
|
|
117
135
|
title: (name)=>`Delete “${name}”?`,
|
|
118
|
-
consequences:
|
|
136
|
+
consequences: "This permanently deletes the test and all its rounds and results. You can't undo this.",
|
|
119
137
|
alreadyDeleted: 'This test was already deleted.',
|
|
120
138
|
checking: 'Checking what visitors will see…',
|
|
121
|
-
checkFailed: "Couldn
|
|
139
|
+
checkFailed: "Couldn't check what visitors will see after deletion. You can still choose to delete this test.",
|
|
122
140
|
noEffect: 'Deleting this test will not change what visitors see.',
|
|
123
141
|
versionChange: (before, after)=>`${before} → ${after}`,
|
|
124
142
|
morePages: (count)=>`${count} more ${count === 1 ? 'page' : 'pages'}.`,
|
|
@@ -128,5 +146,24 @@ export const DELETE_TEST = {
|
|
|
128
146
|
changedPages: (count)=>`${count} ${count === 1 ? 'page' : 'pages'} will change`,
|
|
129
147
|
unreadablePages: (count, total)=>total === 1 ? "You can't open this page." : count === total ? "You can't open any of these pages." : `You can't open ${count} of these pages.`,
|
|
130
148
|
pageWinner: 'These addresses will change where they send visitors:',
|
|
131
|
-
content: 'Deleting the test does not delete your page content.
|
|
149
|
+
content: 'Deleting the test does not delete your page content. A Test block that used this test stays on its page and says the test was deleted.',
|
|
150
|
+
runningSteps: [
|
|
151
|
+
'Stop the test.',
|
|
152
|
+
'Archive the test.'
|
|
153
|
+
],
|
|
154
|
+
archiveFirst: 'You can delete this test after it is archived.',
|
|
155
|
+
close: 'Close'
|
|
132
156
|
};
|
|
157
|
+
export function deleteStatusCopy(status, kind) {
|
|
158
|
+
switch(status){
|
|
159
|
+
case 'running':
|
|
160
|
+
return DELETE_TEST.archiveFirst;
|
|
161
|
+
case 'stopped':
|
|
162
|
+
return DELETE_TEST.archiveFirst;
|
|
163
|
+
case 'decided':
|
|
164
|
+
if (!kind) return `${DELETE_TEST.archiveFirst} Open the test to see the available archive options.`;
|
|
165
|
+
return `${DELETE_TEST.archiveFirst} Use the archive controls on the test.`;
|
|
166
|
+
default:
|
|
167
|
+
return API_MESSAGES.deleteInvalidStatus;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
export type DateFormatter = (value: unknown) => string;
|
|
2
|
+
export declare function createDateFormatter(timeZone?: string): DateFormatter;
|
|
3
|
+
/** Calendar date in the current environment's time zone. */
|
|
4
|
+
export declare const formatDate: DateFormatter;
|
|
5
|
+
export declare function relativeTime(value: string, now?: number, formatFallback?: DateFormatter): string;
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export function createDateFormatter(timeZone) {
|
|
2
|
+
const formatter = new Intl.DateTimeFormat('en-US', {
|
|
3
|
+
month: 'short',
|
|
4
|
+
day: 'numeric',
|
|
5
|
+
year: 'numeric',
|
|
6
|
+
...timeZone === undefined ? {} : {
|
|
7
|
+
timeZone
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
return (value)=>{
|
|
11
|
+
const date = value instanceof Date ? value : typeof value === 'string' || typeof value === 'number' ? new Date(value) : null;
|
|
12
|
+
return date && Number.isFinite(date.valueOf()) ? formatter.format(date) : '—';
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/** Calendar date in the current environment's time zone. */ export const formatDate = createDateFormatter();
|
|
16
|
+
const relative = new Intl.RelativeTimeFormat('en', {
|
|
17
|
+
numeric: 'always'
|
|
6
18
|
});
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
19
|
+
export function relativeTime(value, now = Date.now(), formatFallback = formatDate) {
|
|
20
|
+
const minutes = Math.max(0, Math.floor((now - Date.parse(value)) / 60_000));
|
|
21
|
+
if (!Number.isFinite(minutes)) return formatFallback(value);
|
|
22
|
+
if (minutes === 0) return 'just now';
|
|
23
|
+
if (minutes < 60) return relative.format(-minutes, 'minute');
|
|
24
|
+
if (minutes < 1440) return relative.format(-Math.floor(minutes / 60), 'hour');
|
|
25
|
+
return relative.format(-Math.floor(minutes / 1440), 'day');
|
|
10
26
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const dayMs = 86_400_000;
|
|
2
|
+
export function roundProgress(startedAt, duration, now, fallbackElapsedDays) {
|
|
3
|
+
const start = typeof startedAt === 'string' ? Date.parse(startedAt) : NaN;
|
|
4
|
+
const plannedDays = duration != null && Number.isFinite(duration) && duration > 0 ? duration : null;
|
|
5
|
+
const elapsed = Number.isFinite(start) ? (now - start) / dayMs : fallbackElapsedDays;
|
|
6
|
+
// The first 24 hours are Day 1. Countdown includes the part of today still ahead.
|
|
7
|
+
const day = elapsed != null && Number.isFinite(elapsed) ? Math.max(1, Math.floor(elapsed) + 1) : null;
|
|
8
|
+
const end = plannedDays !== null && Number.isFinite(start) ? start + plannedDays * dayMs : null;
|
|
9
|
+
return {
|
|
10
|
+
day: day !== null && plannedDays !== null ? Math.min(day, plannedDays) : day,
|
|
11
|
+
plannedDays,
|
|
12
|
+
end,
|
|
13
|
+
daysToGo: end !== null && Number.isFinite(now) ? Math.max(0, Math.ceil((end - now) / dayMs)) : null
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useSyncExternalStore } from 'react';
|
|
3
|
+
import { createDateFormatter, formatDate } from './date.js';
|
|
4
|
+
const formatUtcDate = createDateFormatter('UTC');
|
|
5
|
+
const subscribe = ()=>()=>{};
|
|
6
|
+
/** Use the same dates during SSR and hydration, then read the browser's time zone. */ export function useDateFormatter() {
|
|
7
|
+
return useSyncExternalStore(subscribe, ()=>formatDate, ()=>formatUtcDate);
|
|
8
|
+
}
|
|
@@ -24,7 +24,6 @@ export declare const VERDICT_LABELS: {
|
|
|
24
24
|
'data-problem': string;
|
|
25
25
|
'guardrail-failing': string;
|
|
26
26
|
collecting: string;
|
|
27
|
-
'original-better': string;
|
|
28
27
|
'worse-none-better': string;
|
|
29
28
|
winner: string;
|
|
30
29
|
mixed: string;
|
|
@@ -36,5 +35,5 @@ export declare const VERDICT_LABELS: {
|
|
|
36
35
|
export declare function armLabel(key: string, storedLabel?: string): string;
|
|
37
36
|
export declare function statusLabel(status: Status): string;
|
|
38
37
|
export declare function phaseKindLabel(kind: 'test' | 'rollout'): string;
|
|
39
|
-
export declare function verdictCodeLabel(code: VerdictCode): string;
|
|
38
|
+
export declare function verdictCodeLabel(code: VerdictCode, controlLabel?: string): string;
|
|
40
39
|
export declare function kindLabel(kind: ExperimentKind): string;
|