@funnelsgrove/cli 0.1.10 → 0.1.12
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 +39 -2
- package/dist/analyticsOutput.d.ts +276 -0
- package/dist/analyticsOutput.js +254 -0
- package/dist/cli.d.ts +31 -1
- package/dist/cli.js +312 -6
- package/dist/localSync.d.ts +1 -0
- package/dist/localSync.js +4 -0
- package/package.json +1 -1
- package/template_docs/AGENTS.md +68 -105
- package/template_docs/docs/ab-experiments.md +40 -20
- package/template_docs/docs/analytics.md +7 -4
- package/template_docs/docs/editing-flow.md +59 -7
- package/template_docs/docs/editing-step.md +105 -46
- package/template_docs/docs/payment-plans-and-discounts.md +11 -0
- package/template_docs/docs/publishing-and-versioning.md +68 -3
- package/template_docs/docs/qa-checklist.md +80 -0
- package/template_docs/docs/step-ui-guidelines.md +110 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Step UI Guidelines
|
|
2
|
+
|
|
3
|
+
Every step must pass these rules before it counts as done. They are distilled from high-performing quiz funnels (BetterMe-class) and apply to new steps, edited steps, and paywalls alike.
|
|
4
|
+
|
|
5
|
+
## Viewports
|
|
6
|
+
|
|
7
|
+
Funnels are mobile-first, but QA must cover the desktop-small shell too. Build
|
|
8
|
+
and verify every created or edited step at the default breakpoints in
|
|
9
|
+
`src/config/funnel.manifest.ts`:
|
|
10
|
+
|
|
11
|
+
| Breakpoint | Size | Role |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| small | **375 x 667** | iPhone SE and smaller-width stress check. |
|
|
14
|
+
| medium | **393 x 852** | iPhone 15 baseline. |
|
|
15
|
+
| large | **402 x 874** | iPhone 17 Pro baseline. |
|
|
16
|
+
| desktop-small | **1280 x 800** | 13-inch MacBook baseline. |
|
|
17
|
+
|
|
18
|
+
Pass criteria at every breakpoint: no horizontal scroll, no clipped or overlapping content, the primary CTA visible without scrolling on selection/input steps, and tap targets at least 44px tall.
|
|
19
|
+
|
|
20
|
+
## Layout Shell Contract
|
|
21
|
+
|
|
22
|
+
The shell (`src/components/FunnelFlow.tsx`) owns the frame; steps fill the middle:
|
|
23
|
+
|
|
24
|
+
1. **Fixed top bar** — opaque background, back arrow, brand or section title, optional progress. Thin bottom hairline.
|
|
25
|
+
2. **Scrollable content** — the step body. Must add bottom padding so the last element clears the action bar.
|
|
26
|
+
3. **Fixed bottom action bar** — the Continue button area. **The bar is opaque, never transparent** — content scrolling under a floating button is a defect. Reference implementation:
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
position: fixed;
|
|
30
|
+
bottom: 0;
|
|
31
|
+
left: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
background: var(--color-surface); /* solid — no alpha */
|
|
34
|
+
border-top: 1px solid rgba(23, 23, 23, 0.08);
|
|
35
|
+
padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
|
|
36
|
+
z-index: 11;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The button itself: full width, ~50px tall, pill radius, theme primary color. Disabled state stays visible (washed-out), it never disappears.
|
|
40
|
+
|
|
41
|
+
Steps control the shell bar through `FunnelStepMeta.actionBar`:
|
|
42
|
+
|
|
43
|
+
- omit → default Continue button;
|
|
44
|
+
- `{ buttonText: '...' }` → custom label;
|
|
45
|
+
- `{ hidden: true }` → step owns its CTAs (paywalls);
|
|
46
|
+
- auto-advance steps (single-select) need no bar at all.
|
|
47
|
+
|
|
48
|
+
## Step Patterns
|
|
49
|
+
|
|
50
|
+
One decision per screen. Pick the matching pattern; do not invent hybrids.
|
|
51
|
+
|
|
52
|
+
**Single-select** — tap an option → store answer → `goNext()` immediately. No Continue button. Option cards: icon or image + label + radio indicator, ~16px gap, selected state with tinted background.
|
|
53
|
+
|
|
54
|
+
**Multi-select** — "Choose all that apply" subtitle, checkbox cards, sticky Continue **disabled until at least one selection**. A "None of the above" option clears and excludes the others.
|
|
55
|
+
|
|
56
|
+
**Scale question** — statement in quotes as the headline, 1–5 buttons in a row, anchored labels ("Strongly disagree" / "Strongly agree") at the ends. Auto-advance on tap.
|
|
57
|
+
|
|
58
|
+
**Numeric input** (height, weight, age) — large centered input, unit toggle (kg/lbs, cm/ft) where relevant, visible validation range hint ("enter a value from 90 cm to 243 cm"), Continue disabled until valid. When the value enables personalization, show instant inline feedback below the input (e.g. a BMI callout: amber card, icon, bold key phrase, supportive copy that says how the data will be used). Hard-stop ineligible values with a clear message, not a silent disable.
|
|
59
|
+
|
|
60
|
+
**Info interstitial** — headline, hero image card, 2–3 short supporting lines, sticky Continue. Insert one every 3–5 questions to re-sell the promise and break monotony; tie it to the answer just given ("Keep your back and knees strong → your plan will include…").
|
|
61
|
+
|
|
62
|
+
**Personalized summary** — mirror the user's data back (profile card, gauge with the user's position, attribute list, projection chart with goal badge and date). Charts that predict results need a compliance footnote ("illustrative purposes only / results vary").
|
|
63
|
+
|
|
64
|
+
**Loading / plan-building** — animated percent ring or bar plus rotating social proof (ratings, testimonials) during the wait. Auto-advance on completion.
|
|
65
|
+
|
|
66
|
+
**Email capture** — single email field, nothing else on screen. Headline names the deliverable ("Enter your email to get your plan"). Padlock icon + one privacy reassurance line + Privacy Policy link. Marketing opt-in is its own subsequent step, never a pre-checked box.
|
|
67
|
+
|
|
68
|
+
## Paywall Anatomy
|
|
69
|
+
|
|
70
|
+
The proven block order, top to bottom:
|
|
71
|
+
|
|
72
|
+
1. **Sticky offer header** — compact bar with countdown timer ("Reserved price for 09:59") and a small CTA, always visible while scrolling.
|
|
73
|
+
2. **Before/after comparison** — "Now" vs "Your Goal" with attribute deltas.
|
|
74
|
+
3. **Applied-discount card** — promo code chip, "applied automatically" copy, countdown.
|
|
75
|
+
4. **Plan cards** — usually three; mark one "MOST POPULAR" and preselect it; show struck-through old total → discounted total and a large per-day price anchor.
|
|
76
|
+
5. **Primary CTA** directly under the cards.
|
|
77
|
+
6. **Auto-renewal disclosure** — full renewal price, interval, cancellation path. Required, directly below the CTA.
|
|
78
|
+
7. **Plan highlights** — icon + bold benefit + one-line explanation.
|
|
79
|
+
8. **Trust blocks** — press logos, testimonials with concrete results, results disclaimer.
|
|
80
|
+
9. **FAQ** ("What happens after payment?") and **money-back guarantee** with conditions.
|
|
81
|
+
10. Repeat plan cards + CTA at the bottom for long pages.
|
|
82
|
+
|
|
83
|
+
Checkout opens as a modal over the paywall: itemized breakdown (regular price, discount line, promo chip, VAT, total, "you save" line), wallet buttons first (Apple Pay / Google Pay / PayPal as available), card entry collapsed behind a radio. Closing the checkout without paying triggers the second-stage discount dialog ([payment-plans-and-discounts.md](payment-plans-and-discounts.md)) — verify both discount stages whenever you touch the paywall.
|
|
84
|
+
|
|
85
|
+
## Image Performance
|
|
86
|
+
|
|
87
|
+
Use the ClaimBee/Blessly image loading pattern:
|
|
88
|
+
|
|
89
|
+
- Keep raster artwork on the build-time optimization path so publish can shrink
|
|
90
|
+
PNG/JPEG sources and create AVIF/WebP variants.
|
|
91
|
+
- Put step image metadata in `funnelManifest.assets` and reference those images
|
|
92
|
+
from each step with `assetIds`.
|
|
93
|
+
- Above-the-fold images on the current step use the framework's priority/preload
|
|
94
|
+
mechanism.
|
|
95
|
+
- The flow shell may warm likely next-step images at low priority shortly after
|
|
96
|
+
the active step loads. Do not preload the whole funnel image set on first load.
|
|
97
|
+
- Any image-heavy funnel should keep a contract test that every `assetId`
|
|
98
|
+
resolves and the shell uses manifest-driven next-step preloads.
|
|
99
|
+
|
|
100
|
+
## Content-Fit Audit
|
|
101
|
+
|
|
102
|
+
Run on every created or edited step at small 375x667, medium 393x852, large 402x874, and desktop-small 1280x800:
|
|
103
|
+
|
|
104
|
+
1. Open the step in local preview (`npm run dev`).
|
|
105
|
+
2. Check: nothing clipped, nothing overlapping, no text truncated mid-word, images loaded with correct aspect, CTA fully visible above the fold on selection/input steps.
|
|
106
|
+
3. Scroll to both ends — last content clears the action bar; nothing hides under the top bar.
|
|
107
|
+
4. Check disabled→enabled CTA transition where applicable.
|
|
108
|
+
5. Fix and re-check before moving to another step.
|
|
109
|
+
|
|
110
|
+
Report the audit (all four breakpoints, pass/fail per step) in your summary.
|