@delmaredigital/payload-experiments 0.4.0-rc.1 → 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/README.md +284 -772
- package/dist/admin/LayerUsage.js +1 -1
- package/dist/admin/MetricSourceSelect.js +12 -5
- package/dist/admin/PlacementStatus.js +1 -1
- package/dist/admin/TestsDashboardCards.d.ts +1 -0
- package/dist/admin/TestsDashboardCards.js +5 -9
- package/dist/admin/TestsNavLink.d.ts +1 -0
- package/dist/admin/TestsNavLink.js +5 -11
- package/dist/admin/blocks/BlockPanel.d.ts +1 -0
- package/dist/admin/blocks/BlockPanel.js +129 -37
- package/dist/admin/blocks/TestBlockField.js +3 -3
- package/dist/admin/blocks/formApi.d.ts +3 -0
- package/dist/admin/blocks/formApi.js +10 -4
- package/dist/admin/blocks/inject.js +1 -0
- package/dist/admin/blocks/model.d.ts +3 -2
- package/dist/admin/blocks/model.js +10 -6
- package/dist/admin/blocks/statusCache.d.ts +2 -0
- package/dist/admin/blocks/statusCache.js +12 -3
- package/dist/admin/components/RootViewMessage.js +1 -1
- package/dist/admin/copy/blocks.d.ts +21 -1
- package/dist/admin/copy/blocks.js +40 -6
- package/dist/admin/copy/goals.d.ts +21 -9
- package/dist/admin/copy/goals.js +28 -11
- package/dist/admin/copy/newTest.d.ts +7 -7
- package/dist/admin/copy/newTest.js +10 -7
- package/dist/admin/goals/XpGoalField.d.ts +2 -0
- package/dist/admin/goals/XpGoalField.js +156 -114
- package/dist/admin/goals/xpGoalField.css +47 -0
- package/dist/admin/pageCollections.d.ts +1 -0
- package/dist/admin/pageCollections.js +3 -0
- package/dist/admin/paths.d.ts +3 -0
- package/dist/admin/paths.js +3 -0
- package/dist/admin/placementStatus.model.js +1 -1
- package/dist/admin/status.model.js +1 -1
- package/dist/admin/surface/ResultsRoute.d.ts +2 -1
- package/dist/admin/surface/ResultsRoute.js +20 -24
- package/dist/admin/surface/SurfaceShell.d.ts +4 -2
- package/dist/admin/surface/SurfaceShell.js +29 -4
- package/dist/admin/surface/TestRowMenu.d.ts +13 -0
- package/dist/admin/surface/TestRowMenu.js +163 -0
- package/dist/admin/surface/TestsHome.d.ts +5 -3
- package/dist/admin/surface/TestsHome.js +273 -58
- package/dist/admin/surface/TestsSurface.js +8 -7
- 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 +2 -1
- package/dist/admin/surface/goals/GoalForm.js +342 -212
- package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
- package/dist/admin/surface/goals/GoalsList.js +107 -37
- package/dist/admin/surface/goals/data.d.ts +2 -0
- package/dist/admin/surface/goals/data.js +11 -2
- package/dist/admin/surface/goals/goals.css +9 -1
- package/dist/admin/surface/goals/goals.model.d.ts +12 -2
- package/dist/admin/surface/goals/goals.model.js +39 -1
- package/dist/admin/surface/home.model.d.ts +10 -8
- package/dist/admin/surface/home.model.js +27 -22
- package/dist/admin/surface/newTest/NewTest.d.ts +4 -4
- package/dist/admin/surface/newTest/NewTest.js +149 -118
- package/dist/admin/surface/newTest/PageWizard.d.ts +5 -2
- package/dist/admin/surface/newTest/PageWizard.js +115 -80
- package/dist/admin/surface/newTest/newTest.css +28 -9
- package/dist/admin/surface/results/ResultsHeader.d.ts +3 -3
- package/dist/admin/surface/results/ResultsHeader.js +115 -83
- package/dist/admin/surface/surface.css +29 -0
- package/dist/admin/surface/test/TestPage.d.ts +1 -2
- package/dist/admin/surface/test/TestPage.js +44 -152
- package/dist/admin/surface/useXpStepNav.d.ts +11 -0
- package/dist/admin/surface/useXpStepNav.js +14 -0
- package/dist/admin/theme.css +2 -0
- package/dist/admin/views/CollectionListRedirect.d.ts +1 -0
- package/dist/admin/views/CollectionListRedirect.js +1 -1
- package/dist/admin/views/ExperimentsRootView.js +18 -165
- package/dist/admin/views/GoalEditRedirect.d.ts +4 -0
- package/dist/admin/views/GoalEditRedirect.js +14 -0
- package/dist/admin/views/GoalsCollectionListView.d.ts +2 -0
- package/dist/admin/views/GoalsCollectionListView.js +4 -0
- package/dist/admin/views/TestsCollectionListView.d.ts +2 -0
- package/dist/admin/views/TestsCollectionListView.js +4 -0
- package/dist/admin/views/TestsNavLinkServer.d.ts +1 -0
- package/dist/admin/views/TestsNavLinkServer.js +2 -2
- package/dist/admin/views/TestsSurfaceClient.d.ts +3 -0
- package/dist/admin/views/TestsSurfaceClient.js +35 -0
- package/dist/admin/views/buildSurfaceProps.d.ts +8 -0
- package/dist/admin/views/buildSurfaceProps.js +102 -0
- package/dist/admin/views/renderCollectionList.d.ts +2 -0
- package/dist/admin/views/renderCollectionList.js +34 -0
- package/dist/admin/views/renderTestsSurface.d.ts +3 -0
- package/dist/admin/views/renderTestsSurface.js +34 -0
- package/dist/blocks/bindings.js +8 -14
- package/dist/blocks/createExperimentBlock.js +1 -1
- package/dist/blocks/formState.js +2 -2
- package/dist/blocks/placementLanguages.d.ts +7 -0
- package/dist/blocks/placementLanguages.js +27 -0
- package/dist/blocks/placementLocale.d.ts +37 -0
- package/dist/blocks/placementLocale.js +270 -0
- package/dist/collections/experiments/config.js +17 -8
- 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 +28 -9
- 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/appends.d.ts +13 -0
- package/dist/db/appends.js +49 -0
- package/dist/db/bulkPlacementRemoval.d.ts +30 -0
- package/dist/db/bulkPlacementRemoval.js +111 -0
- 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/placements.d.ts +2 -0
- package/dist/db/placements.js +8 -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/contentLocale.d.ts +6 -0
- package/dist/endpoints/contentLocale.js +15 -0
- package/dist/endpoints/deleteImpact.d.ts +6 -0
- package/dist/endpoints/deleteImpact.js +207 -0
- package/dist/endpoints/duplicateOriginal.d.ts +38 -0
- package/dist/endpoints/duplicateOriginal.js +407 -0
- package/dist/endpoints/editorSurface.d.ts +3 -0
- package/dist/endpoints/editorSurface.js +31 -0
- package/dist/endpoints/events.js +103 -39
- package/dist/endpoints/index.js +57 -9
- package/dist/endpoints/pages.js +247 -64
- package/dist/endpoints/placementStatus.js +13 -5
- package/dist/endpoints/preflight.d.ts +1 -1
- package/dist/endpoints/preflight.js +17 -2
- package/dist/endpoints/results.d.ts +1 -1
- package/dist/endpoints/results.js +6 -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 +5 -0
- package/dist/errors.js +8 -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/adminClient.d.ts +1 -1
- package/dist/exports/adminClient.js +1 -1
- package/dist/exports/adminRsc.d.ts +3 -0
- package/dist/exports/adminRsc.js +3 -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/fields/xpGoal.js +3 -15
- package/dist/goals/fairness.d.ts +1 -1
- package/dist/goals/fairness.js +44 -35
- package/dist/goals/picker/clickGoalPicker.model.d.ts +8 -1
- package/dist/goals/picker/clickGoalPicker.model.js +20 -2
- package/dist/goals/picker/copy.d.ts +6 -2
- package/dist/goals/picker/copy.js +11 -2
- package/dist/goals/picker/useClickGoalPicker.d.ts +1 -1
- package/dist/goals/picker/useClickGoalPicker.js +4 -2
- package/dist/goals/sourceLabel.d.ts +2 -0
- package/dist/goals/sourceLabel.js +4 -0
- package/dist/goals/validate.d.ts +3 -0
- package/dist/goals/validate.js +15 -0
- package/dist/hooks/blockRemovalRule.d.ts +30 -0
- package/dist/hooks/blockRemovalRule.js +165 -0
- package/dist/hooks/hostHook.js +6 -2
- package/dist/hooks/pageGuard.d.ts +27 -2
- package/dist/hooks/pageGuard.js +213 -45
- package/dist/hooks/puckGoals.d.ts +5 -0
- package/dist/hooks/puckGoals.js +62 -0
- package/dist/hooks/puckNestedTests.d.ts +8 -0
- package/dist/hooks/puckNestedTests.js +36 -0
- package/dist/hooks/trackPageCopies.d.ts +11 -0
- package/dist/hooks/trackPageCopies.js +7 -0
- package/dist/lib/fetchAllDocs.d.ts +1 -1
- package/dist/lib/placementPages.d.ts +10 -0
- package/dist/{admin/previewLinks.model.js → lib/placementPages.js} +10 -5
- package/dist/manifest/compile.d.ts +2 -1
- package/dist/manifest/compile.js +13 -6
- package/dist/onInit.js +36 -0
- package/dist/options.d.ts +2 -0
- package/dist/options.js +23 -2
- package/dist/plugin.js +70 -21
- 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/ExperimentPicker.d.ts +2 -1
- package/dist/puck/ExperimentPicker.js +62 -40
- package/dist/puck/ExperimentSlot.js +3 -1
- package/dist/puck/copy.d.ts +5 -1
- package/dist/puck/copy.js +5 -1
- package/dist/puck/editor/ConfigureTestDrawer.d.ts +25 -0
- package/dist/puck/editor/ConfigureTestDrawer.js +150 -0
- package/dist/puck/editor/CreateExperimentDrawer.d.ts +12 -2
- package/dist/puck/editor/CreateExperimentDrawer.js +89 -21
- package/dist/puck/editor/EditorControls.d.ts +14 -0
- package/dist/puck/editor/EditorControls.js +99 -0
- package/dist/puck/editor/ExperimentSlotEditor.d.ts +2 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +1007 -182
- package/dist/puck/editor/LeftoverVersions.d.ts +15 -0
- package/dist/puck/editor/LeftoverVersions.js +79 -0
- package/dist/puck/editor/PlacementNotice.d.ts +8 -0
- package/dist/puck/editor/PlacementNotice.js +22 -0
- package/dist/puck/editor/QuickTestActions.d.ts +6 -0
- package/dist/puck/editor/QuickTestActions.js +72 -0
- package/dist/puck/editor/ResultsReadout.d.ts +4 -1
- package/dist/puck/editor/ResultsReadout.js +35 -19
- package/dist/puck/editor/VersionBuilder.d.ts +67 -12
- package/dist/puck/editor/VersionBuilder.js +560 -231
- package/dist/puck/editor/armWrites.d.ts +11 -2
- package/dist/puck/editor/armWrites.js +43 -4
- package/dist/puck/editor/armsCache.d.ts +3 -1
- package/dist/puck/editor/armsCache.js +20 -4
- package/dist/puck/editor/blockClipboard.d.ts +16 -0
- package/dist/puck/editor/blockClipboard.js +20 -0
- package/dist/puck/editor/cloneSlot.d.ts +2 -0
- package/dist/puck/editor/cloneSlot.js +7 -0
- package/dist/puck/editor/copy.d.ts +65 -20
- package/dist/puck/editor/copy.js +73 -21
- package/dist/puck/editor/createTest.d.ts +3 -0
- package/dist/puck/editor/createTest.js +33 -0
- package/dist/puck/editor/editor.chrome.css +200 -20
- package/dist/puck/editor/editor.css +338 -25
- package/dist/puck/editor/editor.model.d.ts +17 -1
- package/dist/puck/editor/editor.model.js +61 -4
- package/dist/puck/editor/editorSurface.d.ts +10 -0
- package/dist/puck/editor/editorSurface.js +65 -0
- package/dist/puck/editor/experimentOutlinePlugin.js +96 -28
- package/dist/puck/editor/localPlacements.d.ts +5 -0
- package/dist/puck/editor/localPlacements.js +43 -0
- package/dist/puck/editor/outlineVersion.d.ts +5 -0
- package/dist/puck/editor/outlineVersion.js +36 -0
- package/dist/puck/editor/placementsCache.d.ts +60 -0
- package/dist/puck/editor/placementsCache.js +263 -0
- package/dist/puck/editor/sidebar.d.ts +8 -0
- package/dist/puck/editor/sidebar.js +74 -0
- package/dist/puck/editor/usePageSaveReadiness.d.ts +6 -0
- package/dist/puck/editor/usePageSaveReadiness.js +31 -0
- package/dist/puck/editor/usePlacementNotice.d.ts +3 -0
- package/dist/puck/editor/usePlacementNotice.js +15 -0
- package/dist/puck/editor/xpGoalPuckEditorField.js +105 -86
- package/dist/puck/experimentSlotField.d.ts +3 -0
- package/dist/puck/experimentSlotField.js +15 -4
- package/dist/puck/experimentSlug.d.ts +2 -0
- package/dist/puck/experimentSlug.js +3 -0
- package/dist/puck/nestedTestCopy.d.ts +8 -0
- package/dist/puck/nestedTestCopy.js +22 -0
- package/dist/puck/nestedTests.d.ts +17 -0
- package/dist/puck/nestedTests.js +30 -0
- package/dist/puck/slotConfig.d.ts +2 -2
- package/dist/puck/slotConfig.js +18 -5
- package/dist/puck/visibility.d.ts +20 -0
- package/dist/puck/visibility.js +81 -0
- 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 +1 -1
- package/dist/results/verdict.js +9 -7
- 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 +22 -2
- package/dist/server/getAssignments.js +11 -10
- package/dist/server/recordContentChange.d.ts +1 -1
- package/dist/server/recordContentChange.js +48 -22
- package/dist/server/resolveExperimentBlocks.js +2 -4
- package/dist/server/resolveExperimentData.js +8 -8
- 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/{admin → testSurface}/PreviewLinks.d.ts +2 -1
- package/dist/{admin → testSurface}/PreviewLinks.js +9 -5
- package/dist/testSurface/actions/DecideDialog.d.ts +17 -0
- package/dist/testSurface/actions/DecideDialog.js +222 -0
- package/dist/testSurface/actions/LifecycleAction.d.ts +17 -0
- package/dist/testSurface/actions/LifecycleAction.js +107 -0
- package/dist/{admin → testSurface}/actions/MakeContentResult.d.ts +4 -3
- package/dist/{admin → testSurface}/actions/MakeContentResult.js +10 -2
- package/dist/{admin → testSurface}/actions/actions.model.d.ts +13 -5
- package/dist/testSurface/actions/actions.model.js +123 -0
- package/dist/{admin → testSurface}/actions/decide.model.d.ts +1 -0
- package/dist/{admin → testSurface}/actions/decide.model.js +1 -0
- package/dist/{admin → testSurface}/allocation.model.js +6 -3
- package/dist/{admin → testSurface}/api.d.ts +20 -7
- package/dist/{admin → testSurface}/api.js +72 -22
- package/dist/testSurface/contentLocaleURL.d.ts +2 -0
- package/dist/testSurface/contentLocaleURL.js +3 -0
- package/dist/{admin → testSurface}/copy/actions.d.ts +37 -14
- package/dist/{admin → testSurface}/copy/actions.js +40 -17
- package/dist/{admin → testSurface}/copy/advanced.d.ts +10 -0
- package/dist/{admin → testSurface}/copy/advanced.js +10 -0
- package/dist/{admin → testSurface}/copy/arms.d.ts +1 -1
- package/dist/{admin → testSurface}/copy/arms.js +1 -1
- package/dist/{admin → testSurface}/copy/audience.d.ts +4 -3
- package/dist/{admin → testSurface}/copy/audience.js +5 -4
- package/dist/{admin → testSurface}/copy/common.d.ts +15 -6
- package/dist/{admin → testSurface}/copy/common.js +20 -10
- package/dist/testSurface/copy/languages.d.ts +12 -0
- package/dist/testSurface/copy/languages.js +8 -0
- package/dist/{admin → testSurface}/copy/metrics.d.ts +7 -0
- package/dist/testSurface/copy/metrics.js +18 -0
- package/dist/testSurface/copy/pages.d.ts +84 -0
- package/dist/testSurface/copy/pages.js +90 -0
- package/dist/{admin → testSurface}/copy/readiness.d.ts +40 -6
- package/dist/{admin → testSurface}/copy/readiness.js +54 -9
- package/dist/{admin → testSurface}/copy/recommendation.d.ts +4 -4
- package/dist/{admin → testSurface}/copy/recommendation.js +4 -4
- package/dist/{admin → testSurface}/copy/results.d.ts +19 -12
- package/dist/{admin → testSurface}/copy/results.js +21 -12
- package/dist/testSurface/copy/review.d.ts +20 -0
- package/dist/testSurface/copy/review.js +21 -0
- package/dist/{admin → testSurface}/copy/setting.d.ts +1 -2
- package/dist/{admin → testSurface}/copy/setting.js +1 -2
- package/dist/{admin → testSurface}/copy/surface.d.ts +11 -2
- package/dist/{admin → testSurface}/copy/surface.js +14 -11
- package/dist/{admin → testSurface}/copy/testPage.d.ts +61 -12
- package/dist/testSurface/copy/testPage.js +168 -0
- package/dist/testSurface/format/adminURL.d.ts +7 -0
- package/dist/testSurface/format/adminURL.js +9 -0
- package/dist/{admin → testSurface}/format/date.d.ts +1 -0
- package/dist/testSurface/format/date.js +21 -0
- package/dist/{admin → testSurface}/labels.d.ts +1 -2
- package/dist/{admin → testSurface}/labels.js +2 -3
- package/dist/{admin → testSurface}/lockedNotice.model.d.ts +2 -0
- package/dist/{admin → testSurface}/lockedNotice.model.js +31 -0
- package/dist/testSurface/placementLabel.d.ts +8 -0
- package/dist/testSurface/placementLabel.js +24 -0
- package/dist/{admin → testSurface}/placements/placementLabels.d.ts +2 -0
- package/dist/{admin → testSurface}/placements/placementLabels.js +3 -2
- package/dist/{admin → testSurface}/previewLinks.model.d.ts +1 -6
- package/dist/testSurface/previewLinks.model.js +4 -0
- package/dist/testSurface/readPreflight.d.ts +13 -0
- package/dist/testSurface/readPreflight.js +44 -0
- package/dist/testSurface/readinessRead.d.ts +53 -0
- package/dist/testSurface/readinessRead.js +50 -0
- package/dist/{admin → testSurface}/results/VerdictHero.d.ts +2 -1
- package/dist/{admin → testSurface}/results/VerdictHero.js +5 -1
- package/dist/testSurface/results/results.css +64 -0
- package/dist/{admin → testSurface}/results/results.model.d.ts +3 -2
- package/dist/{admin → testSurface}/results/results.model.js +16 -11
- package/dist/{admin → testSurface}/surface/contracts.d.ts +17 -3
- package/dist/testSurface/surface/editorPlacement.d.ts +26 -0
- package/dist/testSurface/surface/editorPlacement.js +78 -0
- package/dist/testSurface/surface/pageBlock/pageBlock.model.js +9 -0
- package/dist/testSurface/surface/pageBlock/parts.js +107 -0
- package/dist/testSurface/surface/pagePicker/CopyRoute.d.ts +13 -0
- package/dist/testSurface/surface/pagePicker/CopyRoute.js +273 -0
- package/dist/testSurface/surface/pagePicker/PageCombobox.d.ts +21 -0
- package/dist/testSurface/surface/pagePicker/PageCombobox.js +498 -0
- package/dist/testSurface/surface/pagePicker/pagePicker.css +73 -0
- package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.d.ts +7 -3
- package/dist/{admin → testSurface}/surface/pagePicker/pagePicker.model.js +17 -2
- package/dist/{admin → testSurface}/surface/readiness/ActionDialogs.d.ts +9 -5
- package/dist/testSurface/surface/readiness/ActionDialogs.js +372 -0
- package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +4 -3
- package/dist/testSurface/surface/readiness/Banner.js +198 -0
- package/dist/testSurface/surface/readiness/BlockerList.d.ts +11 -0
- package/dist/testSurface/surface/readiness/BlockerList.js +31 -0
- package/dist/testSurface/surface/readiness/SaveStatus.d.ts +13 -0
- package/dist/testSurface/surface/readiness/SaveStatus.js +67 -0
- package/dist/{admin → testSurface}/surface/readiness/parts.js +0 -2
- package/dist/{admin → testSurface}/surface/readiness/readiness.model.d.ts +28 -2
- package/dist/testSurface/surface/readiness/readiness.model.js +377 -0
- package/dist/testSurface/surface/readiness/useTransition.d.ts +16 -0
- package/dist/testSurface/surface/readiness/useTransition.js +141 -0
- package/dist/{admin → testSurface}/surface/results/ReleasePages.d.ts +6 -3
- package/dist/{admin → testSurface}/surface/results/ReleasePages.js +40 -40
- package/dist/{admin → testSurface}/surface/results/ResultsBody.d.ts +11 -4
- package/dist/{admin → testSurface}/surface/results/ResultsBody.js +207 -104
- package/dist/{admin → testSurface}/surface/results/recommendation.model.js +3 -3
- package/dist/{admin → testSurface}/surface/results/useResults.d.ts +26 -8
- package/dist/{admin → testSurface}/surface/results/useResults.js +3 -2
- package/dist/{admin → testSurface}/surface/setting/parts.js +89 -46
- package/dist/testSurface/surface/setting/setting.css +18 -0
- package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +12 -4
- package/dist/testSurface/surface/test/DeleteTest.d.ts +23 -0
- package/dist/testSurface/surface/test/DeleteTest.js +270 -0
- package/dist/testSurface/surface/test/GoalSection.d.ts +4 -0
- package/dist/{admin → testSurface}/surface/test/GoalSection.js +119 -89
- package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
- package/dist/{admin → testSurface}/surface/test/LengthSection.js +25 -14
- package/dist/{admin → testSurface}/surface/test/PageHoldout.d.ts +1 -1
- package/dist/{admin → testSurface}/surface/test/PageHoldout.js +11 -8
- package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +2 -1
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +4 -11
- package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
- package/dist/testSurface/surface/test/Section.js +88 -0
- package/dist/{admin → testSurface}/surface/test/TargetingSection.js +87 -12
- package/dist/testSurface/surface/test/TestSurface.d.ts +19 -0
- package/dist/testSurface/surface/test/TestSurface.js +265 -0
- package/dist/testSurface/surface/test/VersionsSection.d.ts +5 -0
- package/dist/testSurface/surface/test/VersionsSection.js +301 -0
- package/dist/{admin → testSurface}/surface/test/fields.d.ts +33 -9
- package/dist/testSurface/surface/test/fields.js +300 -0
- package/dist/{admin → testSurface}/surface/test/pageParts.js +30 -44
- package/dist/testSurface/surface/test/testPage.css +111 -0
- package/dist/{admin → testSurface}/surface/test/testPage.model.d.ts +1 -0
- package/dist/{admin → testSurface}/surface/test/testPage.model.js +6 -0
- package/dist/{admin → testSurface}/surface/testDocument.model.d.ts +3 -0
- package/dist/{admin → testSurface}/surface/testDocument.model.js +4 -1
- package/dist/testSurface/surface/useTestDocument.d.ts +60 -0
- package/dist/testSurface/surface/useTestDocument.js +782 -0
- package/dist/testSurface/surface/watchTestDocument.d.ts +15 -0
- package/dist/testSurface/surface/watchTestDocument.js +181 -0
- package/dist/testSurface/surfaceUrls.d.ts +8 -0
- package/dist/testSurface/surfaceUrls.js +23 -0
- package/dist/{admin → testSurface}/useApi.d.ts +21 -5
- package/dist/testSurface/useOnTestReturn.d.ts +2 -0
- package/dist/testSurface/useOnTestReturn.js +27 -0
- package/dist/testSurface/useReadinessPolling.d.ts +3 -0
- package/dist/testSurface/useReadinessPolling.js +26 -0
- 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 +6 -1
- package/dist/transitions/checkStart.js +133 -17
- package/dist/transitions/contentFields.js +9 -5
- package/dist/transitions/decide.d.ts +1 -1
- package/dist/transitions/decide.js +6 -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 +41 -17
- package/dist/transitions/nestedPlacementNames.d.ts +5 -0
- package/dist/transitions/nestedPlacementNames.js +32 -0
- package/dist/transitions/pageAddress.d.ts +6 -0
- package/dist/transitions/pageAddress.js +71 -0
- package/dist/transitions/pageVersions.js +3 -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 +16 -12
- package/dist/transitions/placements.d.ts +54 -8
- package/dist/transitions/placements.js +304 -81
- package/dist/transitions/preflightData.d.ts +5 -3
- package/dist/transitions/preflightData.js +137 -40
- 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 +6 -8
- package/dist/transitions/start.js +72 -35
- 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/contracts.d.ts +15 -3
- package/dist/types/endpoints.d.ts +121 -17
- package/dist/types/puck.d.ts +1 -0
- package/dist/types/runtime.d.ts +15 -9
- package/dist/types/snapshot.d.ts +2 -0
- package/dist/types/surface.d.ts +9 -9
- package/dist/ui/Button.js +2 -2
- package/dist/ui/Card.d.ts +2 -1
- package/dist/ui/Card.js +4 -4
- package/dist/ui/ChipsInput.d.ts +8 -1
- package/dist/ui/ChipsInput.js +17 -4
- package/dist/ui/Dialog.d.ts +24 -2
- package/dist/ui/Dialog.js +141 -6
- package/dist/ui/Drawer.d.ts +10 -0
- package/dist/ui/Drawer.js +29 -0
- package/dist/ui/Inputs.d.ts +4 -3
- package/dist/ui/Inputs.js +6 -4
- package/dist/ui/SelectControl.d.ts +33 -0
- package/dist/ui/SelectControl.js +504 -0
- package/dist/ui/Tabs.d.ts +4 -4
- package/dist/ui/Tabs.js +35 -32
- package/dist/ui/ui.css +50 -5
- package/package.json +3 -2
- package/dist/admin/actions/ConfirmDialog.d.ts +0 -19
- package/dist/admin/actions/ConfirmDialog.js +0 -149
- package/dist/admin/actions/DecideDialog.d.ts +0 -10
- package/dist/admin/actions/DecideDialog.js +0 -190
- package/dist/admin/actions/actions.model.js +0 -70
- package/dist/admin/copy/metrics.js +0 -9
- package/dist/admin/copy/pages.d.ts +0 -26
- package/dist/admin/copy/pages.js +0 -26
- package/dist/admin/copy/review.d.ts +0 -17
- package/dist/admin/copy/review.js +0 -17
- package/dist/admin/copy/testPage.js +0 -104
- package/dist/admin/format/date.js +0 -10
- package/dist/admin/results/results.css +0 -64
- package/dist/admin/styles.css +0 -10
- package/dist/admin/styles.d.ts +0 -2
- package/dist/admin/styles.js +0 -3
- package/dist/admin/surface/pageBlock/pageBlock.model.js +0 -8
- package/dist/admin/surface/pageBlock/parts.js +0 -69
- package/dist/admin/surface/pagePicker/CopyRoute.d.ts +0 -6
- package/dist/admin/surface/pagePicker/CopyRoute.js +0 -53
- package/dist/admin/surface/pagePicker/PagePicker.d.ts +0 -10
- package/dist/admin/surface/pagePicker/PagePicker.js +0 -172
- package/dist/admin/surface/readiness/ActionDialogs.js +0 -337
- package/dist/admin/surface/readiness/Banner.js +0 -190
- package/dist/admin/surface/readiness/SaveStatus.d.ts +0 -5
- package/dist/admin/surface/readiness/SaveStatus.js +0 -53
- package/dist/admin/surface/readiness/readiness.model.js +0 -205
- package/dist/admin/surface/readiness/useTransition.d.ts +0 -11
- package/dist/admin/surface/readiness/useTransition.js +0 -35
- package/dist/admin/surface/setting/setting.css +0 -17
- package/dist/admin/surface/test/GoalSection.d.ts +0 -2
- package/dist/admin/surface/test/LengthSection.d.ts +0 -2
- package/dist/admin/surface/test/Section.js +0 -47
- package/dist/admin/surface/test/VersionsSection.d.ts +0 -4
- package/dist/admin/surface/test/VersionsSection.js +0 -247
- package/dist/admin/surface/test/fields.js +0 -216
- package/dist/admin/surface/test/testPage.css +0 -97
- package/dist/admin/surface/useTestDocument.d.ts +0 -32
- package/dist/admin/surface/useTestDocument.js +0 -415
- /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/arms.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/arms.model.js +0 -0
- /package/dist/{admin → testSurface}/arms/pageTarget.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/pageTarget.model.js +0 -0
- /package/dist/{admin → testSurface}/arms/params.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/arms/params.model.js +0 -0
- /package/dist/{admin → testSurface}/metricSource.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/metricSource.model.js +0 -0
- /package/dist/{admin → testSurface}/placements/placementLabels.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/placements/placementLabels.model.js +0 -0
- /package/dist/{admin → testSurface}/placements/usePlacementLabels.d.ts +0 -0
- /package/dist/{admin → testSurface}/placements/usePlacementLabels.js +0 -0
- /package/dist/{admin → testSurface}/reload.d.ts +0 -0
- /package/dist/{admin → testSurface}/reload.js +0 -0
- /package/dist/{admin → testSurface}/results/CappedCell.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/CappedCell.js +0 -0
- /package/dist/{admin → testSurface}/results/CiChart.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/CiChart.js +0 -0
- /package/dist/{admin → testSurface}/results/DataQualityPanel.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/DataQualityPanel.js +0 -0
- /package/dist/{admin → testSurface}/results/DataTable.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/DataTable.js +0 -0
- /package/dist/{admin → testSurface}/results/StatTile.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/StatTile.js +0 -0
- /package/dist/{admin → testSurface}/results/chart.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/chart.model.js +0 -0
- /package/dist/{admin → testSurface}/results/format.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/format.js +0 -0
- /package/dist/{admin → testSurface}/results/legacy.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/legacy.js +0 -0
- /package/dist/{admin → testSurface}/results/releasePages.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/releasePages.model.js +0 -0
- /package/dist/{admin → testSurface}/results/snapshot.d.ts +0 -0
- /package/dist/{admin → testSurface}/results/snapshot.js +0 -0
- /package/dist/{admin → testSurface}/review/review.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/review/review.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/contracts.js +0 -0
- /package/dist/{admin → testSurface}/surface/pageBlock/pageBlock.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/pageBlock/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/readiness/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/results/recommendation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/parts.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/setting.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/setting/setting.model.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/AdvancedSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/Rail.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/TargetingSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/jumpToSection.d.ts +0 -0
- /package/dist/{admin → testSurface}/surface/test/jumpToSection.js +0 -0
- /package/dist/{admin → testSurface}/surface/test/pageParts.d.ts +0 -0
- /package/dist/{admin → testSurface}/targeting/targeting.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/targeting/targeting.model.js +0 -0
- /package/dist/{admin → testSurface}/theme.d.ts +0 -0
- /package/dist/{admin → testSurface}/theme.js +0 -0
- /package/dist/{admin → testSurface}/useApi.js +0 -0
|
@@ -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
|
};
|
|
@@ -105,6 +109,8 @@ export const moreDays = (days)=>`About ${days} more ${days === '1' ? 'day' : 'da
|
|
|
105
109
|
export const collectingCopy = (n, minimum, conversions, conversionMinimum)=>`${n} of ${minimum} people, ${conversions} of ${conversionMinimum} conversions`;
|
|
106
110
|
export const uncappedTotal = (total)=>`Total ${total} (not capped)`;
|
|
107
111
|
export const cappedCount = (count, cap)=>`${count} capped at ${cap}`;
|
|
112
|
+
export const revenueCapHelp = (threshold)=>`Amounts above ${threshold} are limited in the comparison. Totals include the full amounts.`;
|
|
113
|
+
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
114
|
export const atLeast = (bound)=>`at least ${bound}`;
|
|
109
115
|
export const atMost = (bound)=>`at most ${bound}`;
|
|
110
116
|
export const intervalCopy = (low, high)=>`${low} to ${high}`;
|
|
@@ -120,3 +126,6 @@ export const chartSummary = (metric, groups, from, to, changes = [])=>`${metric}
|
|
|
120
126
|
}).format(changes)}.` : ''}`;
|
|
121
127
|
export const contentChangeTitle = (date)=>`Content changed ${date} by an editor`;
|
|
122
128
|
export const daysOfPlan = (days, planned)=>`${days} of ${planned}`;
|
|
129
|
+
/** Use the frozen control label in the fixed wording stored by older verdict writers. */ export function verdictControlCopy(sentence, control) {
|
|
130
|
+
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},`);
|
|
131
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const REVIEW_COPY: {
|
|
2
|
+
readonly noBaseline: "No data yet for this goal.";
|
|
3
|
+
readonly preview: "Preview";
|
|
4
|
+
readonly previewBlocked: "Your browser blocked the preview window. Allow pop-ups for this site.";
|
|
5
|
+
readonly placedTimes: (n: number) => string;
|
|
6
|
+
readonly raise: "Raise allocation";
|
|
7
|
+
readonly addMetric: "Add a goal";
|
|
8
|
+
readonly allocationBody: "Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.";
|
|
9
|
+
readonly allocationInvalid: "Enter a whole percentage higher than the current allocation and no more than 100.";
|
|
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.";
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GOAL_ROLES } from './metrics.js';
|
|
2
|
+
export const REVIEW_COPY = {
|
|
3
|
+
noBaseline: 'No data yet for this goal.',
|
|
4
|
+
preview: 'Preview',
|
|
5
|
+
previewBlocked: 'Your browser blocked the preview window. Allow pop-ups for this site.',
|
|
6
|
+
placedTimes: (n)=>`(placed ${n} times on this page)`,
|
|
7
|
+
raise: 'Raise allocation',
|
|
8
|
+
addMetric: 'Add a goal',
|
|
9
|
+
allocationBody: 'Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.',
|
|
10
|
+
allocationInvalid: 'Enter a whole percentage higher than the current allocation and no more than 100.',
|
|
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.'
|
|
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,9 +1,23 @@
|
|
|
1
|
+
import type { ExperimentKind } from '../../types/contracts.js';
|
|
1
2
|
export declare const TEST_PAGE: {
|
|
3
|
+
readonly noAudienceRules: "No audience choices are available here. Everyone eligible takes part; leave this section as it is.";
|
|
4
|
+
readonly editVersionsOnCanvas: "Edit version content on the canvas.";
|
|
2
5
|
readonly clickPageGroup: "On this test's page";
|
|
3
|
-
readonly clickGoalsNote: "Goals inside linked documents aren't shown. Goals added in code (data-xp-goal) work but aren't listed here.";
|
|
4
6
|
readonly clickGoalHelp: "A click shows interest, not the result you want.";
|
|
5
|
-
readonly staleEdit: "
|
|
7
|
+
readonly staleEdit: "This test changed. Reload to see the latest settings and discard your unfinished edits.";
|
|
6
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";
|
|
7
21
|
readonly loading: "Loading test…";
|
|
8
22
|
readonly forbidden: "You don't have access to this test.";
|
|
9
23
|
readonly missing: "This test no longer exists.";
|
|
@@ -36,9 +50,11 @@ export declare const TEST_PAGE: {
|
|
|
36
50
|
};
|
|
37
51
|
readonly hypothesis: "Why are you testing this? (optional)";
|
|
38
52
|
readonly hypothesisPlaceholder: "We believe … will … because …";
|
|
39
|
-
readonly notPlaced: "
|
|
40
|
-
readonly onPage: "
|
|
41
|
-
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";
|
|
42
58
|
readonly editedOnPage: "Versions are edited on the page.";
|
|
43
59
|
readonly editOnPage: "Edit on page";
|
|
44
60
|
readonly empty: "Empty";
|
|
@@ -48,7 +64,7 @@ export declare const TEST_PAGE: {
|
|
|
48
64
|
readonly emptySlot: "Nothing in this slot yet";
|
|
49
65
|
readonly pageBinding: "Each version is a whole page at its own address.";
|
|
50
66
|
readonly pageAddress: "Page address";
|
|
51
|
-
readonly
|
|
67
|
+
readonly valueColumn: "Value";
|
|
52
68
|
readonly label: "Version label";
|
|
53
69
|
readonly weight: "Share (%)";
|
|
54
70
|
readonly balanceHelp: "Changing a share balances the other versions so the total stays at 100%.";
|
|
@@ -59,14 +75,19 @@ export declare const TEST_PAGE: {
|
|
|
59
75
|
readonly invalidShare: "Use a whole number from 0 to 100.";
|
|
60
76
|
readonly holdoutPrefix: "Holdout: ";
|
|
61
77
|
readonly allocation: "How many people take part";
|
|
78
|
+
readonly everyoneMatches: "Everyone who matches the audience takes part.";
|
|
62
79
|
readonly traffic: "How people are split";
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
80
|
+
readonly otherGoals: "Other goals (optional)";
|
|
81
|
+
readonly otherGoalsTitle: "Other goals";
|
|
82
|
+
readonly dontTrack: "Don't track";
|
|
83
|
+
readonly watch: "Also tracked";
|
|
84
|
+
readonly mustNotWorsen: "Must not get worse";
|
|
85
|
+
readonly otherGoalsHelp: "Also tracked goals appear in results. Choose Must not get worse to get a warning when a version hurts that goal.";
|
|
86
|
+
readonly goal: "Main goal";
|
|
87
|
+
readonly goalHelp: "The one thing you want more of. It decides the winner.";
|
|
88
|
+
readonly guardrailsShort: "Must not get worse";
|
|
89
|
+
readonly secondaryShort: "Also tracked";
|
|
68
90
|
readonly manageGoals: "Manage goals";
|
|
69
|
-
readonly searchGoals: "Search goals";
|
|
70
91
|
readonly chooseGoal: "Choose a goal";
|
|
71
92
|
readonly goalsError: "Couldn't load goals. Try again.";
|
|
72
93
|
readonly noGoal: "None selected";
|
|
@@ -77,6 +98,7 @@ export declare const TEST_PAGE: {
|
|
|
77
98
|
readonly addRule: "Add a rule";
|
|
78
99
|
readonly removeRule: "Remove rule";
|
|
79
100
|
readonly blockPathRule: "This rule no longer applies to page block tests; remove it.";
|
|
101
|
+
readonly targetingValue: (attribute: string) => string;
|
|
80
102
|
readonly attribute: "Attribute";
|
|
81
103
|
readonly comparison: "Comparison";
|
|
82
104
|
readonly value: "Value";
|
|
@@ -85,6 +107,7 @@ export declare const TEST_PAGE: {
|
|
|
85
107
|
readonly reach: "About how many people will see this per day?";
|
|
86
108
|
readonly reachHelp: "A rough number is fine. It only sets the suggested length.";
|
|
87
109
|
readonly duration: "Planned length (days)";
|
|
110
|
+
readonly endDate: "Planned end date";
|
|
88
111
|
readonly noSuggestion: "Enter a daily number above to get a suggestion. 4 weeks is a safe default.";
|
|
89
112
|
readonly chooseGoalSuggestion: "Choose a goal to get a suggestion.";
|
|
90
113
|
readonly required: "(required)";
|
|
@@ -102,3 +125,29 @@ export declare const NUMBER_COMPARISONS: {
|
|
|
102
125
|
readonly lte: "is at most";
|
|
103
126
|
};
|
|
104
127
|
export declare const placementCount: (count: number) => string;
|
|
128
|
+
export declare const DELETE_TEST: {
|
|
129
|
+
readonly blockWinner: (label: string) => string;
|
|
130
|
+
readonly currentSite: "This list reflects the site right now.";
|
|
131
|
+
readonly changedPages: (count: number) => string;
|
|
132
|
+
readonly unreadablePages: (count: number, total: number) => string;
|
|
133
|
+
readonly pageWinner: "These addresses will change where they send visitors:";
|
|
134
|
+
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.";
|
|
135
|
+
readonly runningSteps: readonly ["Stop the test.", "Archive the test."];
|
|
136
|
+
readonly archiveFirst: "You can delete this test after it is archived.";
|
|
137
|
+
readonly close: "Close";
|
|
138
|
+
readonly labelWithCode: (label: string, code: string) => string;
|
|
139
|
+
readonly allLocales: "All languages";
|
|
140
|
+
readonly locales: (names: string) => string;
|
|
141
|
+
readonly action: "Delete test";
|
|
142
|
+
readonly cancel: "Cancel";
|
|
143
|
+
readonly deleted: "Test deleted.";
|
|
144
|
+
readonly title: (name: string) => string;
|
|
145
|
+
readonly consequences: "This permanently deletes the test and all its rounds and results. You can't undo this.";
|
|
146
|
+
readonly alreadyDeleted: "This test was already deleted.";
|
|
147
|
+
readonly checking: "Checking what visitors will see…";
|
|
148
|
+
readonly checkFailed: "Couldn't check what visitors will see after deletion. You can still choose to delete this test.";
|
|
149
|
+
readonly noEffect: "Deleting this test will not change what visitors see.";
|
|
150
|
+
readonly versionChange: (before: string, after: string) => string;
|
|
151
|
+
readonly morePages: (count: number) => string;
|
|
152
|
+
};
|
|
153
|
+
export declare function deleteStatusCopy(status: string, kind?: ExperimentKind): string;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { GOAL_ROLES } from './metrics.js';
|
|
2
|
+
import { API_MESSAGES } from './common.js';
|
|
3
|
+
import { PLACEMENT_LANGUAGES } from './languages.js';
|
|
4
|
+
export const TEST_PAGE = {
|
|
5
|
+
noAudienceRules: 'No audience choices are available here. Everyone eligible takes part; leave this section as it is.',
|
|
6
|
+
editVersionsOnCanvas: 'Edit version content on the canvas.',
|
|
7
|
+
clickPageGroup: "On this test's page",
|
|
8
|
+
clickGoalHelp: 'A click shows interest, not the result you want.',
|
|
9
|
+
staleEdit: 'This test changed. Reload to see the latest settings and discard your unfinished edits.',
|
|
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',
|
|
23
|
+
loading: 'Loading test…',
|
|
24
|
+
forbidden: "You don't have access to this test.",
|
|
25
|
+
missing: 'This test no longer exists.',
|
|
26
|
+
error: "Couldn't load this test.",
|
|
27
|
+
retry: 'Try again',
|
|
28
|
+
name: 'Test name',
|
|
29
|
+
results: 'Results',
|
|
30
|
+
tests: 'Tests',
|
|
31
|
+
test: 'Test',
|
|
32
|
+
navigation: 'Sections',
|
|
33
|
+
completePrefix: 'Complete: ',
|
|
34
|
+
incompletePrefix: 'Incomplete: ',
|
|
35
|
+
complete: 'Complete',
|
|
36
|
+
incomplete: 'Incomplete',
|
|
37
|
+
completeMark: '✓',
|
|
38
|
+
incompleteMark: '○',
|
|
39
|
+
kinds: {
|
|
40
|
+
block: 'Page block',
|
|
41
|
+
page: 'Whole page',
|
|
42
|
+
flag: 'Setting',
|
|
43
|
+
code: 'Setting'
|
|
44
|
+
},
|
|
45
|
+
sections: {
|
|
46
|
+
what: "What you're testing",
|
|
47
|
+
versions: 'Versions',
|
|
48
|
+
win: 'What counts as a win',
|
|
49
|
+
who: 'Who takes part (optional)',
|
|
50
|
+
length: 'How long',
|
|
51
|
+
advanced: 'Advanced settings · for developers'
|
|
52
|
+
},
|
|
53
|
+
hypothesis: 'Why are you testing this? (optional)',
|
|
54
|
+
hypothesisPlaceholder: 'We believe … will … because …',
|
|
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',
|
|
60
|
+
editedOnPage: 'Versions are edited on the page.',
|
|
61
|
+
editOnPage: 'Edit on page',
|
|
62
|
+
empty: 'Empty',
|
|
63
|
+
pageReady: 'Page ready',
|
|
64
|
+
addPageAddress: 'Add a page address',
|
|
65
|
+
ready: 'Content ready',
|
|
66
|
+
emptySlot: 'Nothing in this slot yet',
|
|
67
|
+
pageBinding: 'Each version is a whole page at its own address.',
|
|
68
|
+
pageAddress: 'Page address',
|
|
69
|
+
valueColumn: 'Value',
|
|
70
|
+
label: 'Version label',
|
|
71
|
+
weight: 'Share (%)',
|
|
72
|
+
balanceHelp: 'Changing a share balances the other versions so the total stays at 100%.',
|
|
73
|
+
addVersion: 'Add a version',
|
|
74
|
+
addHoldout: 'Add a holdout',
|
|
75
|
+
split: 'Split evenly',
|
|
76
|
+
remove: 'Remove version',
|
|
77
|
+
invalidShare: 'Use a whole number from 0 to 100.',
|
|
78
|
+
holdoutPrefix: 'Holdout: ',
|
|
79
|
+
allocation: 'How many people take part',
|
|
80
|
+
everyoneMatches: 'Everyone who matches the audience takes part.',
|
|
81
|
+
traffic: 'How people are split',
|
|
82
|
+
otherGoals: 'Other goals (optional)',
|
|
83
|
+
otherGoalsTitle: 'Other goals',
|
|
84
|
+
dontTrack: "Don't track",
|
|
85
|
+
watch: GOAL_ROLES.secondary,
|
|
86
|
+
mustNotWorsen: GOAL_ROLES.guardrail,
|
|
87
|
+
otherGoalsHelp: "Also tracked goals appear in results. Choose Must not get worse to get a warning when a version hurts that goal.",
|
|
88
|
+
goal: GOAL_ROLES.primary,
|
|
89
|
+
goalHelp: 'The one thing you want more of. It decides the winner.',
|
|
90
|
+
guardrailsShort: GOAL_ROLES.guardrail,
|
|
91
|
+
secondaryShort: GOAL_ROLES.secondary,
|
|
92
|
+
manageGoals: 'Manage goals',
|
|
93
|
+
chooseGoal: 'Choose a goal',
|
|
94
|
+
goalsError: "Couldn't load goals. Try again.",
|
|
95
|
+
noGoal: 'None selected',
|
|
96
|
+
missingGoal: 'A goal that no longer exists',
|
|
97
|
+
goalUnavailable: 'Goal details unavailable',
|
|
98
|
+
everyone: 'Everyone on the pages where this appears.',
|
|
99
|
+
rulesSummary: 'Only people matching these rules.',
|
|
100
|
+
addRule: 'Add a rule',
|
|
101
|
+
removeRule: 'Remove rule',
|
|
102
|
+
blockPathRule: 'This rule no longer applies to page block tests; remove it.',
|
|
103
|
+
targetingValue: (attribute)=>`Value for ${attribute}`,
|
|
104
|
+
attribute: 'Attribute',
|
|
105
|
+
comparison: 'Comparison',
|
|
106
|
+
value: 'Value',
|
|
107
|
+
yes: 'Yes',
|
|
108
|
+
no: 'No',
|
|
109
|
+
reach: 'About how many people will see this per day?',
|
|
110
|
+
reachHelp: 'A rough number is fine. It only sets the suggested length.',
|
|
111
|
+
duration: 'Planned length (days)',
|
|
112
|
+
endDate: 'Planned end date',
|
|
113
|
+
noSuggestion: 'Enter a daily number above to get a suggestion. 4 weeks is a safe default.',
|
|
114
|
+
chooseGoalSuggestion: 'Choose a goal to get a suggestion.',
|
|
115
|
+
required: '(required)',
|
|
116
|
+
apply: 'Apply',
|
|
117
|
+
infeasible: 'This may need more people than are available.'
|
|
118
|
+
};
|
|
119
|
+
export const suggestedWeeks = (weeks)=>`Suggested: about ${Math.round(weeks * 10) / 10} weeks`;
|
|
120
|
+
export const weeksHint = (days)=>`About ${Math.round(days / 7 * 10) / 10} weeks`;
|
|
121
|
+
export const NUMBER_COMPARISONS = {
|
|
122
|
+
eq: 'is',
|
|
123
|
+
neq: 'is not',
|
|
124
|
+
gt: 'is more than',
|
|
125
|
+
gte: 'is at least',
|
|
126
|
+
lt: 'is less than',
|
|
127
|
+
lte: 'is at most'
|
|
128
|
+
};
|
|
129
|
+
export const placementCount = (count)=>` (placed ${count} times)`;
|
|
130
|
+
export const DELETE_TEST = {
|
|
131
|
+
action: 'Delete test',
|
|
132
|
+
cancel: 'Cancel',
|
|
133
|
+
deleted: 'Test deleted.',
|
|
134
|
+
title: (name)=>`Delete “${name}”?`,
|
|
135
|
+
consequences: "This permanently deletes the test and all its rounds and results. You can't undo this.",
|
|
136
|
+
alreadyDeleted: 'This test was already deleted.',
|
|
137
|
+
checking: 'Checking what visitors will see…',
|
|
138
|
+
checkFailed: "Couldn't check what visitors will see after deletion. You can still choose to delete this test.",
|
|
139
|
+
noEffect: 'Deleting this test will not change what visitors see.',
|
|
140
|
+
versionChange: (before, after)=>`${before} → ${after}`,
|
|
141
|
+
morePages: (count)=>`${count} more ${count === 1 ? 'page' : 'pages'}.`,
|
|
142
|
+
...PLACEMENT_LANGUAGES,
|
|
143
|
+
blockWinner: (label)=>`On these pages, visitors will see ${label} again, or nothing where it is empty:`,
|
|
144
|
+
currentSite: 'This list reflects the site right now.',
|
|
145
|
+
changedPages: (count)=>`${count} ${count === 1 ? 'page' : 'pages'} will change`,
|
|
146
|
+
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.`,
|
|
147
|
+
pageWinner: 'These addresses will change where they send visitors:',
|
|
148
|
+
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.',
|
|
149
|
+
runningSteps: [
|
|
150
|
+
'Stop the test.',
|
|
151
|
+
'Archive the test.'
|
|
152
|
+
],
|
|
153
|
+
archiveFirst: 'You can delete this test after it is archived.',
|
|
154
|
+
close: 'Close'
|
|
155
|
+
};
|
|
156
|
+
export function deleteStatusCopy(status, kind) {
|
|
157
|
+
switch(status){
|
|
158
|
+
case 'running':
|
|
159
|
+
return DELETE_TEST.archiveFirst;
|
|
160
|
+
case 'stopped':
|
|
161
|
+
return DELETE_TEST.archiveFirst;
|
|
162
|
+
case 'decided':
|
|
163
|
+
if (!kind) return `${DELETE_TEST.archiveFirst} Open the test to see the available archive options.`;
|
|
164
|
+
return `${DELETE_TEST.archiveFirst} Use the archive controls on the test.`;
|
|
165
|
+
default:
|
|
166
|
+
return API_MESSAGES.deleteInvalidStatus;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Path-only admin URLs, preserving Payload's root-route and trailing-slash behavior.
|
|
2
|
+
* Source: Payload 3.90.2 utilities/formatAdminURL.ts (MIT).
|
|
3
|
+
*/
|
|
4
|
+
export declare function formatAdminURL({ adminRoute, path }: {
|
|
5
|
+
adminRoute: string;
|
|
6
|
+
path?: string;
|
|
7
|
+
}): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Path-only admin URLs, preserving Payload's root-route and trailing-slash behavior.
|
|
2
|
+
* Source: Payload 3.90.2 utilities/formatAdminURL.ts (MIT).
|
|
3
|
+
*/ export function formatAdminURL({ adminRoute, path = '' }) {
|
|
4
|
+
const url = `${adminRoute === '/' ? '' : adminRoute.replace(/\/$/, '')}${path}` || '/';
|
|
5
|
+
if (process.env.NEXT_TRAILING_SLASH !== 'true') return url;
|
|
6
|
+
const index = url.search(/[?#]/);
|
|
7
|
+
const pathname = index === -1 ? url : url.slice(0, index);
|
|
8
|
+
return pathname.endsWith('/') ? url : `${pathname}/${index === -1 ? '' : url.slice(index)}`;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const formatter = new Intl.DateTimeFormat('en-GB', {
|
|
2
|
+
day: 'numeric',
|
|
3
|
+
month: 'short',
|
|
4
|
+
year: 'numeric',
|
|
5
|
+
timeZone: 'UTC'
|
|
6
|
+
});
|
|
7
|
+
/** Shared calendar date for admin copy, chart axes and tooltips. */ export function formatDate(value) {
|
|
8
|
+
const date = value instanceof Date ? value : typeof value === 'string' || typeof value === 'number' ? new Date(value) : null;
|
|
9
|
+
return date && Number.isFinite(date.valueOf()) ? formatter.format(date) : '—';
|
|
10
|
+
}
|
|
11
|
+
const relative = new Intl.RelativeTimeFormat('en', {
|
|
12
|
+
numeric: 'always'
|
|
13
|
+
});
|
|
14
|
+
export function relativeTime(value, now = Date.now()) {
|
|
15
|
+
const minutes = Math.max(0, Math.floor((now - Date.parse(value)) / 60_000));
|
|
16
|
+
if (!Number.isFinite(minutes)) return formatDate(value);
|
|
17
|
+
if (minutes === 0) return 'just now';
|
|
18
|
+
if (minutes < 60) return relative.format(-minutes, 'minute');
|
|
19
|
+
if (minutes < 1440) return relative.format(-Math.floor(minutes / 60), 'hour');
|
|
20
|
+
return relative.format(-Math.floor(minutes / 1440), 'day');
|
|
21
|
+
}
|
|
@@ -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;
|
|
@@ -22,7 +22,6 @@ export const VERDICT_LABELS = {
|
|
|
22
22
|
'data-problem': 'Check the data',
|
|
23
23
|
'guardrail-failing': 'An important outcome got worse',
|
|
24
24
|
collecting: 'Collecting results',
|
|
25
|
-
'original-better': 'The Original is better',
|
|
26
25
|
'worse-none-better': 'No better option',
|
|
27
26
|
winner: 'A winner',
|
|
28
27
|
mixed: 'Mixed results',
|
|
@@ -40,8 +39,8 @@ export function statusLabel(status) {
|
|
|
40
39
|
export function phaseKindLabel(kind) {
|
|
41
40
|
return PHASE_KIND_LABELS[kind];
|
|
42
41
|
}
|
|
43
|
-
export function verdictCodeLabel(code) {
|
|
44
|
-
return VERDICT_LABELS[code];
|
|
42
|
+
export function verdictCodeLabel(code, controlLabel = 'The control version') {
|
|
43
|
+
return code === 'original-better' ? `${controlLabel} is better` : VERDICT_LABELS[code];
|
|
45
44
|
}
|
|
46
45
|
export function kindLabel(kind) {
|
|
47
46
|
return KIND_LABELS[kind];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { Status } from '../types/contracts.js';
|
|
2
2
|
import type { EditableField } from '../types/admin.js';
|
|
3
|
+
import type { SectionId } from './surface/contracts.js';
|
|
4
|
+
export declare function sectionLockNotice(status: Status, section: SectionId): string | null;
|
|
3
5
|
export declare function lockedReason(status: Status, field: string, table: Record<Status, readonly EditableField[]>): string | null;
|