@delmaredigital/payload-experiments 0.4.0-rc.1 → 0.4.0-rc.10
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 +2 -2
- 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 +6 -1
- package/dist/admin/copy/goals.js +10 -3
- package/dist/admin/copy/newTest.d.ts +6 -7
- package/dist/admin/copy/newTest.js +9 -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.js +5 -2
- package/dist/admin/surface/TestRowMenu.d.ts +6 -0
- package/dist/admin/surface/TestRowMenu.js +156 -0
- package/dist/admin/surface/TestsHome.d.ts +5 -3
- package/dist/admin/surface/TestsHome.js +266 -58
- package/dist/admin/surface/TestsSurface.js +8 -7
- package/dist/admin/surface/goals/GoalForm.d.ts +1 -1
- package/dist/admin/surface/goals/GoalForm.js +95 -54
- package/dist/admin/surface/goals/GoalsList.d.ts +1 -1
- package/dist/admin/surface/goals/GoalsList.js +5 -4
- package/dist/admin/surface/goals/data.js +2 -2
- package/dist/admin/surface/goals/goals.css +7 -0
- package/dist/admin/surface/goals/goals.model.d.ts +11 -1
- package/dist/admin/surface/goals/goals.model.js +43 -0
- package/dist/admin/surface/home.model.d.ts +9 -8
- package/dist/admin/surface/home.model.js +22 -21
- package/dist/admin/surface/newTest/NewTest.d.ts +4 -4
- package/dist/admin/surface/newTest/NewTest.js +98 -94
- package/dist/admin/surface/newTest/PageWizard.d.ts +2 -1
- package/dist/admin/surface/newTest/PageWizard.js +111 -76
- package/dist/admin/surface/newTest/newTest.css +28 -9
- package/dist/admin/surface/results/ResultsHeader.d.ts +2 -2
- package/dist/admin/surface/results/ResultsHeader.js +58 -54
- package/dist/admin/surface/surface.css +10 -0
- package/dist/admin/surface/test/TestPage.d.ts +1 -2
- package/dist/admin/surface/test/TestPage.js +42 -162
- 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 +11 -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/formState.js +1 -1
- 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 +16 -4
- package/dist/collections/metricsGuards.js +2 -0
- package/dist/collections/serialize.js +5 -4
- 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 +1 -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/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 +19 -20
- 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.js +951 -179
- 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 +57 -0
- package/dist/puck/editor/ResultsReadout.d.ts +2 -1
- package/dist/puck/editor/ResultsReadout.js +10 -6
- package/dist/puck/editor/VersionBuilder.d.ts +66 -12
- package/dist/puck/editor/VersionBuilder.js +554 -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 +64 -19
- package/dist/puck/editor/copy.js +72 -20
- package/dist/puck/editor/createTest.d.ts +3 -0
- package/dist/puck/editor/createTest.js +33 -0
- package/dist/puck/editor/editor.chrome.css +191 -19
- package/dist/puck/editor/editor.css +328 -24
- 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 +1 -1
- package/dist/puck/slotConfig.js +17 -4
- 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/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.js +2 -1
- 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 +52 -14
- 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.js +6 -2
- package/dist/testSurface/actions/DecideDialog.d.ts +16 -0
- package/dist/{admin → testSurface}/actions/DecideDialog.js +78 -55
- package/dist/testSurface/actions/LifecycleAction.d.ts +16 -0
- package/dist/testSurface/actions/LifecycleAction.js +105 -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 +122 -0
- 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 +28 -8
- package/dist/{admin → testSurface}/copy/actions.js +31 -11
- package/dist/{admin → testSurface}/copy/common.d.ts +13 -4
- package/dist/{admin → testSurface}/copy/common.js +18 -8
- 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 +1 -0
- package/dist/{admin → testSurface}/copy/metrics.js +1 -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 +38 -4
- package/dist/{admin → testSurface}/copy/readiness.js +52 -7
- package/dist/{admin → testSurface}/copy/results.d.ts +6 -3
- package/dist/{admin → testSurface}/copy/results.js +6 -3
- package/dist/{admin → testSurface}/copy/review.d.ts +1 -1
- package/dist/{admin → testSurface}/copy/review.js +1 -1
- package/dist/{admin → testSurface}/copy/surface.d.ts +11 -2
- package/dist/{admin → testSurface}/copy/surface.js +13 -10
- package/dist/{admin → testSurface}/copy/testPage.d.ts +53 -8
- package/dist/testSurface/copy/testPage.js +165 -0
- package/dist/testSurface/format/adminURL.d.ts +7 -0
- package/dist/testSurface/format/adminURL.js +9 -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.js +6 -2
- 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/{admin → testSurface}/surface/pageBlock/parts.js +39 -11
- 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 +503 -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 +8 -4
- package/dist/testSurface/surface/readiness/ActionDialogs.js +351 -0
- package/dist/{admin → testSurface}/surface/readiness/Banner.d.ts +2 -3
- package/dist/testSurface/surface/readiness/Banner.js +187 -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 +10 -0
- package/dist/testSurface/surface/readiness/SaveStatus.js +66 -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 +7 -3
- package/dist/{admin → testSurface}/surface/results/ResultsBody.js +108 -44
- 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 +58 -18
- package/dist/testSurface/surface/setting/setting.css +17 -0
- package/dist/{admin → testSurface}/surface/test/AdvancedSection.js +2 -0
- 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 +116 -86
- package/dist/testSurface/surface/test/LengthSection.d.ts +2 -0
- package/dist/{admin → testSurface}/surface/test/LengthSection.js +5 -1
- package/dist/{admin → testSurface}/surface/test/PageHoldout.js +4 -1
- package/dist/{admin → testSurface}/surface/test/Rail.js +7 -4
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.d.ts +1 -0
- package/dist/{admin → testSurface}/surface/test/ReadinessBar.js +2 -3
- package/dist/{admin → testSurface}/surface/test/Section.d.ts +3 -1
- package/dist/testSurface/surface/test/Section.js +80 -0
- package/dist/{admin → testSurface}/surface/test/TargetingSection.js +82 -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/{admin → testSurface}/surface/test/VersionsSection.js +69 -35
- package/dist/{admin → testSurface}/surface/test/fields.d.ts +30 -7
- package/dist/testSurface/surface/test/fields.js +306 -0
- package/dist/{admin → testSurface}/surface/test/pageParts.js +27 -43
- package/dist/testSurface/surface/test/testPage.css +103 -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 +7 -0
- package/dist/testSurface/surfaceUrls.js +19 -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 +116 -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 +7 -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 +49 -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/actions.model.js +0 -70
- package/dist/admin/copy/pages.d.ts +0 -26
- package/dist/admin/copy/pages.js +0 -26
- package/dist/admin/copy/testPage.js +0 -104
- 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/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/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}/PreviewLinks.d.ts +0 -0
- /package/dist/{admin → testSurface}/actions/decide.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/actions/decide.model.js +0 -0
- /package/dist/{admin → testSurface}/allocation.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/allocation.model.js +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}/copy/advanced.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/advanced.js +0 -0
- /package/dist/{admin → testSurface}/copy/arms.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/arms.js +0 -0
- /package/dist/{admin → testSurface}/copy/audience.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/audience.js +0 -0
- /package/dist/{admin → testSurface}/copy/recommendation.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/recommendation.js +0 -0
- /package/dist/{admin → testSurface}/copy/setting.d.ts +0 -0
- /package/dist/{admin → testSurface}/copy/setting.js +0 -0
- /package/dist/{admin → testSurface}/format/date.d.ts +0 -0
- /package/dist/{admin → testSurface}/format/date.js +0 -0
- /package/dist/{admin → testSurface}/labels.d.ts +0 -0
- /package/dist/{admin → testSurface}/labels.js +0 -0
- /package/dist/{admin → testSurface}/lockedNotice.model.d.ts +0 -0
- /package/dist/{admin → testSurface}/lockedNotice.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/results.model.d.ts +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/results/recommendation.model.js +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/PageHoldout.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,20 +1,33 @@
|
|
|
1
|
+
import { API_MESSAGES } from '../../testSurface/copy/common.js';
|
|
1
2
|
export const BLOCK_COPY = {
|
|
2
3
|
testBlock: 'Test a block on this page',
|
|
3
4
|
pick: 'Choose a block',
|
|
4
|
-
empty: 'There are no blocks
|
|
5
|
+
empty: 'There are no saved blocks to test yet.',
|
|
5
6
|
blockChanged: 'This block changed while you were working. Nothing was replaced. Try again.',
|
|
6
7
|
replace: 'Replace',
|
|
8
|
+
replaceVersion: 'Replace a version in',
|
|
7
9
|
cancel: 'Cancel',
|
|
8
10
|
retry: 'Try again',
|
|
9
|
-
saveFirst: 'Save your changes
|
|
11
|
+
saveFirst: 'Save your changes to test this block.',
|
|
10
12
|
setup: 'Set up the test',
|
|
11
13
|
copy: 'Copy the Original into this version',
|
|
12
|
-
confirmCopy:
|
|
14
|
+
confirmCopy: "Replace this version's content with a copy of the Original? Edits you made to this version will be lost.",
|
|
13
15
|
unwrap: 'Unwrap',
|
|
16
|
+
removeAndUnwrap: 'Remove the test and unwrap',
|
|
17
|
+
deleteAndUnwrap: 'Delete and unwrap',
|
|
18
|
+
alreadyDeleted: API_MESSAGES.testAlreadyDeleted,
|
|
19
|
+
noLongerDraft: API_MESSAGES.testNoLongerDraft,
|
|
20
|
+
finishUnwrap: 'The test was removed; use Unwrap to finish.',
|
|
14
21
|
deleted: "This block's test was deleted; the page shows the Original.",
|
|
15
|
-
discarded: '
|
|
22
|
+
discarded: 'Winner discarded: this block shows the Original. Use Unwrap to replace it with the Original content.',
|
|
23
|
+
neverDecided: 'Archived without a winner: this block shows the Original. Use Unwrap to replace it with the Original content.',
|
|
16
24
|
running: "Running: visitors see different versions. Edit a version's tab to change it; the change is noted on the results.",
|
|
17
25
|
stopped: 'Stopped: visitors see the Original.',
|
|
26
|
+
archivedReplaceWhy: 'To keep the winner on this page without the test, replace the Experiment block.',
|
|
27
|
+
archivedReplaceSteps: [
|
|
28
|
+
'Copy the winning content into ordinary page blocks.',
|
|
29
|
+
'Remove the Experiment block.'
|
|
30
|
+
],
|
|
18
31
|
slotLabels: {
|
|
19
32
|
control: 'Original',
|
|
20
33
|
variantA: 'Variant A',
|
|
@@ -22,7 +35,7 @@ export const BLOCK_COPY = {
|
|
|
22
35
|
variantC: 'Variant C'
|
|
23
36
|
},
|
|
24
37
|
wrapRefusals: {
|
|
25
|
-
'wrap-target-missing': 'Reload
|
|
38
|
+
'wrap-target-missing': 'Reload to see the current page.',
|
|
26
39
|
'locked-placement': 'Another editor has this page open. Try again when it is unlocked.',
|
|
27
40
|
'invalid-status': 'This action is not available in the current status.',
|
|
28
41
|
'unknown-collection': "That page type isn't set up for tests.",
|
|
@@ -33,6 +46,27 @@ export const blockPosition = (label, position)=>`${label} (block ${position})`;
|
|
|
33
46
|
export const blockTestName = (title, label)=>`${title}: ${label}`;
|
|
34
47
|
export const blockDraftStatus = (name)=>`This block is being tested in the draft test ${name}. Visitors see the Original until it starts.`;
|
|
35
48
|
export const blockDecidedStatus = (winner, rollout)=>`Decided: visitors see ${winner}${rollout ? '; a holdout still sees the Original' : ''}.`;
|
|
36
|
-
export const
|
|
49
|
+
export const blockRunningUnwrap = {
|
|
50
|
+
before: 'Stop ',
|
|
51
|
+
link: 'the test',
|
|
52
|
+
after: ' to unwrap.'
|
|
53
|
+
};
|
|
54
|
+
export const blockDecidedUnwrap = {
|
|
55
|
+
before: 'To put the winner into this page, use "Make it the content" on ',
|
|
56
|
+
link: 'the test',
|
|
57
|
+
after: '.'
|
|
58
|
+
};
|
|
59
|
+
export const blockFinishedCopy = (winner, originalWon = false, emptyWinner = false)=>({
|
|
60
|
+
before: emptyWinner ? 'Archived: the winner has no content here, so visitors see the Original. Unwrap leaves the page as visitors see it now. View the results on ' : originalWon ? `Archived: the Original won. This block shows ${winner}. Use Unwrap to keep its content without the Experiment block. View the results on ` : `Archived: this block keeps serving ${winner}, with the Original as a fallback if it is empty. View the results on `,
|
|
61
|
+
link: 'the test',
|
|
62
|
+
after: '.'
|
|
63
|
+
});
|
|
64
|
+
export const blockFinishedStatus = (winner, originalWon = false)=>{
|
|
65
|
+
const copy = blockFinishedCopy(winner, originalWon);
|
|
66
|
+
return copy.before + copy.link + copy.after;
|
|
67
|
+
};
|
|
68
|
+
export const blockDeleteConfirmation = (name)=>`Delete the draft test ${name} and put the Original back in its place? Deleting the test can't be undone.`;
|
|
69
|
+
export const blockUnwrapConfirmation = (name)=>`The Original replaces this block when you save the page. The test ${name} and its results are kept.`;
|
|
70
|
+
export const blockUnwrapNotice = (drafts, deleted)=>`${deleted ? 'The draft test was deleted and the block unwrapped.' : 'The block was unwrapped.'} ${drafts ? 'Save draft' : 'Save'} to keep it.`;
|
|
37
71
|
export const blockSaveNotice = (drafts)=>drafts ? 'Save a draft of this page to add the test.' : 'Save this page to add the test.';
|
|
38
72
|
export const blockSyncNotice = (drafts)=>drafts ? 'Versions were updated to match the test. Save draft to keep them.' : 'Versions were updated to match the test. Save to keep them.';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const GOALS_COPY: {
|
|
2
2
|
readonly slugRule: "Use 1–64 lowercase letters, numbers, underscores or hyphens, starting with a letter or number.";
|
|
3
3
|
readonly duplicateSlug: "Another goal already uses this short name. Change it under Advanced.";
|
|
4
|
+
readonly duplicateSlugMain: "Another goal already uses this short name. Choose another.";
|
|
4
5
|
readonly title: "Goals";
|
|
5
6
|
readonly goal: "Goal";
|
|
6
7
|
readonly newGoal: "New goal";
|
|
@@ -12,6 +13,7 @@ export declare const GOALS_COPY: {
|
|
|
12
13
|
readonly decrease: "Less is better";
|
|
13
14
|
readonly usedBy: "Used by";
|
|
14
15
|
readonly status: "Status";
|
|
16
|
+
readonly showLess: "Show less";
|
|
15
17
|
readonly inUse: "In use";
|
|
16
18
|
readonly unused: "Not used yet";
|
|
17
19
|
readonly empty: "No goals yet. A goal is what a test tries to improve.";
|
|
@@ -54,8 +56,11 @@ export declare const GOALS_COPY: {
|
|
|
54
56
|
readonly deleteTitle: "Delete this goal?";
|
|
55
57
|
readonly deleteBody: "This cannot be undone.";
|
|
56
58
|
readonly confirmDelete: "Delete";
|
|
59
|
+
readonly thoseTests: "those tests";
|
|
60
|
+
readonly deleteLockedEnd: " first.";
|
|
57
61
|
};
|
|
58
62
|
export declare function goalUsedBy(count: number): string;
|
|
59
63
|
export declare function goalInUse(count: number): string;
|
|
60
|
-
export declare function
|
|
64
|
+
export declare function goalDeleteLockedStart(count: number): string;
|
|
61
65
|
export declare function goalsNoMatches(search: string): string;
|
|
66
|
+
export declare function goalShowAll(count: number): string;
|
package/dist/admin/copy/goals.js
CHANGED
|
@@ -2,6 +2,7 @@ import { CLICK_GOAL_COPY } from '../../goals/picker/copy.js';
|
|
|
2
2
|
export const GOALS_COPY = {
|
|
3
3
|
slugRule: CLICK_GOAL_COPY.slugRule,
|
|
4
4
|
duplicateSlug: CLICK_GOAL_COPY.duplicateSlug,
|
|
5
|
+
duplicateSlugMain: 'Another goal already uses this short name. Choose another.',
|
|
5
6
|
title: 'Goals',
|
|
6
7
|
goal: 'Goal',
|
|
7
8
|
newGoal: 'New goal',
|
|
@@ -13,6 +14,7 @@ export const GOALS_COPY = {
|
|
|
13
14
|
decrease: 'Less is better',
|
|
14
15
|
usedBy: 'Used by',
|
|
15
16
|
status: 'Status',
|
|
17
|
+
showLess: 'Show less',
|
|
16
18
|
inUse: 'In use',
|
|
17
19
|
unused: 'Not used yet',
|
|
18
20
|
empty: 'No goals yet. A goal is what a test tries to improve.',
|
|
@@ -54,7 +56,9 @@ export const GOALS_COPY = {
|
|
|
54
56
|
fields: 'Goal details',
|
|
55
57
|
deleteTitle: 'Delete this goal?',
|
|
56
58
|
deleteBody: 'This cannot be undone.',
|
|
57
|
-
confirmDelete: 'Delete'
|
|
59
|
+
confirmDelete: 'Delete',
|
|
60
|
+
thoseTests: 'those tests',
|
|
61
|
+
deleteLockedEnd: ' first.'
|
|
58
62
|
};
|
|
59
63
|
export function goalUsedBy(count) {
|
|
60
64
|
return `Used by ${count} ${count === 1 ? 'test' : 'tests'}`;
|
|
@@ -62,9 +66,12 @@ export function goalUsedBy(count) {
|
|
|
62
66
|
export function goalInUse(count) {
|
|
63
67
|
return `In use by ${count} ${count === 1 ? 'test' : 'tests'}`;
|
|
64
68
|
}
|
|
65
|
-
export function
|
|
66
|
-
return `${goalUsedBy(count)}. Remove it from
|
|
69
|
+
export function goalDeleteLockedStart(count) {
|
|
70
|
+
return `${goalUsedBy(count)}. Remove it from `;
|
|
67
71
|
}
|
|
68
72
|
export function goalsNoMatches(search) {
|
|
69
73
|
return `No goals match “${search}”.`;
|
|
70
74
|
}
|
|
75
|
+
export function goalShowAll(count) {
|
|
76
|
+
return `Show all ${count}`;
|
|
77
|
+
}
|
|
@@ -4,21 +4,20 @@ export declare const NEW_TEST_COPY: {
|
|
|
4
4
|
readonly setting: "A setting";
|
|
5
5
|
readonly page: "A whole page";
|
|
6
6
|
readonly pageMeaning: "Show different versions of a whole page at the same address, and see which one works better.";
|
|
7
|
-
readonly collection: "
|
|
7
|
+
readonly collection: "Which type of page?";
|
|
8
8
|
readonly original: "Original";
|
|
9
9
|
readonly originalHelp: "Choose the page visitors see today.";
|
|
10
10
|
readonly review: "Review";
|
|
11
11
|
readonly backToTest: "Back to the test";
|
|
12
12
|
readonly finishSetup: "Finish setup";
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
13
|
+
readonly blocksHandoff: "In the page editor, choose 'Test a block on this page' to pick the block to test.";
|
|
14
|
+
readonly pageType: "Page type";
|
|
15
|
+
readonly choosePageType: "Choose a page type";
|
|
15
16
|
readonly blockMeaning: "Compare different versions of content on a page.";
|
|
16
17
|
readonly settingMeaning: "Compare different choices for a setting on your site.";
|
|
17
18
|
readonly unavailable: "A developer needs to set up pages or settings before you can create a test.";
|
|
18
|
-
readonly handoff: "
|
|
19
|
-
readonly
|
|
20
|
-
readonly recentPages: "Showing the 50 most recently edited.";
|
|
21
|
-
readonly open: "Open";
|
|
19
|
+
readonly handoff: "Set up a Puck block test from its page so you can place it on the canvas.";
|
|
20
|
+
readonly handoffSteps: readonly ["Add an Experiment block in Puck.", "Choose Set up test in the sidebar."];
|
|
22
21
|
readonly chooseSetting: "Which setting do you want to test?";
|
|
23
22
|
readonly people: "Count people as:";
|
|
24
23
|
readonly visitors: "Visitors";
|
|
@@ -4,21 +4,23 @@ export const NEW_TEST_COPY = {
|
|
|
4
4
|
setting: 'A setting',
|
|
5
5
|
page: 'A whole page',
|
|
6
6
|
pageMeaning: 'Show different versions of a whole page at the same address, and see which one works better.',
|
|
7
|
-
collection: '
|
|
7
|
+
collection: 'Which type of page?',
|
|
8
8
|
original: 'Original',
|
|
9
9
|
originalHelp: 'Choose the page visitors see today.',
|
|
10
10
|
review: 'Review',
|
|
11
11
|
backToTest: 'Back to the test',
|
|
12
12
|
finishSetup: 'Finish setup',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
blocksHandoff: "In the page editor, choose 'Test a block on this page' to pick the block to test.",
|
|
14
|
+
pageType: 'Page type',
|
|
15
|
+
choosePageType: 'Choose a page type',
|
|
15
16
|
blockMeaning: 'Compare different versions of content on a page.',
|
|
16
17
|
settingMeaning: 'Compare different choices for a setting on your site.',
|
|
17
18
|
unavailable: 'A developer needs to set up pages or settings before you can create a test.',
|
|
18
|
-
handoff: '
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
handoff: 'Set up a Puck block test from its page so you can place it on the canvas.',
|
|
20
|
+
handoffSteps: [
|
|
21
|
+
'Add an Experiment block in Puck.',
|
|
22
|
+
'Choose Set up test in the sidebar.'
|
|
23
|
+
],
|
|
22
24
|
chooseSetting: 'Which setting do you want to test?',
|
|
23
25
|
people: 'Count people as:',
|
|
24
26
|
visitors: 'Visitors',
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { Button, FieldError, FieldLabel,
|
|
3
|
+
import { Button, FieldDescription, FieldError, FieldLabel, SelectInput, useAuth, useConfig, useField } from '@payloadcms/ui';
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import { useClickGoalPicker } from '../../goals/picker/useClickGoalPicker.js';
|
|
6
|
+
import { clickGoalOptions } from '../../goals/picker/clickGoalPicker.model.js';
|
|
6
7
|
import { CLICK_GOAL_COPY as C } from '../../goals/picker/copy.js';
|
|
8
|
+
import '../theme.css';
|
|
9
|
+
import './xpGoalField.css';
|
|
10
|
+
// Payload 3's declaration requires `name`, though SelectInput only consumes `path`.
|
|
11
|
+
const GoalSelectInput = SelectInput;
|
|
7
12
|
export function XpGoalField({ path, field, readOnly }) {
|
|
8
13
|
const { value, setValue, showError } = useField({
|
|
9
14
|
path
|
|
@@ -13,9 +18,11 @@ export function XpGoalField({ path, field, readOnly }) {
|
|
|
13
18
|
const access = permissions?.collections?.['xp-experiments'];
|
|
14
19
|
const locked = Boolean(readOnly || field.admin?.readOnly);
|
|
15
20
|
const picker = useClickGoalPicker(config.routes.api, {
|
|
16
|
-
enabled: access?.update === true,
|
|
21
|
+
enabled: access?.update === true && !locked,
|
|
17
22
|
onSelect: setValue
|
|
18
23
|
});
|
|
24
|
+
const { options, missing } = clickGoalOptions(picker.status, picker.goals, value ?? '');
|
|
25
|
+
const readonly = locked || picker.status === 'not-manager';
|
|
19
26
|
const id = useId(), namePath = `${id}-name`, slugPath = `${id}-slug`;
|
|
20
27
|
const stopEnter = (event)=>{
|
|
21
28
|
if (event.key === 'Enter') {
|
|
@@ -24,128 +31,163 @@ export function XpGoalField({ path, field, readOnly }) {
|
|
|
24
31
|
}
|
|
25
32
|
};
|
|
26
33
|
return /*#__PURE__*/ _jsxs("div", {
|
|
34
|
+
className: "field-type xp-goal-field",
|
|
27
35
|
children: [
|
|
28
|
-
/*#__PURE__*/
|
|
29
|
-
path: path,
|
|
30
|
-
label: field.label ?? C.label,
|
|
31
|
-
description: field.admin?.description,
|
|
32
|
-
required: field.required,
|
|
33
|
-
readOnly: locked,
|
|
34
|
-
value: value ?? '',
|
|
35
|
-
showError: showError,
|
|
36
|
-
Error: /*#__PURE__*/ _jsx(FieldError, {
|
|
37
|
-
path: path,
|
|
38
|
-
showError: showError
|
|
39
|
-
}),
|
|
40
|
-
onChange: (event)=>{
|
|
41
|
-
if (!locked) setValue(event.currentTarget.value);
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
picker.canManage && !locked ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
36
|
+
readonly ? /*#__PURE__*/ _jsxs("div", {
|
|
45
37
|
children: [
|
|
46
|
-
/*#__PURE__*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
/*#__PURE__*/ _jsxs("select", {
|
|
51
|
-
id: `${id}-picker`,
|
|
52
|
-
value: picker.goals.some((goal)=>goal.slug === value) ? value : '',
|
|
53
|
-
onChange: (event)=>{
|
|
54
|
-
if (event.currentTarget.value) setValue(event.currentTarget.value);
|
|
55
|
-
},
|
|
38
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
39
|
+
className: "field-label",
|
|
40
|
+
id: `${id}-label`,
|
|
56
41
|
children: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
value: goal.slug,
|
|
63
|
-
children: goal.name
|
|
64
|
-
}, goal.id))
|
|
42
|
+
C.label,
|
|
43
|
+
field.required ? /*#__PURE__*/ _jsx("span", {
|
|
44
|
+
className: "required",
|
|
45
|
+
children: "*"
|
|
46
|
+
}) : null
|
|
65
47
|
]
|
|
66
48
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
children: C.
|
|
70
|
-
})
|
|
71
|
-
|
|
49
|
+
/*#__PURE__*/ _jsx("p", {
|
|
50
|
+
"aria-labelledby": `${id}-label`,
|
|
51
|
+
children: value || C.none
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}) : /*#__PURE__*/ _jsxs("div", {
|
|
55
|
+
className: "xp-goal-field__row",
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ _jsx(GoalSelectInput, {
|
|
58
|
+
path: path,
|
|
59
|
+
className: "xp-goal-field__select",
|
|
60
|
+
value: value ?? '',
|
|
61
|
+
options: options,
|
|
62
|
+
label: C.label,
|
|
63
|
+
required: field.required,
|
|
64
|
+
readOnly: picker.status !== 'ready',
|
|
65
|
+
isClearable: false,
|
|
66
|
+
placeholder: C.none,
|
|
67
|
+
showError: showError,
|
|
68
|
+
onChange: (option)=>{
|
|
69
|
+
if (picker.status === 'ready' && option && !Array.isArray(option)) setValue(String(option.value));
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
picker.canManage && !picker.panel.open ? /*#__PURE__*/ _jsx(Button, {
|
|
72
73
|
type: "button",
|
|
74
|
+
margin: false,
|
|
75
|
+
buttonStyle: "secondary",
|
|
73
76
|
onClick: picker.open,
|
|
74
77
|
children: C.newGoal
|
|
75
|
-
}) :
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}),
|
|
98
|
-
/*#__PURE__*/ _jsxs("details", {
|
|
99
|
-
open: picker.panel.advanced,
|
|
100
|
-
onToggle: (event)=>picker.setAdvanced(event.currentTarget.open),
|
|
101
|
-
children: [
|
|
102
|
-
/*#__PURE__*/ _jsx("summary", {
|
|
103
|
-
children: C.advanced
|
|
104
|
-
}),
|
|
105
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
106
|
-
className: "field-type text",
|
|
107
|
-
children: [
|
|
108
|
-
/*#__PURE__*/ _jsx(FieldLabel, {
|
|
109
|
-
path: slugPath,
|
|
110
|
-
label: C.slug
|
|
111
|
-
}),
|
|
112
|
-
/*#__PURE__*/ _jsx("input", {
|
|
113
|
-
id: `field-${slugPath}`,
|
|
114
|
-
value: picker.panel.slug,
|
|
115
|
-
disabled: picker.panel.pending,
|
|
116
|
-
onKeyDown: stopEnter,
|
|
117
|
-
"aria-invalid": Boolean(picker.panel.errors.slug) || undefined,
|
|
118
|
-
"aria-describedby": picker.panel.errors.slug ? `${id}-slug-error` : undefined,
|
|
119
|
-
onChange: (event)=>picker.setSlug(event.currentTarget.value)
|
|
120
|
-
}),
|
|
121
|
-
picker.panel.errors.slug ? /*#__PURE__*/ _jsx("p", {
|
|
122
|
-
id: `${id}-slug-error`,
|
|
123
|
-
role: "alert",
|
|
124
|
-
children: picker.panel.errors.slug
|
|
125
|
-
}) : null
|
|
126
|
-
]
|
|
127
|
-
})
|
|
128
|
-
]
|
|
129
|
-
}),
|
|
130
|
-
picker.panel.errors.general ? /*#__PURE__*/ _jsx("p", {
|
|
131
|
-
role: "alert",
|
|
132
|
-
children: picker.panel.errors.general
|
|
133
|
-
}) : null,
|
|
134
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
135
|
-
type: "button",
|
|
136
|
-
disabled: picker.panel.pending || !picker.panel.name.trim(),
|
|
137
|
-
onClick: ()=>void picker.create(),
|
|
138
|
-
children: C.createGoal
|
|
139
|
-
}),
|
|
140
|
-
/*#__PURE__*/ _jsx(Button, {
|
|
141
|
-
type: "button",
|
|
142
|
-
disabled: picker.panel.pending,
|
|
143
|
-
onClick: picker.cancel,
|
|
144
|
-
children: C.cancel
|
|
145
|
-
})
|
|
146
|
-
]
|
|
78
|
+
}) : null
|
|
79
|
+
]
|
|
80
|
+
}),
|
|
81
|
+
readonly ? /*#__PURE__*/ _jsx(FieldError, {
|
|
82
|
+
path: path,
|
|
83
|
+
showError: showError
|
|
84
|
+
}) : null,
|
|
85
|
+
/*#__PURE__*/ _jsx(FieldDescription, {
|
|
86
|
+
path: path,
|
|
87
|
+
description: field.admin?.description
|
|
88
|
+
}),
|
|
89
|
+
!readonly && picker.status === 'error' ? /*#__PURE__*/ _jsxs("div", {
|
|
90
|
+
children: [
|
|
91
|
+
/*#__PURE__*/ _jsx("p", {
|
|
92
|
+
children: C.loadError
|
|
93
|
+
}),
|
|
94
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
95
|
+
type: "button",
|
|
96
|
+
margin: false,
|
|
97
|
+
buttonStyle: "secondary",
|
|
98
|
+
onClick: picker.retry,
|
|
99
|
+
children: C.retry
|
|
147
100
|
})
|
|
148
101
|
]
|
|
102
|
+
}) : null,
|
|
103
|
+
missing && !readonly && !showError ? /*#__PURE__*/ _jsx("p", {
|
|
104
|
+
role: "status",
|
|
105
|
+
children: C.undefinedKey
|
|
106
|
+
}) : null,
|
|
107
|
+
picker.canManage && !locked ? /*#__PURE__*/ _jsx(_Fragment, {
|
|
108
|
+
children: picker.panel.open ? /*#__PURE__*/ _jsxs("section", {
|
|
109
|
+
className: "xp-goal-field__panel",
|
|
110
|
+
"aria-labelledby": `${id}-title`,
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
113
|
+
id: `${id}-title`,
|
|
114
|
+
children: C.title
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
117
|
+
className: "field-type text",
|
|
118
|
+
children: [
|
|
119
|
+
/*#__PURE__*/ _jsx(FieldLabel, {
|
|
120
|
+
path: namePath,
|
|
121
|
+
label: C.name
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ _jsx("input", {
|
|
124
|
+
id: `field-${namePath}`,
|
|
125
|
+
value: picker.panel.name,
|
|
126
|
+
disabled: picker.panel.pending,
|
|
127
|
+
onKeyDown: stopEnter,
|
|
128
|
+
onChange: (event)=>picker.setName(event.currentTarget.value)
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
}),
|
|
132
|
+
/*#__PURE__*/ _jsxs("details", {
|
|
133
|
+
open: picker.panel.advanced,
|
|
134
|
+
onToggle: (event)=>picker.setAdvanced(event.currentTarget.open),
|
|
135
|
+
children: [
|
|
136
|
+
/*#__PURE__*/ _jsx("summary", {
|
|
137
|
+
children: C.advanced
|
|
138
|
+
}),
|
|
139
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
140
|
+
className: "field-type text",
|
|
141
|
+
children: [
|
|
142
|
+
/*#__PURE__*/ _jsx(FieldLabel, {
|
|
143
|
+
path: slugPath,
|
|
144
|
+
label: C.slug
|
|
145
|
+
}),
|
|
146
|
+
/*#__PURE__*/ _jsx("input", {
|
|
147
|
+
id: `field-${slugPath}`,
|
|
148
|
+
value: picker.panel.slug,
|
|
149
|
+
disabled: picker.panel.pending,
|
|
150
|
+
onKeyDown: stopEnter,
|
|
151
|
+
"aria-invalid": Boolean(picker.panel.errors.slug) || undefined,
|
|
152
|
+
"aria-describedby": picker.panel.errors.slug ? `${id}-slug-error` : undefined,
|
|
153
|
+
onChange: (event)=>picker.setSlug(event.currentTarget.value)
|
|
154
|
+
}),
|
|
155
|
+
picker.panel.errors.slug ? /*#__PURE__*/ _jsx("p", {
|
|
156
|
+
id: `${id}-slug-error`,
|
|
157
|
+
role: "alert",
|
|
158
|
+
children: picker.panel.errors.slug
|
|
159
|
+
}) : null
|
|
160
|
+
]
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}),
|
|
164
|
+
picker.panel.errors.general ? /*#__PURE__*/ _jsx("p", {
|
|
165
|
+
role: "alert",
|
|
166
|
+
children: picker.panel.errors.general
|
|
167
|
+
}) : null,
|
|
168
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
169
|
+
className: "xp-goal-field__actions",
|
|
170
|
+
children: [
|
|
171
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
172
|
+
type: "button",
|
|
173
|
+
margin: false,
|
|
174
|
+
buttonStyle: "primary",
|
|
175
|
+
disabled: picker.panel.pending || !picker.panel.name.trim(),
|
|
176
|
+
onClick: ()=>void picker.create(),
|
|
177
|
+
children: C.createGoal
|
|
178
|
+
}),
|
|
179
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
180
|
+
type: "button",
|
|
181
|
+
margin: false,
|
|
182
|
+
buttonStyle: "secondary",
|
|
183
|
+
disabled: picker.panel.pending,
|
|
184
|
+
onClick: picker.cancel,
|
|
185
|
+
children: C.cancel
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
]
|
|
190
|
+
}) : null
|
|
149
191
|
}) : null
|
|
150
192
|
]
|
|
151
193
|
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.xp-goal-field {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--xp-field-gap);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.xp-goal-field__row {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
align-items: end;
|
|
10
|
+
gap: var(--xp-space-2);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.xp-goal-field__select {
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
min-width: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.xp-goal-field__panel {
|
|
19
|
+
display: grid;
|
|
20
|
+
gap: var(--xp-field-gap);
|
|
21
|
+
border: 1px solid var(--xp-border);
|
|
22
|
+
border-radius: var(--xp-radius-control);
|
|
23
|
+
padding: var(--xp-space-4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.xp-goal-field p,
|
|
27
|
+
.xp-goal-field__panel > h3 {
|
|
28
|
+
margin: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.xp-goal-field__panel details[open] > summary {
|
|
32
|
+
margin-bottom: var(--xp-field-gap);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.xp-goal-field__actions {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
gap: var(--xp-space-2);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Payload halves the gap between fields below 768px; match it inside the field. */
|
|
42
|
+
@media (max-width: 768px) {
|
|
43
|
+
.xp-goal-field,
|
|
44
|
+
.xp-goal-field__panel {
|
|
45
|
+
gap: calc(var(--xp-field-gap) / 2);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -3,6 +3,7 @@ import type { ExperimentsPageCollection } from '../types/contracts.js';
|
|
|
3
3
|
export declare function serializePageCollections(collections: ExperimentsPageCollection[], req: PayloadRequest): {
|
|
4
4
|
copyUrl: string;
|
|
5
5
|
copyLabel: string;
|
|
6
|
+
copyEnabled?: true | undefined;
|
|
6
7
|
copyHint?: string | undefined;
|
|
7
8
|
slug: string;
|
|
8
9
|
label: string;
|
|
@@ -10,6 +10,9 @@ export function serializePageCollections(collections, req) {
|
|
|
10
10
|
...entry.copyHint ? {
|
|
11
11
|
copyHint: entry.copyHint
|
|
12
12
|
} : {},
|
|
13
|
+
...entry.copy ? {
|
|
14
|
+
copyEnabled: true
|
|
15
|
+
} : {},
|
|
13
16
|
copyUrl: entry.copyUrl ?? formatAdminURL({
|
|
14
17
|
adminRoute: req.payload.config.routes.admin,
|
|
15
18
|
path: `/collections/${entry.slug}`
|
package/dist/admin/paths.d.ts
CHANGED
|
@@ -14,3 +14,6 @@ export declare const XP_BLOCK_STATUS = "@delmaredigital/payload-experiments/admi
|
|
|
14
14
|
export declare const XP_BLOCK_ROW_LABEL = "@delmaredigital/payload-experiments/admin/client#BlockSlotRowLabel";
|
|
15
15
|
export declare const XP_COPY_ORIGINAL = "@delmaredigital/payload-experiments/admin/client#CopyOriginalField";
|
|
16
16
|
export declare const XP_GOAL_FIELD = "@delmaredigital/payload-experiments/admin/client#XpGoalField";
|
|
17
|
+
export declare const XP_TESTS_COLLECTION_LIST = "@delmaredigital/payload-experiments/admin/rsc#TestsCollectionListView";
|
|
18
|
+
export declare const XP_GOALS_COLLECTION_LIST = "@delmaredigital/payload-experiments/admin/rsc#GoalsCollectionListView";
|
|
19
|
+
export declare const XP_GOAL_EDIT_REDIRECT = "@delmaredigital/payload-experiments/admin/rsc#GoalEditRedirect";
|
package/dist/admin/paths.js
CHANGED
|
@@ -14,3 +14,6 @@ export const XP_BLOCK_STATUS = '@delmaredigital/payload-experiments/admin/client
|
|
|
14
14
|
export const XP_BLOCK_ROW_LABEL = '@delmaredigital/payload-experiments/admin/client#BlockSlotRowLabel';
|
|
15
15
|
export const XP_COPY_ORIGINAL = '@delmaredigital/payload-experiments/admin/client#CopyOriginalField';
|
|
16
16
|
export const XP_GOAL_FIELD = '@delmaredigital/payload-experiments/admin/client#XpGoalField';
|
|
17
|
+
export const XP_TESTS_COLLECTION_LIST = '@delmaredigital/payload-experiments/admin/rsc#TestsCollectionListView';
|
|
18
|
+
export const XP_GOALS_COLLECTION_LIST = '@delmaredigital/payload-experiments/admin/rsc#GoalsCollectionListView';
|
|
19
|
+
export const XP_GOAL_EDIT_REDIRECT = '@delmaredigital/payload-experiments/admin/rsc#GoalEditRedirect';
|
|
@@ -14,6 +14,6 @@ export function pageStatusCopy(test) {
|
|
|
14
14
|
case 'decided':
|
|
15
15
|
return `This page is ${test.armLabel} of a decided test; ${test.rollout ? `most visitors see ${winner}; a holdout still sees the Original` : `visitors see ${winner}`}.`;
|
|
16
16
|
case 'archived':
|
|
17
|
-
return test.winner ? `This page is also shown at the other versions' addresses because test ${test.name} made it the winner.
|
|
17
|
+
return test.winner ? `This page is also shown at the other versions' addresses because test ${test.name} made it the winner. Use "Release pages" on the test to free it.` : test.role === 'original' ? `This page's address now shows the winner of test ${test.name}. Use "Release pages" on the test to free it.` : `This page's address now shows ${winner}. Use "Release pages" on the test to show this page again.`;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DocId } from '../../types/contracts.js';
|
|
2
|
-
import type { SurfaceProps } from '
|
|
2
|
+
import type { SurfaceProps } from '../../testSurface/surface/contracts.js';
|
|
3
|
+
import '../../testSurface/surface/test/testPage.css';
|
|
3
4
|
export declare function ResultsRoute(props: {
|
|
4
5
|
id: DocId;
|
|
5
6
|
surface: SurfaceProps;
|