@delmaredigital/payload-experiments 0.2.0-rc.7 → 0.3.0-rc.4
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 +202 -26
- package/dist/admin/PreviewLinks.d.ts +2 -1
- package/dist/admin/PreviewLinks.js +50 -21
- package/dist/admin/TestsNavLink.d.ts +3 -1
- package/dist/admin/TestsNavLink.js +2 -2
- package/dist/admin/actions/ConfirmDialog.d.ts +7 -4
- package/dist/admin/actions/ConfirmDialog.js +37 -82
- package/dist/admin/actions/DecideDialog.d.ts +3 -1
- package/dist/admin/actions/DecideDialog.js +30 -13
- package/dist/admin/actions/MakeContentResult.d.ts +13 -2
- package/dist/admin/actions/MakeContentResult.js +115 -16
- package/dist/admin/actions/actions.model.d.ts +2 -4
- package/dist/admin/actions/actions.model.js +2 -3
- package/dist/admin/allocation.model.js +3 -5
- package/dist/admin/api.d.ts +10 -4
- package/dist/admin/api.js +11 -7
- package/dist/admin/armSelect/ArmSelectField.js +14 -22
- package/dist/admin/arms/arms.model.d.ts +1 -21
- package/dist/admin/arms/arms.model.js +1 -153
- package/dist/admin/copy/actions.d.ts +39 -3
- package/dist/admin/copy/actions.js +40 -4
- package/dist/admin/copy/armSelect.js +5 -5
- package/dist/admin/copy/arms.d.ts +1 -6
- package/dist/admin/copy/arms.js +1 -16
- package/dist/admin/copy/audience.d.ts +2 -1
- package/dist/admin/copy/audience.js +3 -2
- package/dist/admin/copy/common.d.ts +13 -6
- package/dist/admin/copy/common.js +14 -8
- package/dist/admin/copy/goals.d.ts +21 -6
- package/dist/admin/copy/goals.js +27 -6
- package/dist/admin/copy/readiness.d.ts +22 -0
- package/dist/admin/copy/readiness.js +21 -0
- package/dist/admin/copy/recommendation.d.ts +0 -3
- package/dist/admin/copy/recommendation.js +0 -3
- package/dist/admin/copy/results.d.ts +43 -2
- package/dist/admin/copy/results.js +44 -3
- package/dist/admin/copy/review.d.ts +2 -2
- package/dist/admin/copy/review.js +2 -2
- package/dist/admin/copy/setting.d.ts +2 -0
- package/dist/admin/copy/setting.js +2 -0
- package/dist/admin/copy/surface.d.ts +7 -5
- package/dist/admin/copy/surface.js +9 -5
- package/dist/admin/copy/testPage.d.ts +10 -0
- package/dist/admin/copy/testPage.js +10 -0
- package/dist/admin/format/date.d.ts +2 -0
- package/dist/admin/format/date.js +10 -0
- package/dist/admin/paths.d.ts +2 -1
- package/dist/admin/paths.js +2 -1
- package/dist/admin/previewLinks.model.d.ts +4 -2
- package/dist/admin/previewLinks.model.js +8 -7
- package/dist/admin/results/CiChart.js +11 -21
- package/dist/admin/results/DataQualityPanel.d.ts +4 -2
- package/dist/admin/results/DataQualityPanel.js +30 -17
- package/dist/admin/results/DataTable.d.ts +16 -0
- package/dist/admin/results/DataTable.js +152 -0
- package/dist/admin/results/StatTile.d.ts +7 -0
- package/dist/admin/results/StatTile.js +22 -0
- package/dist/admin/results/VerdictHero.d.ts +13 -0
- package/dist/admin/results/{VerdictCard.js → VerdictHero.js} +15 -12
- package/dist/admin/results/legacy.d.ts +16 -0
- package/dist/admin/results/legacy.js +27 -0
- package/dist/admin/results/releasePages.model.d.ts +17 -0
- package/dist/admin/results/releasePages.model.js +10 -0
- package/dist/admin/results/results.css +64 -0
- package/dist/admin/results/results.model.d.ts +11 -7
- package/dist/admin/results/results.model.js +24 -7
- package/dist/admin/results/snapshot.d.ts +14 -0
- package/dist/admin/results/snapshot.js +3 -0
- package/dist/admin/surface/ResultsRoute.d.ts +1 -1
- package/dist/admin/surface/ResultsRoute.js +59 -34
- package/dist/admin/surface/SurfaceShell.d.ts +11 -2
- package/dist/admin/surface/SurfaceShell.js +49 -14
- package/dist/admin/surface/TestsHome.d.ts +6 -1
- package/dist/admin/surface/TestsHome.js +182 -114
- package/dist/admin/surface/TestsSurface.js +56 -16
- package/dist/admin/surface/goals/GoalForm.js +341 -308
- package/dist/admin/surface/goals/GoalsList.js +123 -89
- package/dist/admin/surface/goals/data.d.ts +8 -2
- package/dist/admin/surface/goals/data.js +24 -16
- package/dist/admin/surface/goals/goals.css +10 -13
- package/dist/admin/surface/home.model.d.ts +8 -8
- package/dist/admin/surface/home.model.js +23 -12
- package/dist/admin/surface/newTest/NewTest.js +9 -9
- package/dist/admin/surface/pageBlock/parts.js +31 -26
- package/dist/admin/surface/readiness/ActionDialogs.js +47 -19
- package/dist/admin/surface/readiness/Banner.d.ts +3 -0
- package/dist/admin/surface/readiness/Banner.js +58 -33
- package/dist/admin/surface/readiness/SaveStatus.d.ts +1 -0
- package/dist/admin/surface/readiness/SaveStatus.js +6 -3
- package/dist/admin/surface/readiness/readiness.model.d.ts +2 -0
- package/dist/admin/surface/readiness/readiness.model.js +25 -9
- package/dist/admin/surface/readiness/useTransition.d.ts +1 -0
- package/dist/admin/surface/readiness/useTransition.js +2 -1
- package/dist/admin/surface/results/ReleasePages.d.ts +14 -0
- package/dist/admin/surface/results/ReleasePages.js +116 -0
- package/dist/admin/surface/results/ResultsBody.d.ts +11 -1
- package/dist/admin/surface/results/ResultsBody.js +277 -105
- package/dist/admin/surface/results/ResultsHeader.d.ts +10 -0
- package/dist/admin/surface/results/ResultsHeader.js +177 -0
- package/dist/admin/surface/results/recommendation.model.d.ts +3 -2
- package/dist/admin/surface/results/recommendation.model.js +12 -9
- package/dist/admin/surface/results/useResults.d.ts +21 -3
- package/dist/admin/surface/results/useResults.js +2 -1
- package/dist/admin/surface/setting/parts.js +75 -88
- package/dist/admin/surface/setting/setting.css +3 -15
- package/dist/admin/surface/surface.css +61 -47
- package/dist/admin/surface/test/AdvancedSection.js +55 -48
- package/dist/admin/surface/test/GoalSection.js +46 -47
- package/dist/admin/surface/test/LengthSection.js +46 -34
- package/dist/admin/surface/test/Rail.d.ts +4 -0
- package/dist/admin/surface/test/Rail.js +83 -0
- package/dist/admin/surface/test/ReadinessBar.d.ts +5 -0
- package/dist/admin/surface/test/ReadinessBar.js +33 -0
- package/dist/admin/surface/test/Section.d.ts +1 -1
- package/dist/admin/surface/test/Section.js +36 -16
- package/dist/admin/surface/test/TargetingSection.js +168 -142
- package/dist/admin/surface/test/TestPage.d.ts +2 -1
- package/dist/admin/surface/test/TestPage.js +146 -68
- package/dist/admin/surface/test/VersionsSection.js +151 -120
- package/dist/admin/surface/test/fields.d.ts +11 -4
- package/dist/admin/surface/test/fields.js +84 -85
- package/dist/admin/surface/test/jumpToSection.d.ts +3 -0
- package/dist/admin/surface/test/jumpToSection.js +10 -0
- package/dist/admin/surface/test/pageParts.js +9 -3
- package/dist/admin/surface/test/testPage.css +81 -14
- package/dist/admin/surface/test/testPage.model.d.ts +2 -3
- package/dist/admin/surface/test/testPage.model.js +1 -21
- package/dist/admin/surface/useTestDocument.js +12 -5
- package/dist/admin/targeting/targeting.model.d.ts +1 -3
- package/dist/admin/targeting/targeting.model.js +3 -8
- package/dist/admin/theme.css +115 -36
- package/dist/admin/theme.d.ts +38 -0
- package/dist/admin/theme.js +38 -1
- package/dist/admin/useApi.d.ts +17 -2
- package/dist/admin/useLayerUsage.js +14 -23
- package/dist/admin/views/ExperimentsRootView.js +12 -2
- package/dist/admin/views/TestsNavLinkServer.d.ts +2 -0
- package/dist/admin/views/TestsNavLinkServer.js +43 -0
- package/dist/arms/copy.d.ts +6 -0
- package/dist/arms/copy.js +16 -0
- package/dist/arms/model.d.ts +23 -0
- package/dist/arms/model.js +173 -0
- package/dist/collections/experiments/config.js +25 -0
- package/dist/collections/experiments/lockHook.js +3 -1
- package/dist/collections/identities.js +6 -1
- package/dist/collections/metrics.js +7 -0
- package/dist/collections/metricsGuards.d.ts +9 -0
- package/dist/collections/metricsGuards.js +33 -0
- package/dist/contentDone.d.ts +4 -0
- package/dist/contentDone.js +5 -0
- package/dist/db/appends.d.ts +6 -2
- package/dist/db/appends.js +10 -4
- package/dist/db/identities.d.ts +8 -7
- package/dist/db/identities.js +9 -6
- package/dist/db/locks.d.ts +6 -0
- package/dist/db/locks.js +13 -1
- package/dist/db/metricUsage.d.ts +19 -0
- package/dist/db/metricUsage.js +54 -0
- package/dist/db/names.d.ts +5 -0
- package/dist/db/names.js +5 -0
- package/dist/db/pageOccupancy.d.ts +12 -0
- package/dist/db/pageOccupancy.js +45 -0
- package/dist/db/publishedContent.d.ts +10 -0
- package/dist/db/publishedContent.js +43 -0
- package/dist/db/results.d.ts +2 -0
- package/dist/db/results.js +6 -2
- package/dist/db/snapshots.d.ts +18 -6
- package/dist/db/snapshots.js +25 -8
- package/dist/db/sweep.js +11 -6
- package/dist/endpoints/index.js +19 -1
- package/dist/endpoints/results.js +5 -0
- package/dist/endpoints/sanitizeReadinessDetail.d.ts +1 -0
- package/dist/endpoints/sanitizeReadinessDetail.js +2 -0
- package/dist/endpoints/summary.js +20 -2
- package/dist/endpoints/transitions.d.ts +15 -0
- package/dist/endpoints/transitions.js +36 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +28 -0
- package/dist/exports/adminRsc.d.ts +1 -0
- package/dist/exports/adminRsc.js +1 -0
- package/dist/exports/index.d.ts +2 -1
- package/dist/exports/index.js +1 -0
- package/dist/exports/puck.d.ts +2 -1
- package/dist/exports/puck.js +1 -1
- package/dist/exports/puckEditor.d.ts +4 -1
- package/dist/exports/puckEditor.js +3 -1
- package/dist/exports/rsc.d.ts +6 -1
- package/dist/exports/rsc.js +2 -0
- package/dist/hooks/pageGuard.d.ts +5 -0
- package/dist/hooks/pageGuard.js +139 -0
- package/dist/lib/fetchAllDocs.d.ts +16 -0
- package/dist/lib/fetchAllDocs.js +56 -0
- package/dist/log.js +6 -3
- package/dist/manifest/compile.d.ts +5 -0
- package/dist/manifest/compile.js +5 -1
- package/dist/options.js +16 -0
- package/dist/plugin.js +30 -2
- package/dist/puck/ExperimentPicker.js +47 -16
- package/dist/puck/ExperimentSlot.d.ts +51 -1
- package/dist/puck/ExperimentSlot.js +23 -12
- package/dist/puck/copy.d.ts +6 -5
- package/dist/puck/copy.js +6 -5
- package/dist/puck/editor/CreateExperimentDrawer.js +46 -56
- package/dist/puck/editor/ExperimentSlotEditor.d.ts +52 -1
- package/dist/puck/editor/ExperimentSlotEditor.js +292 -137
- package/dist/puck/editor/ResultsReadout.d.ts +6 -0
- package/dist/puck/editor/ResultsReadout.js +99 -0
- package/dist/puck/editor/VersionBuilder.d.ts +34 -0
- package/dist/puck/editor/VersionBuilder.js +317 -0
- package/dist/puck/editor/armWrites.d.ts +7 -0
- package/dist/puck/editor/armWrites.js +71 -0
- package/dist/puck/editor/armsCache.d.ts +14 -0
- package/dist/puck/editor/armsCache.js +78 -0
- package/dist/puck/editor/copy.d.ts +33 -1
- package/dist/puck/editor/copy.js +45 -8
- package/dist/puck/editor/createTest.d.ts +1 -1
- package/dist/puck/editor/createTest.js +25 -14
- package/dist/puck/editor/editor.chrome.css +121 -0
- package/dist/puck/editor/editor.css +288 -204
- package/dist/puck/editor/editor.model.d.ts +4 -1
- package/dist/puck/editor/editor.model.js +10 -7
- package/dist/puck/editor/experimentOutlinePlugin.d.ts +3 -0
- package/dist/puck/editor/experimentOutlinePlugin.js +89 -0
- package/dist/puck/experimentSlotField.d.ts +2 -0
- package/dist/puck/experimentSlotField.js +11 -3
- package/dist/puck/hostContext.d.ts +10 -0
- package/dist/puck/hostContext.js +12 -0
- package/dist/puck/routes.d.ts +12 -0
- package/dist/puck/routes.js +11 -0
- package/dist/puck/slotConfig.d.ts +1 -1
- package/dist/puck/slotConfig.js +2 -2
- package/dist/results/aggregate.js +4 -3
- package/dist/results/analyse.d.ts +4 -1
- package/dist/results/analyse.js +27 -11
- package/dist/results/cuped.js +3 -2
- package/dist/results/identityCredit.d.ts +15 -7
- package/dist/results/identityCredit.js +32 -33
- package/dist/results/rolloutUnits.js +2 -1
- package/dist/results/snapshot.js +8 -2
- package/dist/results/srm.js +2 -1
- package/dist/sanitizeReadinessDetail.d.ts +7 -0
- package/dist/sanitizeReadinessDetail.js +63 -0
- package/dist/server/linkIdentity.d.ts +10 -1
- package/dist/server/linkIdentity.js +17 -15
- package/dist/server/metadata.d.ts +5 -0
- package/dist/server/metadata.js +18 -3
- package/dist/server/normaliseContentRelationships.d.ts +7 -0
- package/dist/server/normaliseContentRelationships.js +62 -0
- package/dist/server/recordContentChange.d.ts +1 -1
- package/dist/server/recordContentChange.js +17 -8
- package/dist/server/runResults.d.ts +3 -2
- package/dist/server/runResults.js +157 -35
- package/dist/targeting/values.d.ts +4 -0
- package/dist/targeting/values.js +10 -0
- package/dist/transitions/addMetric.js +8 -0
- package/dist/transitions/archive.js +2 -3
- package/dist/transitions/checkStart.d.ts +10 -3
- package/dist/transitions/checkStart.js +25 -0
- package/dist/transitions/contentFields.d.ts +7 -0
- package/dist/transitions/contentFields.js +20 -0
- package/dist/transitions/decide.js +22 -2
- package/dist/transitions/dismissContentEntry.d.ts +8 -0
- package/dist/transitions/dismissContentEntry.js +45 -0
- package/dist/transitions/makeContent.d.ts +5 -2
- package/dist/transitions/makeContent.js +217 -118
- package/dist/transitions/phaseRecord.d.ts +8 -2
- package/dist/transitions/placements.d.ts +3 -6
- package/dist/transitions/placements.js +12 -1
- package/dist/transitions/preflightData.d.ts +9 -1
- package/dist/transitions/preflightData.js +138 -20
- package/dist/transitions/releasePages.d.ts +8 -0
- package/dist/transitions/releasePages.js +26 -0
- package/dist/transitions/restoreContentEntry.d.ts +8 -0
- package/dist/transitions/restoreContentEntry.js +47 -0
- package/dist/transitions/start.js +62 -7
- package/dist/types/contracts.d.ts +24 -4
- package/dist/types/endpoints.d.ts +34 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/reasons.d.ts +3 -0
- package/dist/types/reasons.js +1 -0
- package/dist/types/snapshot.d.ts +6 -1
- package/dist/ui/Banner.d.ts +2 -0
- package/dist/ui/Banner.js +2 -0
- package/dist/ui/Breadcrumb.d.ts +7 -0
- package/dist/ui/Breadcrumb.js +25 -0
- package/dist/ui/Button.d.ts +15 -0
- package/dist/ui/Button.js +32 -0
- package/dist/ui/Card.d.ts +12 -0
- package/dist/ui/Card.js +40 -0
- package/dist/ui/Checkbox.d.ts +2 -0
- package/dist/ui/Checkbox.js +2 -0
- package/dist/{admin/components → ui}/ChipsInput.d.ts +4 -3
- package/dist/{admin/components → ui}/ChipsInput.js +20 -12
- package/dist/ui/Dialog.d.ts +13 -0
- package/dist/ui/Dialog.js +85 -0
- package/dist/ui/EmptyState.d.ts +2 -0
- package/dist/ui/EmptyState.js +2 -0
- package/dist/ui/Feedback.d.ts +24 -0
- package/dist/ui/Feedback.js +40 -0
- package/dist/ui/Inputs.d.ts +34 -0
- package/dist/ui/Inputs.js +225 -0
- package/dist/ui/NumberInput.d.ts +2 -0
- package/dist/ui/NumberInput.js +2 -0
- package/dist/ui/Range.d.ts +2 -0
- package/dist/ui/Range.js +2 -0
- package/dist/ui/SearchInput.d.ts +2 -0
- package/dist/ui/SearchInput.js +2 -0
- package/dist/ui/SectionCard.d.ts +2 -0
- package/dist/ui/SectionCard.js +2 -0
- package/dist/ui/Select.d.ts +2 -0
- package/dist/ui/Select.js +2 -0
- package/dist/ui/StatusChip.d.ts +2 -0
- package/dist/ui/StatusChip.js +2 -0
- package/dist/ui/Tabs.d.ts +16 -0
- package/dist/ui/Tabs.js +61 -0
- package/dist/ui/TextInput.d.ts +2 -0
- package/dist/ui/TextInput.js +2 -0
- package/dist/ui/Textarea.d.ts +2 -0
- package/dist/ui/Textarea.js +2 -0
- package/dist/ui/Toggle.d.ts +2 -0
- package/dist/ui/Toggle.js +2 -0
- package/dist/ui/accent.d.ts +40 -0
- package/dist/ui/accent.js +139 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.js +9 -0
- package/dist/ui/ui.css +92 -0
- package/package.json +5 -2
- package/dist/admin/components/chipsInput.css +0 -11
- package/dist/admin/results/ArmTable.d.ts +0 -8
- package/dist/admin/results/ArmTable.js +0 -113
- package/dist/admin/results/VerdictCard.d.ts +0 -9
- package/dist/admin/surface/goals/GoalsBreadcrumb.d.ts +0 -5
- package/dist/admin/surface/goals/GoalsBreadcrumb.js +0 -47
- package/dist/admin/surface/test/TestHeader.d.ts +0 -4
- package/dist/admin/surface/test/TestHeader.js +0 -70
package/dist/admin/copy/goals.js
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
export const GOALS_COPY = {
|
|
2
2
|
title: 'Goals',
|
|
3
|
+
goal: 'Goal',
|
|
3
4
|
newGoal: 'New goal',
|
|
4
5
|
name: 'Name',
|
|
5
6
|
source: 'Measured by',
|
|
6
7
|
directionColumn: 'Better when',
|
|
7
8
|
direction: 'Better when it goes',
|
|
8
|
-
increase: '
|
|
9
|
-
decrease: '
|
|
9
|
+
increase: 'More is better',
|
|
10
|
+
decrease: 'Less is better',
|
|
10
11
|
usedBy: 'Used by',
|
|
11
12
|
status: 'Status',
|
|
12
13
|
inUse: 'In use',
|
|
13
|
-
unused: 'Not used',
|
|
14
|
-
empty: 'A goal is
|
|
14
|
+
unused: 'Not used yet',
|
|
15
|
+
empty: 'No goals yet. A goal is what a test tries to improve.',
|
|
15
16
|
loading: 'Loading goals…',
|
|
16
17
|
loadError: "Couldn't load goals. Try again.",
|
|
17
18
|
retry: 'Try again',
|
|
18
19
|
slug: 'Short name',
|
|
19
20
|
slugHelp: 'A unique short name for this goal.',
|
|
20
21
|
slugLocked: 'The short name stays the same once a test uses this goal.',
|
|
22
|
+
sourceLocked: 'What this goal measures stays the same once a test uses it.',
|
|
21
23
|
chooseSource: 'Choose an outcome',
|
|
22
24
|
window: 'Count results for (hours)',
|
|
23
25
|
minimum: 'Minimum completions before deciding',
|
|
@@ -33,14 +35,33 @@ export const GOALS_COPY = {
|
|
|
33
35
|
save: 'Save',
|
|
34
36
|
saving: 'Saving…',
|
|
35
37
|
cancel: 'Cancel',
|
|
36
|
-
remove: 'Delete',
|
|
38
|
+
remove: 'Delete goal',
|
|
37
39
|
thresholdError: 'Enter a percentage of zero or more, or leave blank for 5%.',
|
|
38
40
|
deleting: 'Deleting…',
|
|
39
41
|
saveError: "Couldn't save the goal. Try again.",
|
|
40
42
|
deleteError: "Couldn't delete the goal. Try again.",
|
|
41
43
|
breadcrumb: 'Breadcrumb',
|
|
42
|
-
missing: 'This goal
|
|
44
|
+
missing: 'This goal no longer exists.',
|
|
45
|
+
notFound: 'This goal no longer exists.',
|
|
46
|
+
backToTest: 'Back to the test',
|
|
47
|
+
useGoal: 'Use this goal',
|
|
48
|
+
open: 'Open',
|
|
49
|
+
search: 'Search goals',
|
|
50
|
+
clearSearch: 'Clear search',
|
|
51
|
+
fields: 'Goal details',
|
|
52
|
+
deleteTitle: 'Delete this goal?',
|
|
53
|
+
deleteBody: 'This cannot be undone.',
|
|
54
|
+
confirmDelete: 'Delete'
|
|
43
55
|
};
|
|
44
56
|
export function goalUsedBy(count) {
|
|
45
57
|
return `Used by ${count} ${count === 1 ? 'test' : 'tests'}`;
|
|
46
58
|
}
|
|
59
|
+
export function goalInUse(count) {
|
|
60
|
+
return `In use by ${count} ${count === 1 ? 'test' : 'tests'}`;
|
|
61
|
+
}
|
|
62
|
+
export function goalDeleteLocked(count) {
|
|
63
|
+
return `${goalUsedBy(count)}. Remove it from those tests first.`;
|
|
64
|
+
}
|
|
65
|
+
export function goalsNoMatches(search) {
|
|
66
|
+
return `No goals match “${search}”.`;
|
|
67
|
+
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
export declare const PLACEMENT_FAILURE_COPY: {
|
|
2
|
+
readonly 'placements-failed': "Couldn't check where this test is used. Try again.";
|
|
3
|
+
readonly forbidden: "You don't have permission to check where this test is used.";
|
|
4
|
+
readonly 'not-found': "A page used by this test no longer exists. Choose another page.";
|
|
5
|
+
};
|
|
1
6
|
export declare const READINESS_COPY: {
|
|
7
|
+
readonly label: "Readiness";
|
|
8
|
+
readonly addGoal: "Add a goal";
|
|
9
|
+
readonly needsAttention: "Needs attention";
|
|
10
|
+
readonly missingVersions: "This test is missing its saved versions. Open the test and check its setup before changing this page.";
|
|
2
11
|
readonly ready: "Ready to start.";
|
|
3
12
|
readonly saveFirst: "Save your changes first.";
|
|
4
13
|
readonly saving: "Saving…";
|
|
@@ -24,14 +33,23 @@ export declare const READINESS_COPY: {
|
|
|
24
33
|
readonly noReach: "Enter how many people reach this per day.";
|
|
25
34
|
readonly full: "This test's group is full. Lower how many people take part, or create the test again without the group.";
|
|
26
35
|
readonly differentPeople: "This test's group counts different people. Create the test again without the group.";
|
|
36
|
+
readonly uncheckedPages: "Version pages aren't checked; make sure each one is published.";
|
|
37
|
+
readonly chooseDifferentPage: "Choose a different page";
|
|
27
38
|
readonly noTargets: "Add a page address for each version.";
|
|
28
39
|
readonly pageVisitors: "Whole-page tests count visitors. Create the test again counting visitors.";
|
|
40
|
+
readonly blockPathRule: "Remove the page-path rule in Who takes part; page block tests run on their page.";
|
|
41
|
+
readonly removeRule: "Remove rule";
|
|
29
42
|
readonly ruleFallback: "check the value";
|
|
30
43
|
readonly versionFallback: "check the group settings";
|
|
31
44
|
readonly groupFallback: "each version";
|
|
32
45
|
readonly parameterFallback: "each setting";
|
|
33
46
|
readonly attributeFallback: "this attribute";
|
|
34
47
|
};
|
|
48
|
+
export declare const unsupportedContentCopy: (page: string) => string;
|
|
49
|
+
export declare const pageInUseCopy: (path: string) => string;
|
|
50
|
+
export declare const unpublishedPageCopy: (path: string) => string;
|
|
51
|
+
/** Old responses may include raw host errors; unknown strings use authored copy. */
|
|
52
|
+
export declare const placementFailureCopy: (reason: unknown) => "Couldn't check where this test is used. Try again." | "You don't have permission to check where this test is used." | "A page used by this test no longer exists. Choose another page.";
|
|
35
53
|
export declare const nextCopy: (sentence: string) => string;
|
|
36
54
|
export declare const versionsNext: (detail: string) => string;
|
|
37
55
|
export declare const contentNext: (group: string) => string;
|
|
@@ -43,3 +61,7 @@ export declare const attributeNext: (attribute: string) => string;
|
|
|
43
61
|
export declare const stoppedCopy: (date: string | null) => string;
|
|
44
62
|
export declare const decidedCopy: (date: string | null, winner: string) => string;
|
|
45
63
|
export declare const runningCopy: (date: string | null, people: number | null, days: number | null) => string;
|
|
64
|
+
/** After archive the guard protects the winner and the Original; only the winner page is "the winner". */
|
|
65
|
+
export declare const pageGuardCopy: (name: string, status: "running" | "decided" | "archived", role?: "winner" | "original") => string;
|
|
66
|
+
export declare const versionPageUnavailableCopy: (path: string, status?: string) => string;
|
|
67
|
+
export declare const versionPageUncheckedCopy: (path: string, status?: string) => string;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
export const PLACEMENT_FAILURE_COPY = {
|
|
2
|
+
'placements-failed': "Couldn't check where this test is used. Try again.",
|
|
3
|
+
forbidden: "You don't have permission to check where this test is used.",
|
|
4
|
+
'not-found': "A page used by this test no longer exists. Choose another page."
|
|
5
|
+
};
|
|
1
6
|
export const READINESS_COPY = {
|
|
7
|
+
label: 'Readiness',
|
|
8
|
+
addGoal: 'Add a goal',
|
|
9
|
+
needsAttention: 'Needs attention',
|
|
10
|
+
missingVersions: 'This test is missing its saved versions. Open the test and check its setup before changing this page.',
|
|
2
11
|
ready: 'Ready to start.',
|
|
3
12
|
saveFirst: 'Save your changes first.',
|
|
4
13
|
saving: 'Saving…',
|
|
@@ -24,14 +33,23 @@ export const READINESS_COPY = {
|
|
|
24
33
|
noReach: 'Enter how many people reach this per day.',
|
|
25
34
|
full: "This test's group is full. Lower how many people take part, or create the test again without the group.",
|
|
26
35
|
differentPeople: "This test's group counts different people. Create the test again without the group.",
|
|
36
|
+
uncheckedPages: "Version pages aren't checked; make sure each one is published.",
|
|
37
|
+
chooseDifferentPage: 'Choose a different page',
|
|
27
38
|
noTargets: 'Add a page address for each version.',
|
|
28
39
|
pageVisitors: 'Whole-page tests count visitors. Create the test again counting visitors.',
|
|
40
|
+
blockPathRule: 'Remove the page-path rule in Who takes part; page block tests run on their page.',
|
|
41
|
+
// Next steps repeat the button label verbatim (testPage.ts removeRule).
|
|
42
|
+
removeRule: 'Remove rule',
|
|
29
43
|
ruleFallback: 'check the value',
|
|
30
44
|
versionFallback: 'check the group settings',
|
|
31
45
|
groupFallback: 'each version',
|
|
32
46
|
parameterFallback: 'each setting',
|
|
33
47
|
attributeFallback: 'this attribute'
|
|
34
48
|
};
|
|
49
|
+
export const unsupportedContentCopy = (page)=>`${page} has more than one language, so Make it the content isn't available for it; you'll copy the winning version by hand.`;
|
|
50
|
+
export const pageInUseCopy = (path)=>`Another running or decided test already uses ${path}. Choose a different page, or finish that test first.`;
|
|
51
|
+
export const unpublishedPageCopy = (path)=>`${path} isn't a published page. Publish it, or pick another page.`;
|
|
52
|
+
/** Old responses may include raw host errors; unknown strings use authored copy. */ export const placementFailureCopy = (reason)=>PLACEMENT_FAILURE_COPY[typeof reason === 'string' && Object.hasOwn(PLACEMENT_FAILURE_COPY, reason) ? reason : 'placements-failed'];
|
|
35
53
|
const withoutPeriod = (value)=>value.trim().replace(/[.!?]+$/, '');
|
|
36
54
|
export const nextCopy = (sentence)=>`Next: ${sentence}`;
|
|
37
55
|
export const versionsNext = (detail)=>`Fix the versions: ${withoutPeriod(detail)}.`;
|
|
@@ -48,3 +66,6 @@ export const runningCopy = (date, people, days)=>[
|
|
|
48
66
|
people === null ? null : `${people.toLocaleString('en-US')} people so far`,
|
|
49
67
|
days === null ? null : `about ${days} days to go`
|
|
50
68
|
].filter(Boolean).join(' · ');
|
|
69
|
+
/** After archive the guard protects the winner and the Original; only the winner page is "the winner". */ export const pageGuardCopy = (name, status, role = 'winner')=>status === 'archived' ? role === 'original' ? `This page's address now shows the winner of the finished test "${name}". To free it, open the test and choose "Release pages".` : `This page is shown at other addresses because the finished test "${name}" made it the winner. To free it, open the test and choose "Release pages".` : status === 'decided' ? `This page is part of the decided test "${name}". Choose "Make it the content" or "Discard winner" on the test before you delete, rename or unpublish it.` : `This page is part of the running test "${name}". Stop the test before you delete, rename or unpublish it.`;
|
|
70
|
+
export const versionPageUnavailableCopy = (path, status = 'running')=>`${path} isn't published, so visitors assigned to it see an error. Republish it, or ${status === 'decided' ? 'discard the winner' : 'stop the test'}.`;
|
|
71
|
+
export const versionPageUncheckedCopy = (path, status = 'running')=>`Couldn't check whether ${path} is published. Check that it is still published, or ${status === 'decided' ? 'discard the winner' : 'stop the test'}.`;
|
|
@@ -19,8 +19,5 @@ export declare const mixedRecommendation: (better: string, worse: string) => str
|
|
|
19
19
|
export declare const runningRecommendation: (date: string) => string;
|
|
20
20
|
export declare const rolloutCollectingRecommendation: (winner: string) => string;
|
|
21
21
|
export declare const rolloutReadoutRecommendation: (winner: string, lift: string) => string;
|
|
22
|
-
export declare const RESULTS_SURFACE_COPY: {
|
|
23
|
-
readonly missing: "This test couldn't be found.";
|
|
24
|
-
};
|
|
25
22
|
/** Matches the stored server finding; it is not a new statistical decision. */
|
|
26
23
|
export declare const storedGuardrailFinding: (group: string, guardrail: string) => string;
|
|
@@ -19,7 +19,4 @@ export const mixedRecommendation = (better, worse)=>`Mixed: ${better} does bette
|
|
|
19
19
|
export const runningRecommendation = (date)=>`No difference so far. Keep running until ${date}.`;
|
|
20
20
|
export const rolloutCollectingRecommendation = (winner)=>`Since shipping ${winner}: still collecting data.`;
|
|
21
21
|
export const rolloutReadoutRecommendation = (winner, lift)=>`Since shipping ${winner}: ${lift} compared with the holdout.`;
|
|
22
|
-
export const RESULTS_SURFACE_COPY = {
|
|
23
|
-
missing: "This test couldn't be found."
|
|
24
|
-
};
|
|
25
22
|
/** Matches the stored server finding; it is not a new statistical decision. */ export const storedGuardrailFinding = (group, guardrail)=>`Stop: ${group} harms ${guardrail}.`;
|
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
export declare const RESULTS_COPY: {
|
|
2
|
+
readonly chooseGroup: "Choose a group";
|
|
3
|
+
readonly tests: "Tests";
|
|
4
|
+
readonly results: "Results";
|
|
5
|
+
readonly test: "Test";
|
|
6
|
+
readonly backToSetup: "Back to setup";
|
|
7
|
+
readonly days: "Days";
|
|
8
|
+
readonly methods: {
|
|
9
|
+
readonly sequential: "Sequential";
|
|
10
|
+
readonly bayesian: "Bayesian";
|
|
11
|
+
};
|
|
12
|
+
readonly asOfDecision: (date: string) => string;
|
|
13
|
+
readonly kinds: {
|
|
14
|
+
readonly binomial: "yes/no";
|
|
15
|
+
readonly count: "amount";
|
|
16
|
+
readonly revenue: "amount";
|
|
17
|
+
};
|
|
18
|
+
readonly qualityStates: {
|
|
19
|
+
readonly ok: "OK";
|
|
20
|
+
readonly watch: "Watch";
|
|
21
|
+
readonly problem: "Problem";
|
|
22
|
+
};
|
|
23
|
+
readonly qualityOK: "No data quality problems found.";
|
|
24
|
+
readonly previews: "Preview links";
|
|
25
|
+
readonly releasePages: "Release pages";
|
|
26
|
+
readonly releasePagesBody: "Every address shows its own page again. The result stays recorded.";
|
|
27
|
+
readonly you: "you";
|
|
2
28
|
readonly group: "Group";
|
|
3
29
|
readonly people: "People";
|
|
4
30
|
readonly conversions: "Conversions";
|
|
5
|
-
readonly
|
|
31
|
+
readonly average: "Average";
|
|
32
|
+
readonly rate: "Rate";
|
|
6
33
|
readonly lift: "Lift";
|
|
7
34
|
readonly ci: "Confidence interval";
|
|
8
35
|
readonly adjustedCI: "Adjusted confidence interval";
|
|
@@ -30,6 +57,8 @@ export declare const RESULTS_COPY: {
|
|
|
30
57
|
readonly infeasible: "A clear answer would take more than 90 days at this traffic.";
|
|
31
58
|
readonly noCap: "Not capped: fewer than 20 people had this outcome in the 90 days before Start, so every value counts in full.";
|
|
32
59
|
readonly quality: "Data quality";
|
|
60
|
+
readonly missingWinner: "The stored winner is missing from this round’s results.";
|
|
61
|
+
readonly missingWinnerNext: "Recompute; if it persists, contact a developer before trusting these results.";
|
|
33
62
|
readonly srm: "Traffic isn't splitting as set. Check for caching or a page placed twice.";
|
|
34
63
|
readonly multiGroup: "People who saw more than one group were excluded.";
|
|
35
64
|
readonly multiGroupNext: "Check for caching or a page placed twice before trusting the results.";
|
|
@@ -40,7 +69,17 @@ export declare const RESULTS_COPY: {
|
|
|
40
69
|
readonly tooFew: "Too few people have seen the compared groups.";
|
|
41
70
|
readonly tooFewNext: "Keep collecting results until each compared group reaches the planned minimum.";
|
|
42
71
|
readonly layerFull: "The layer has fewer slices reserved than the requested allocation.";
|
|
43
|
-
readonly layerNext: "Free slices in the layer, then
|
|
72
|
+
readonly layerNext: "Free slices in the layer, then use \"Let more people in\".";
|
|
73
|
+
readonly unavailable: {
|
|
74
|
+
'source-failed': string;
|
|
75
|
+
'source-unavailable': string;
|
|
76
|
+
'unit-type-unavailable': string;
|
|
77
|
+
'non-finite-values': string;
|
|
78
|
+
'non-finite-covariates': string;
|
|
79
|
+
budget: string;
|
|
80
|
+
'not-supplied': string;
|
|
81
|
+
'analysis-failed': string;
|
|
82
|
+
};
|
|
44
83
|
readonly unavailableNext: "Recompute; if it persists, contact a developer.";
|
|
45
84
|
readonly loading: "Loading results…";
|
|
46
85
|
readonly refreshing: "Refreshing…";
|
|
@@ -57,6 +96,7 @@ export declare const RESULTS_COPY: {
|
|
|
57
96
|
readonly chart: "Confidence interval over time";
|
|
58
97
|
readonly noHistory: "Not enough history yet.";
|
|
59
98
|
};
|
|
99
|
+
export declare const pagesReleasedCopy: (date: string, name?: string) => string;
|
|
60
100
|
export declare const roundLabel: (round: number, kind: string) => string;
|
|
61
101
|
export declare const decidedTitle: (winner: string) => string;
|
|
62
102
|
export declare const shippingTitle: (winner: string) => string;
|
|
@@ -75,3 +115,4 @@ export declare const conflictCopy: (share: string) => string;
|
|
|
75
115
|
export declare const metricUnavailable: (name: string, reason: string) => string;
|
|
76
116
|
export declare const chartSummary: (metric: string, groups: string, from: string, to: string, changes?: string[]) => string;
|
|
77
117
|
export declare const contentChangeTitle: (date: string) => string;
|
|
118
|
+
export declare const daysOfPlan: (days: string, planned: string) => string;
|
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
export const RESULTS_COPY = {
|
|
2
|
+
chooseGroup: 'Choose a group',
|
|
3
|
+
tests: 'Tests',
|
|
4
|
+
results: 'Results',
|
|
5
|
+
test: 'Test',
|
|
6
|
+
backToSetup: 'Back to setup',
|
|
7
|
+
days: 'Days',
|
|
8
|
+
methods: {
|
|
9
|
+
sequential: 'Sequential',
|
|
10
|
+
bayesian: 'Bayesian'
|
|
11
|
+
},
|
|
12
|
+
asOfDecision: (date)=>`numbers from ${date}, used for the decision`,
|
|
13
|
+
kinds: {
|
|
14
|
+
binomial: 'yes/no',
|
|
15
|
+
count: 'amount',
|
|
16
|
+
revenue: 'amount'
|
|
17
|
+
},
|
|
18
|
+
qualityStates: {
|
|
19
|
+
ok: 'OK',
|
|
20
|
+
watch: 'Watch',
|
|
21
|
+
problem: 'Problem'
|
|
22
|
+
},
|
|
23
|
+
qualityOK: 'No data quality problems found.',
|
|
24
|
+
previews: 'Preview links',
|
|
25
|
+
releasePages: 'Release pages',
|
|
26
|
+
releasePagesBody: 'Every address shows its own page again. The result stays recorded.',
|
|
27
|
+
you: 'you',
|
|
2
28
|
group: 'Group',
|
|
3
29
|
people: 'People',
|
|
4
30
|
conversions: 'Conversions',
|
|
5
|
-
|
|
31
|
+
average: 'Average',
|
|
32
|
+
rate: 'Rate',
|
|
6
33
|
lift: 'Lift',
|
|
7
34
|
ci: 'Confidence interval',
|
|
8
35
|
adjustedCI: 'Adjusted confidence interval',
|
|
@@ -30,6 +57,8 @@ export const RESULTS_COPY = {
|
|
|
30
57
|
infeasible: 'A clear answer would take more than 90 days at this traffic.',
|
|
31
58
|
noCap: 'Not capped: fewer than 20 people had this outcome in the 90 days before Start, so every value counts in full.',
|
|
32
59
|
quality: 'Data quality',
|
|
60
|
+
missingWinner: 'The stored winner is missing from this round’s results.',
|
|
61
|
+
missingWinnerNext: 'Recompute; if it persists, contact a developer before trusting these results.',
|
|
33
62
|
srm: "Traffic isn't splitting as set. Check for caching or a page placed twice.",
|
|
34
63
|
multiGroup: 'People who saw more than one group were excluded.',
|
|
35
64
|
multiGroupNext: 'Check for caching or a page placed twice before trusting the results.',
|
|
@@ -40,7 +69,17 @@ export const RESULTS_COPY = {
|
|
|
40
69
|
tooFew: 'Too few people have seen the compared groups.',
|
|
41
70
|
tooFewNext: 'Keep collecting results until each compared group reaches the planned minimum.',
|
|
42
71
|
layerFull: 'The layer has fewer slices reserved than the requested allocation.',
|
|
43
|
-
layerNext: 'Free slices in the layer, then
|
|
72
|
+
layerNext: 'Free slices in the layer, then use "Let more people in".',
|
|
73
|
+
unavailable: {
|
|
74
|
+
'source-failed': "couldn't be read this time; the next results run will try again.",
|
|
75
|
+
'source-unavailable': "can't be read because its data source is no longer available. Ask a developer to check this goal.",
|
|
76
|
+
'unit-type-unavailable': "can't be read for the people counted in this test. Ask a developer to check this goal.",
|
|
77
|
+
'non-finite-values': "has values that can't be used. Ask a developer to check this goal's data.",
|
|
78
|
+
'non-finite-covariates': "has earlier values that can't be used. Ask a developer to check this goal's data.",
|
|
79
|
+
budget: "couldn't finish in time; the next results run will try again.",
|
|
80
|
+
'not-supplied': "has no data for this results run; the next results run will try again.",
|
|
81
|
+
'analysis-failed': "couldn't be calculated this time; the next results run will try again."
|
|
82
|
+
},
|
|
44
83
|
unavailableNext: 'Recompute; if it persists, contact a developer.',
|
|
45
84
|
loading: 'Loading results…',
|
|
46
85
|
refreshing: 'Refreshing…',
|
|
@@ -57,6 +96,7 @@ export const RESULTS_COPY = {
|
|
|
57
96
|
chart: 'Confidence interval over time',
|
|
58
97
|
noHistory: 'Not enough history yet.'
|
|
59
98
|
};
|
|
99
|
+
export const pagesReleasedCopy = (date, name)=>`Pages released ${date}${name ? ` by ${name}` : ''}`;
|
|
60
100
|
export const roundLabel = (round, kind)=>`Round ${round} · ${kind}`;
|
|
61
101
|
export const decidedTitle = (winner)=>`Decided: ${winner}`;
|
|
62
102
|
export const shippingTitle = (winner)=>`Since shipping ${winner}`;
|
|
@@ -72,9 +112,10 @@ export const shareCopy = (label, expected, observed)=>`${label}: expected ${expe
|
|
|
72
112
|
export const exclusionCopy = (count, share)=>`${count} excluded (${share}).`;
|
|
73
113
|
export const ignoredCopy = (count)=>`${count} ignored.`;
|
|
74
114
|
export const conflictCopy = (share)=>`${share} with identity conflicts.`;
|
|
75
|
-
export const metricUnavailable = (name, reason)=>`${name}
|
|
115
|
+
export const metricUnavailable = (name, reason)=>`${name} ${RESULTS_COPY.unavailable[Object.hasOwn(RESULTS_COPY.unavailable, reason) ? reason : 'source-failed']}`;
|
|
76
116
|
export const chartSummary = (metric, groups, from, to, changes = [])=>`${metric}: lift and confidence intervals for ${groups}, ${from} to ${to}.${changes.length ? ` Content changed on ${new Intl.ListFormat('en-US', {
|
|
77
117
|
style: 'long',
|
|
78
118
|
type: 'conjunction'
|
|
79
119
|
}).format(changes)}.` : ''}`;
|
|
80
120
|
export const contentChangeTitle = (date)=>`Content changed ${date} by an editor`;
|
|
121
|
+
export const daysOfPlan = (days, planned)=>`${days} of ${planned}`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const REVIEW_COPY: {
|
|
2
2
|
readonly noBaseline: "No data yet for this metric.";
|
|
3
3
|
readonly preview: "Preview";
|
|
4
|
+
readonly previewBlocked: "Your browser blocked the preview window. Allow pop-ups for this site, then try again.";
|
|
4
5
|
readonly placedTimes: (n: number) => string;
|
|
5
|
-
readonly noPreview: "Preview isn't set up for this page type";
|
|
6
6
|
readonly raise: "Raise allocation";
|
|
7
7
|
readonly addMetric: "Add a metric";
|
|
8
8
|
readonly allocationBody: "Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.";
|
|
@@ -13,5 +13,5 @@ export declare const REVIEW_COPY: {
|
|
|
13
13
|
readonly metric: "Metric";
|
|
14
14
|
readonly chooseMetric: "Choose a metric";
|
|
15
15
|
readonly loadingMetrics: "Loading metrics…";
|
|
16
|
-
readonly noMetrics: "All available
|
|
16
|
+
readonly noMetrics: "All available goals are already on this test.";
|
|
17
17
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const REVIEW_COPY = {
|
|
2
2
|
noBaseline: 'No data yet for this metric.',
|
|
3
3
|
preview: 'Preview',
|
|
4
|
+
previewBlocked: 'Your browser blocked the preview window. Allow pop-ups for this site, then try again.',
|
|
4
5
|
placedTimes: (n)=>`(placed ${n} times on this page)`,
|
|
5
|
-
noPreview: "Preview isn't set up for this page type",
|
|
6
6
|
raise: 'Raise allocation',
|
|
7
7
|
addMetric: 'Add a metric',
|
|
8
8
|
allocationBody: 'Raising allocation adds people; nobody already taking part changes group. Lowering needs a new round.',
|
|
@@ -13,5 +13,5 @@ export const REVIEW_COPY = {
|
|
|
13
13
|
metric: 'Metric',
|
|
14
14
|
chooseMetric: 'Choose a metric',
|
|
15
15
|
loadingMetrics: 'Loading metrics…',
|
|
16
|
-
noMetrics: 'All available
|
|
16
|
+
noMetrics: 'All available goals are already on this test.'
|
|
17
17
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const SURFACE_COPY: {
|
|
2
2
|
readonly title: "Tests";
|
|
3
|
+
readonly test: "Test";
|
|
4
|
+
readonly resultsTitle: "Results";
|
|
3
5
|
readonly newTest: "New test";
|
|
4
6
|
readonly goals: "Goals";
|
|
5
7
|
readonly search: "Search tests";
|
|
@@ -8,15 +10,14 @@ export declare const SURFACE_COPY: {
|
|
|
8
10
|
readonly dashShowTests: "Show all tests";
|
|
9
11
|
readonly dashShowGoals: "Show all goals";
|
|
10
12
|
readonly backToAdmin: "Back to admin";
|
|
11
|
-
readonly limitedList: "Showing the 200 most recent tests.";
|
|
12
13
|
readonly notInstalled: "The Tests screen isn't installed yet. Run `payload generate:importmap` and reload.";
|
|
13
14
|
readonly noAccess: "You don't have access to tests.";
|
|
14
15
|
readonly loading: "Loading tests…";
|
|
15
16
|
readonly loadError: "Tests could not be loaded. Please try again.";
|
|
16
17
|
readonly summaryError: "Some test summaries could not be loaded. Please try again.";
|
|
17
18
|
readonly retry: "Try again";
|
|
18
|
-
readonly empty: "
|
|
19
|
-
readonly
|
|
19
|
+
readonly empty: "Create a test to learn what works.";
|
|
20
|
+
readonly clear: "Clear";
|
|
20
21
|
readonly groups: readonly ["Needs attention", "Running", "Ready to start", "Draft", "Decided", "Archived"];
|
|
21
22
|
readonly kinds: {
|
|
22
23
|
readonly block: "Page block";
|
|
@@ -25,12 +26,12 @@ export declare const SURFACE_COPY: {
|
|
|
25
26
|
readonly page: "Whole page";
|
|
26
27
|
};
|
|
27
28
|
readonly ready: "Ready to start";
|
|
28
|
-
readonly next: "
|
|
29
|
+
readonly next: "Review setup";
|
|
29
30
|
readonly continue: "Continue setup";
|
|
30
31
|
readonly results: "View results";
|
|
31
32
|
readonly open: "Open";
|
|
32
33
|
readonly health: {
|
|
33
|
-
readonly red: "
|
|
34
|
+
readonly red: "Needs attention";
|
|
34
35
|
readonly amber: "Check data";
|
|
35
36
|
readonly green: "On track";
|
|
36
37
|
};
|
|
@@ -38,3 +39,4 @@ export declare const SURFACE_COPY: {
|
|
|
38
39
|
};
|
|
39
40
|
export declare function runningLine(days: string, planned: string, people: string): string;
|
|
40
41
|
export declare function decidedLine(date: string, winner: string): string;
|
|
42
|
+
export declare function noMatchesLine(query: string): string;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export const SURFACE_COPY = {
|
|
2
2
|
title: 'Tests',
|
|
3
|
+
test: 'Test',
|
|
4
|
+
resultsTitle: 'Results',
|
|
3
5
|
newTest: 'New test',
|
|
4
6
|
goals: 'Goals',
|
|
5
7
|
search: 'Search tests',
|
|
@@ -8,15 +10,14 @@ export const SURFACE_COPY = {
|
|
|
8
10
|
dashShowTests: 'Show all tests',
|
|
9
11
|
dashShowGoals: 'Show all goals',
|
|
10
12
|
backToAdmin: 'Back to admin',
|
|
11
|
-
limitedList: 'Showing the 200 most recent tests.',
|
|
12
13
|
notInstalled: "The Tests screen isn't installed yet. Run `payload generate:importmap` and reload.",
|
|
13
14
|
noAccess: "You don't have access to tests.",
|
|
14
15
|
loading: 'Loading tests…',
|
|
15
16
|
loadError: 'Tests could not be loaded. Please try again.',
|
|
16
17
|
summaryError: 'Some test summaries could not be loaded. Please try again.',
|
|
17
18
|
retry: 'Try again',
|
|
18
|
-
empty: '
|
|
19
|
-
|
|
19
|
+
empty: 'Create a test to learn what works.',
|
|
20
|
+
clear: 'Clear',
|
|
20
21
|
groups: [
|
|
21
22
|
'Needs attention',
|
|
22
23
|
'Running',
|
|
@@ -32,12 +33,12 @@ export const SURFACE_COPY = {
|
|
|
32
33
|
page: 'Whole page'
|
|
33
34
|
},
|
|
34
35
|
ready: 'Ready to start',
|
|
35
|
-
next: '
|
|
36
|
+
next: 'Review setup',
|
|
36
37
|
continue: 'Continue setup',
|
|
37
38
|
results: 'View results',
|
|
38
39
|
open: 'Open',
|
|
39
40
|
health: {
|
|
40
|
-
red: '
|
|
41
|
+
red: 'Needs attention',
|
|
41
42
|
amber: 'Check data',
|
|
42
43
|
green: 'On track'
|
|
43
44
|
},
|
|
@@ -49,3 +50,6 @@ export function runningLine(days, planned, people) {
|
|
|
49
50
|
export function decidedLine(date, winner) {
|
|
50
51
|
return `Decided ${date}: ${winner}`;
|
|
51
52
|
}
|
|
53
|
+
export function noMatchesLine(query) {
|
|
54
|
+
return `No tests match "${query}".`;
|
|
55
|
+
}
|
|
@@ -8,6 +8,11 @@ export declare const TEST_PAGE: {
|
|
|
8
8
|
readonly retry: "Try again";
|
|
9
9
|
readonly name: "Test name";
|
|
10
10
|
readonly results: "Results";
|
|
11
|
+
readonly tests: "Tests";
|
|
12
|
+
readonly test: "Test";
|
|
13
|
+
readonly navigation: "Sections";
|
|
14
|
+
readonly completePrefix: "Complete: ";
|
|
15
|
+
readonly incompletePrefix: "Incomplete: ";
|
|
11
16
|
readonly complete: "Complete";
|
|
12
17
|
readonly incomplete: "Incomplete";
|
|
13
18
|
readonly completeMark: "✓";
|
|
@@ -33,6 +38,9 @@ export declare const TEST_PAGE: {
|
|
|
33
38
|
readonly openPage: "Open the page";
|
|
34
39
|
readonly editedOnPage: "Versions are edited on the page.";
|
|
35
40
|
readonly editOnPage: "Edit on page";
|
|
41
|
+
readonly empty: "Empty";
|
|
42
|
+
readonly pageReady: "Page ready";
|
|
43
|
+
readonly addPageAddress: "Add a page address";
|
|
36
44
|
readonly ready: "Content ready";
|
|
37
45
|
readonly emptySlot: "Nothing in this slot yet";
|
|
38
46
|
readonly pageBinding: "Each version is a whole page at its own address.";
|
|
@@ -64,6 +72,7 @@ export declare const TEST_PAGE: {
|
|
|
64
72
|
readonly rulesSummary: "Only people matching these rules.";
|
|
65
73
|
readonly addRule: "Add a rule";
|
|
66
74
|
readonly removeRule: "Remove rule";
|
|
75
|
+
readonly blockPathRule: "This rule no longer applies to page block tests; remove it.";
|
|
67
76
|
readonly attribute: "Attribute";
|
|
68
77
|
readonly comparison: "Comparison";
|
|
69
78
|
readonly value: "Value";
|
|
@@ -88,3 +97,4 @@ export declare const NUMBER_COMPARISONS: {
|
|
|
88
97
|
readonly lt: "is less than";
|
|
89
98
|
readonly lte: "is at most";
|
|
90
99
|
};
|
|
100
|
+
export declare const placementCount: (count: number) => string;
|
|
@@ -8,6 +8,11 @@ export const TEST_PAGE = {
|
|
|
8
8
|
retry: 'Try again',
|
|
9
9
|
name: 'Test name',
|
|
10
10
|
results: 'Results',
|
|
11
|
+
tests: 'Tests',
|
|
12
|
+
test: 'Test',
|
|
13
|
+
navigation: 'Sections',
|
|
14
|
+
completePrefix: 'Complete: ',
|
|
15
|
+
incompletePrefix: 'Incomplete: ',
|
|
11
16
|
complete: 'Complete',
|
|
12
17
|
incomplete: 'Incomplete',
|
|
13
18
|
completeMark: '✓',
|
|
@@ -33,6 +38,9 @@ export const TEST_PAGE = {
|
|
|
33
38
|
openPage: 'Open the page',
|
|
34
39
|
editedOnPage: 'Versions are edited on the page.',
|
|
35
40
|
editOnPage: 'Edit on page',
|
|
41
|
+
empty: 'Empty',
|
|
42
|
+
pageReady: 'Page ready',
|
|
43
|
+
addPageAddress: 'Add a page address',
|
|
36
44
|
ready: 'Content ready',
|
|
37
45
|
emptySlot: 'Nothing in this slot yet',
|
|
38
46
|
pageBinding: 'Each version is a whole page at its own address.',
|
|
@@ -64,6 +72,7 @@ export const TEST_PAGE = {
|
|
|
64
72
|
rulesSummary: 'Only people matching these rules.',
|
|
65
73
|
addRule: 'Add a rule',
|
|
66
74
|
removeRule: 'Remove rule',
|
|
75
|
+
blockPathRule: 'This rule no longer applies to page block tests; remove it.',
|
|
67
76
|
attribute: 'Attribute',
|
|
68
77
|
comparison: 'Comparison',
|
|
69
78
|
value: 'Value',
|
|
@@ -88,3 +97,4 @@ export const NUMBER_COMPARISONS = {
|
|
|
88
97
|
lt: 'is less than',
|
|
89
98
|
lte: 'is at most'
|
|
90
99
|
};
|
|
100
|
+
export const placementCount = (count)=>` (placed ${count} times)`;
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
}
|
package/dist/admin/paths.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare const XP_ARM_SELECT = "@delmaredigital/payload-experiments/admin/
|
|
|
4
4
|
export declare const XP_TESTS_VIEW = "@delmaredigital/payload-experiments/admin/rsc#ExperimentsRootView";
|
|
5
5
|
export declare const XP_TESTS_LIST_REDIRECT = "@delmaredigital/payload-experiments/admin/rsc#CollectionListRedirect";
|
|
6
6
|
export declare const XP_TEST_EDIT_REDIRECT = "@delmaredigital/payload-experiments/admin/rsc#CollectionEditRedirect";
|
|
7
|
-
export declare const XP_TESTS_NAV_LINK = "@delmaredigital/payload-experiments/admin/
|
|
7
|
+
export declare const XP_TESTS_NAV_LINK = "@delmaredigital/payload-experiments/admin/rsc#TestsNavLinkServer";
|
|
8
|
+
export declare const XP_TESTS_NAV_CLIENT = "@delmaredigital/payload-experiments/admin/client#TestsNavLink";
|
|
8
9
|
export declare const XP_TESTS_SURFACE = "@delmaredigital/payload-experiments/admin/client#TestsSurface";
|
|
9
10
|
export declare const XP_TESTS_DASHBOARD_CARDS = "@delmaredigital/payload-experiments/admin/client#TestsDashboardCards";
|
package/dist/admin/paths.js
CHANGED
|
@@ -4,6 +4,7 @@ export const XP_ARM_SELECT = '@delmaredigital/payload-experiments/admin/client#A
|
|
|
4
4
|
export const XP_TESTS_VIEW = '@delmaredigital/payload-experiments/admin/rsc#ExperimentsRootView';
|
|
5
5
|
export const XP_TESTS_LIST_REDIRECT = '@delmaredigital/payload-experiments/admin/rsc#CollectionListRedirect';
|
|
6
6
|
export const XP_TEST_EDIT_REDIRECT = '@delmaredigital/payload-experiments/admin/rsc#CollectionEditRedirect';
|
|
7
|
-
export const XP_TESTS_NAV_LINK = '@delmaredigital/payload-experiments/admin/
|
|
7
|
+
export const XP_TESTS_NAV_LINK = '@delmaredigital/payload-experiments/admin/rsc#TestsNavLinkServer';
|
|
8
|
+
export const XP_TESTS_NAV_CLIENT = '@delmaredigital/payload-experiments/admin/client#TestsNavLink';
|
|
8
9
|
export const XP_TESTS_SURFACE = '@delmaredigital/payload-experiments/admin/client#TestsSurface';
|
|
9
10
|
export const XP_TESTS_DASHBOARD_CARDS = '@delmaredigital/payload-experiments/admin/client#TestsDashboardCards';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { PreflightResult } from '../types/endpoints.js';
|
|
2
2
|
type Placement = PreflightResult['placements'][number];
|
|
3
|
-
type PreviewPage =
|
|
3
|
+
type PreviewPage = Placement & {
|
|
4
4
|
key: string;
|
|
5
5
|
slotCount: number;
|
|
6
6
|
};
|
|
7
7
|
/** Preview URLs identify pages; counts use the most placements in any one version. */
|
|
8
|
-
export declare function previewPages(placements: readonly Placement[]): PreviewPage[];
|
|
8
|
+
export declare function previewPages(placements: readonly Placement[], flagPoint?: string): PreviewPage[];
|
|
9
|
+
/** Pages that offer something to do: a preview or an editor link. The section is hidden when none do. */
|
|
10
|
+
export declare function actionablePreviewPages(placements: readonly Placement[], flagPoint?: string): PreviewPage[];
|
|
9
11
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/** Preview URLs identify pages; counts use the most placements in any one version. */ export function previewPages(placements) {
|
|
1
|
+
/** Preview URLs identify pages; counts use the most placements in any one version. */ export function previewPages(placements, flagPoint) {
|
|
2
2
|
const pages = new Map();
|
|
3
|
-
for (const placement of placements){
|
|
4
|
-
const key = `${placement.collection}\u0000${String(placement.id)}`;
|
|
3
|
+
for (const [index, placement] of placements.entries()){
|
|
4
|
+
const key = `${placement.collection}\u0000${String(placement.id)}${placement.collection === flagPoint ? `\u0000${index}` : ''}`;
|
|
5
5
|
const existing = pages.get(key);
|
|
6
6
|
if (existing) {
|
|
7
7
|
const { page, versions } = existing;
|
|
8
|
+
if (!page.editorUrl && placement.editorUrl) page.editorUrl = placement.editorUrl;
|
|
8
9
|
const count = (versions.get(placement.detail) ?? 0) + 1;
|
|
9
10
|
versions.set(placement.detail, count);
|
|
10
11
|
page.slotCount = Math.max(page.slotCount, count);
|
|
@@ -12,11 +13,8 @@
|
|
|
12
13
|
} else {
|
|
13
14
|
pages.set(key, {
|
|
14
15
|
page: {
|
|
16
|
+
...placement,
|
|
15
17
|
key,
|
|
16
|
-
collection: placement.collection,
|
|
17
|
-
id: placement.id,
|
|
18
|
-
title: placement.title,
|
|
19
|
-
url: placement.url,
|
|
20
18
|
slotCount: 1
|
|
21
19
|
},
|
|
22
20
|
versions: new Map([
|
|
@@ -32,3 +30,6 @@
|
|
|
32
30
|
...pages.values()
|
|
33
31
|
].map(({ page })=>page);
|
|
34
32
|
}
|
|
33
|
+
/** Pages that offer something to do: a preview or an editor link. The section is hidden when none do. */ export function actionablePreviewPages(placements, flagPoint) {
|
|
34
|
+
return previewPages(placements, flagPoint).filter((page)=>page.url || page.editorUrl);
|
|
35
|
+
}
|