playwright-director 0.6.1 → 0.6.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 +89 -0
- package/dist/Tutorial.d.ts +5 -1
- package/dist/Tutorial.d.ts.map +1 -1
- package/dist/Tutorial.js +56 -20
- package/dist/Tutorial.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/init.js +19 -3
- package/dist/init.js.map +1 -1
- package/dist/overlay-html.d.ts +3 -0
- package/dist/overlay-html.d.ts.map +1 -1
- package/dist/overlay-html.js +3 -2
- package/dist/overlay-html.js.map +1 -1
- package/dist/overlay.d.ts +1 -1
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +4 -2
- package/dist/overlay.js.map +1 -1
- package/dist/pace.d.ts +44 -0
- package/dist/pace.d.ts.map +1 -0
- package/dist/pace.js +61 -0
- package/dist/pace.js.map +1 -0
- package/dist/reporter.d.ts.map +1 -1
- package/dist/reporter.js +4 -0
- package/dist/reporter.js.map +1 -1
- package/dist/site/build-site.d.ts +2 -0
- package/dist/site/build-site.d.ts.map +1 -1
- package/dist/site/build-site.js +3 -0
- package/dist/site/build-site.js.map +1 -1
- package/dist/site/generate-manifest.d.ts +7 -1
- package/dist/site/generate-manifest.d.ts.map +1 -1
- package/dist/site/generate-manifest.js +115 -20
- package/dist/site/generate-manifest.js.map +1 -1
- package/dist/site/scaffold.d.ts +2 -0
- package/dist/site/scaffold.d.ts.map +1 -1
- package/dist/site/scaffold.js +12 -2
- package/dist/site/scaffold.js.map +1 -1
- package/dist/site/targets.d.ts +12 -0
- package/dist/site/targets.d.ts.map +1 -0
- package/dist/site/targets.js +44 -0
- package/dist/site/targets.js.map +1 -0
- package/dist/site/types.d.ts +26 -1
- package/dist/site/types.d.ts.map +1 -1
- package/dist/timeline.d.ts +9 -3
- package/dist/timeline.d.ts.map +1 -1
- package/dist/timeline.js +6 -2
- package/dist/timeline.js.map +1 -1
- package/dist/types.d.ts +7 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/skills/tutorialize/SKILL.md +12 -2
- package/skills/tutorialize/agent.md +25 -6
- package/skills/tutorialize/references/api.md +52 -1
- package/skills/tutorialize/references/site.md +41 -0
- package/skills/tutorialize/references/storytelling.md +46 -0
package/dist/timeline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../src/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAA2B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"timeline.js","sourceRoot":"","sources":["../src/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAA2B,MAAM,mBAAmB,CAAC;AAmEjF;;GAEG;AACH,MAAM,OAAO,gBAAgB;IACpB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,KAAK,GAAW,EAAE,CAAC;IACnB,QAAQ,CAAS;IACjB,WAAW,CAAS;IACpB,IAAI,CAAS;IACb,OAAO,GAAW,EAAE,CAAC;IACrB,OAAO,GAAW,EAAE,CAAC;IACrB,I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gDAAgD,IAAI,CAAC,QAAQ,KAAK,CAAC,CAAC;IACjF,CAAC;CACD"}
|
package/dist/types.d.ts
CHANGED
|
@@ -61,6 +61,11 @@ export interface TutorialOptions {
|
|
|
61
61
|
* The variant `'mobile'` also switches to a compact overlay and, with 2+
|
|
62
62
|
* scenes, a permanent split stage (all scenes visible, ratios ignored). */
|
|
63
63
|
variant?: string;
|
|
64
|
+
/** Rendering pace — `walkthrough` (default, everything narrated), `snippet`
|
|
65
|
+
* (doc clip: "do" halves and context titles only) or `demo` (showcase cut).
|
|
66
|
+
* Defaults to process.env.TUTORIAL_PACE. A non-walkthrough pace suffixes
|
|
67
|
+
* testName `-<pace>` (after the variant). */
|
|
68
|
+
pace?: Pace;
|
|
64
69
|
/** Where the gallery sends a viewer next: `app` = the screen this tutorial shows
|
|
65
70
|
* (path on the site config `appUrl`), `docs` = its documentation page (path on `docsUrl`).
|
|
66
71
|
* Full URLs are kept as is. Stored in the timeline; no effect on the recording. */
|
|
@@ -104,6 +109,8 @@ export interface StepOptions {
|
|
|
104
109
|
/** Override overlay position for this step */
|
|
105
110
|
overlayPosition?: OverlayPosition;
|
|
106
111
|
}
|
|
112
|
+
/** See `src/pace.ts` */
|
|
113
|
+
export type Pace = 'walkthrough' | 'snippet' | 'demo';
|
|
107
114
|
export type OverlayPosition = 'TL' | 'TR' | 'BL' | 'BR';
|
|
108
115
|
export type ContextStyle = 'goal' | 'clarification' | 'attention';
|
|
109
116
|
export interface ContextOptions {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC/B,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;iFAC6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,QA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C;IACpB,iDAAiD;IACjD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;4DACwD;IACxD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,eAAe,CAAC;CAClC;AAED,wBAAwB;AACxB,MAAM,MAAM,IAAI,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,eAAe,GAAG,WAAW,CAAC;AAElE,MAAM,WAAW,cAAc;IAC9B,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,KAAK,CAAC,EAAE,YAAY,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright-director",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "AI-assisted Playwright tool that turns executable tests into directed video guides — demos, tutorials, and documentation that never lag behind the product.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,7 +10,7 @@ Turn a Playwright test into a tutorial that **teaches**, not just demonstrates.
|
|
|
10
10
|
Three reference files support this skill:
|
|
11
11
|
- [`references/storytelling.md`](references/storytelling.md) — Persona analysis, emotional arc, narration voice, pacing decisions
|
|
12
12
|
- [`references/api.md`](references/api.md) — `playwright-director` API, timing model, technical rules, checklist
|
|
13
|
-
- [`references/site.md`](references/site.md) — Gallery site (`build-site`): config, themes, sections, role chips, tokens/css/overrides, app + docs links, languages, SEO
|
|
13
|
+
- [`references/site.md`](references/site.md) — Gallery site (`build-site`): config, themes, sections, role chips, build targets + include/exclude, tokens/css/overrides, app + docs links, languages, SEO
|
|
14
14
|
|
|
15
15
|
**Read the first two before tutorializing.** Storytelling comes first — it drives every API decision.
|
|
16
16
|
Read `site.md` when you touch `tutorial-site.config.js`, a site override, or the test's `links`.
|
|
@@ -50,12 +50,18 @@ COMPLETE: Celebrate the outcome, suggest what's next
|
|
|
50
50
|
through `typeBlurred()`
|
|
51
51
|
- Fast-forward the dead time: wrap slow generations or repetitive chores in
|
|
52
52
|
`fastForward(speed, …)` inside their step (`storytelling.md` §10, `api.md` §14)
|
|
53
|
+
- Write once, in full, for every pace: `walkthrough` narrates everything,
|
|
54
|
+
`snippet` (docs) and `demo` (LinkedIn) speak only each step's first sentence
|
|
55
|
+
and the goal title — so those must stand alone (`storytelling.md` §11,
|
|
56
|
+
`api.md` §15). Ask which cut the video is for when the request doesn't say
|
|
53
57
|
- Apply the polish checklist before submitting
|
|
54
58
|
|
|
55
59
|
### 4. Verify
|
|
56
60
|
- Test passes without `TUTORIAL_MODE` (plain E2E)
|
|
57
61
|
- Test passes with `TUTORIAL_MODE=true` (video generation)
|
|
58
|
-
- Watch the generated video — does it feel human?
|
|
62
|
+
- Watch the generated video — does it feel human? Does something move on
|
|
63
|
+
screen within two seconds? Record the short cut too
|
|
64
|
+
(`TUTORIAL_PACE=snippet` or `demo`) and check it still tells the story.
|
|
59
65
|
- Narration texts also become the gallery site's step-by-step guide
|
|
60
66
|
(`npx playwright-director build-site`) — even `skipVoice` steps show their
|
|
61
67
|
text there, so write every step text to read well on the page too.
|
|
@@ -65,3 +71,7 @@ COMPLETE: Celebrate the outcome, suggest what's next
|
|
|
65
71
|
- Set `links: { app, docs }` when the tutorial shows an app screen or has a
|
|
66
72
|
docs page, and add the slug to a section's `items` in the site config
|
|
67
73
|
(`site.md` §3, §5).
|
|
74
|
+
- A tutorial meant for internal readers only goes in a section that the public
|
|
75
|
+
target excludes (`targets.public.tutorials.exclude.categories`,
|
|
76
|
+
`build-site --target public`) — removing a section from `categories` does not
|
|
77
|
+
unpublish it (`site.md` §7b).
|
|
@@ -11,9 +11,9 @@ You are an expert Tutorial Designer who transforms Playwright E2E tests into pro
|
|
|
11
11
|
## Before you start
|
|
12
12
|
|
|
13
13
|
Load the `/tutorialize` skill and read both reference files:
|
|
14
|
-
- `references/storytelling.md` — persona, emotional arc, narration voice
|
|
14
|
+
- `references/storytelling.md` — persona, emotional arc, narration voice, picking the cut (§11 paces)
|
|
15
15
|
- `references/api.md` — API, timing model, technical rules, checklist
|
|
16
|
-
- `references/site.md` — gallery site config (only when the site config or `links` are involved)
|
|
16
|
+
- `references/site.md` — gallery site config: sections, roles, build targets + `include`/`exclude` (only when the site config or `links` are involved)
|
|
17
17
|
|
|
18
18
|
## Your process
|
|
19
19
|
|
|
@@ -22,6 +22,10 @@ Read the original test file. Identify:
|
|
|
22
22
|
- **Persona**: who is this tutorial for? (role, expertise, emotional state)
|
|
23
23
|
- **Goal**: what will the viewer accomplish?
|
|
24
24
|
- **Key actions**: what needs explanation vs what is obvious?
|
|
25
|
+
- **Cut**: where will the video live? Docs page / widget → `snippet`; onboarding
|
|
26
|
+
or a full course → `walkthrough`; LinkedIn, landing page → `demo`
|
|
27
|
+
(`storytelling.md` §11). Ask when the request doesn't say. You still write
|
|
28
|
+
one script — the pace is chosen at recording time (`TUTORIAL_PACE`).
|
|
25
29
|
- **Profiles**: does the lesson depend on a handoff between two people? If so,
|
|
26
30
|
the test becomes multi-scene (`storytelling.md` §8, `api.md` §10). Default to
|
|
27
31
|
a single profile — a second scene doubles the length and must earn it.
|
|
@@ -33,8 +37,13 @@ Navigate → Goal context → Steps (grouped) → Clarifications (if needed) →
|
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
### 3. Write natural narration
|
|
36
|
-
- "Do" ≤ 8 words, action-oriented
|
|
37
|
-
|
|
40
|
+
- "Do" ≤ 8 words, action-oriented — and complete on its own: the short cuts
|
|
41
|
+
speak only the "do"
|
|
42
|
+
- "Explain" gives the WHY (kept on the gallery page and in its SEO even when a
|
|
43
|
+
short cut doesn't say it)
|
|
44
|
+
- Goal context title = the hook, ≤ 12 words, an outcome — it is the whole
|
|
45
|
+
opening of `snippet` / `demo`
|
|
46
|
+
- Check the word budget of the target cut (~2.5 spoken words/s)
|
|
38
47
|
- Second person, conversational tone
|
|
39
48
|
- Persona-appropriate vocabulary
|
|
40
49
|
|
|
@@ -43,6 +52,9 @@ Follow all rules from `api.md`:
|
|
|
43
52
|
- No blank-screen opening
|
|
44
53
|
- Navigation transitions properly awaited
|
|
45
54
|
- Dual-mode (test works with and without TUTORIAL_MODE)
|
|
55
|
+
- Pace-proof: the story holds without clarification contexts (dropped by
|
|
56
|
+
`snippet` and `demo`) and with only each step's first sentence
|
|
57
|
+
(`api.md` §15); record the target cut with `TUTORIAL_PACE=snippet|demo`
|
|
46
58
|
- `@tutorial` tag on the test
|
|
47
59
|
- Acronyms have `voiceText` where TTS mispronounces
|
|
48
60
|
- Camera zooms (`tutorial.zoom()`, `zoomIn()`/`zoomOut()`, optional `blur`) on
|
|
@@ -63,11 +75,18 @@ Follow all rules from `api.md`:
|
|
|
63
75
|
- Gallery: `links: { app, docs }` on the Tutorial when the test shows an app
|
|
64
76
|
screen or has a docs page; new slugs go in a section's `items` of
|
|
65
77
|
`tutorial-site.config.js` (`site.md` §3, §5)
|
|
78
|
+
- Internal-only tutorials (admin, staff tools): give them their own section and
|
|
79
|
+
leave it out of the public build with `tutorials.exclude: { categories: [...] }`
|
|
80
|
+
in a `targets.public` entry (`build-site --target public`) — never by deleting
|
|
81
|
+
the section from `categories`, which still publishes them (`site.md` §7b)
|
|
66
82
|
|
|
67
83
|
### 5. Show and explain
|
|
68
84
|
- Present the diff or full transformed code
|
|
69
85
|
- Explain why certain groupings were chosen
|
|
70
|
-
- Describe what the pacing will feel like when the video plays
|
|
86
|
+
- Describe what the pacing will feel like when the video plays, in the target
|
|
87
|
+
cut, and give the command that records it (`TUTORIAL_PACE=…`)
|
|
71
88
|
|
|
72
89
|
## Remember
|
|
73
|
-
A great tutorial makes the viewer feel capable, not confused
|
|
90
|
+
A great tutorial makes the viewer feel capable, not confused — and never makes
|
|
91
|
+
them wait. Write the why in full; let the pace decide how much of it is spoken.
|
|
92
|
+
Something should move on screen within two seconds.
|
|
@@ -42,6 +42,7 @@ Or use a fixture that wraps this (the consuming project typically provides a `tu
|
|
|
42
42
|
| `customStyles` | `string` | built-in | CSS for overlay |
|
|
43
43
|
| `overlayPosition` | `'TL' \| 'TR' \| 'BL' \| 'BR'` | `'TR'` | Overlay corner position |
|
|
44
44
|
| `links` | `{ app?, docs? }` | — | Gallery buttons + docs cross-links: paths on the site's `appUrl` / `docsUrl`, or full URLs. No effect on the recording (`site.md` §5) |
|
|
45
|
+
| `pace` | `'walkthrough' \| 'snippet' \| 'demo'` | `env TUTORIAL_PACE`, else `'walkthrough'` | Rendering cut of the same written tutorial (§15). Non-walkthrough paces suffix `testName` `-<pace>` (after the variant). Read `tutorial.pace` in the spec if needed |
|
|
45
46
|
| `variant` | `string` | `env TUTORIAL_VARIANT` | Suffixes `testName` (`<testName>-<variant>`) so a second recording never overwrites the first. `'mobile'` also compacts the overlay and pins the multi-scene split (see below) |
|
|
46
47
|
|
|
47
48
|
## 2. Core Methods
|
|
@@ -330,6 +331,11 @@ equivalent. Apps with their own player use the headless API:
|
|
|
330
331
|
URLs and chapter times (`steps[].at`, seconds). Schema:
|
|
331
332
|
`schemas/embed-v1.schema.json`.
|
|
332
333
|
|
|
334
|
+
One config can build several sites: `build-site --target public` merges
|
|
335
|
+
`targets.public` over the config, and `tutorials.exclude` / `include`
|
|
336
|
+
(`{ categories, slugs }`, slug globs like `admin-*`) leave whole tutorials out —
|
|
337
|
+
no page, embed, video or sitemap entry (`site.md` §7b).
|
|
338
|
+
|
|
333
339
|
Widget: a native modal `<dialog>` (focus trap, Esc, focus returned), chapters
|
|
334
340
|
that seek (arrows/Home/End), fr/en/ar strings picked from `data-tutorial-lang`
|
|
335
341
|
or `<html lang>`. Theme it from the app with `--pd-accent`, `--pd-surface`,
|
|
@@ -564,7 +570,50 @@ tutorial.step('Fill the twelve rows', async () => {
|
|
|
564
570
|
- Fast-forward the wait, not the payoff: end the span before the result the viewer must see.
|
|
565
571
|
- No-op without `TUTORIAL_MODE` — `fastForward()` just runs the action; a speed `≤ 1` throws in both modes.
|
|
566
572
|
|
|
567
|
-
## 15.
|
|
573
|
+
## 15. Paces — one script, three cuts
|
|
574
|
+
|
|
575
|
+
Write the tutorial **once**, in full (goal context with text, `do` + `explain`
|
|
576
|
+
on every step that needs a why). The pace decides how much of it is narrated:
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
npx playwright test e2e/invoice # walkthrough (default)
|
|
580
|
+
TUTORIAL_PACE=snippet TUTORIAL_MODE=true npx playwright test e2e/invoice # doc clip
|
|
581
|
+
TUTORIAL_PACE=demo TUTORIAL_MODE=true npx playwright test e2e/invoice # LinkedIn / showcase
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
| | `walkthrough` | `snippet` | `demo` |
|
|
585
|
+
|---|---|---|---|
|
|
586
|
+
| Step narration | `do` + `explain` | `do` only | `do` only |
|
|
587
|
+
| Overlay description | shown | shown | hidden |
|
|
588
|
+
| `goal` context | centered card, title + text | corner banner, title only | corner banner, title only |
|
|
589
|
+
| `clarification` context | shown | dropped | dropped |
|
|
590
|
+
| `attention` context | shown | corner banner, title only | dropped |
|
|
591
|
+
| Pause after context / unvoiced step (`stepDelay`) | 500 ms | 200 ms | 150 ms |
|
|
592
|
+
| Pause after each step (unless `delay`) | 300 ms | 150 ms | 100 ms |
|
|
593
|
+
| Hold on the completion screen | 2 s | 1 s | 1.5 s |
|
|
594
|
+
| Cursor (`mouseSteps` / `pauseBeforeClick`) | 25 / 300 ms | 25 / 150 ms | 15 / 100 ms |
|
|
595
|
+
| `typeSlowly` / `typeBlurred` delay | ×1 | ×0.6 | ×0.4 |
|
|
596
|
+
|
|
597
|
+
- **Nothing is lost for the gallery.** What a short pace doesn't say stays in
|
|
598
|
+
the timeline: steps get `fullText` (the whole `do. explain`), dropped contexts
|
|
599
|
+
are recorded unvoiced with their text. The site's step guide, description and
|
|
600
|
+
SEO read the full text; transcripts and `tutorial-transcript apply` work on
|
|
601
|
+
what was actually said.
|
|
602
|
+
- **Splitting rule:** the narrated part is the first sentence — `do` with
|
|
603
|
+
`do`/`explain`, the title with `description`, a context's title, or the text
|
|
604
|
+
before the first `'. '` of a custom `voiceText`. So the first sentence must
|
|
605
|
+
stand on its own.
|
|
606
|
+
- **Explicit options win:** `stepDelay`, `mouseSteps`, `pauseBeforeClick` passed
|
|
607
|
+
to the constructor override the pace defaults; a step's `delay` overrides
|
|
608
|
+
the after-step pause.
|
|
609
|
+
- Outputs coexist: `invoice`, `invoice-snippet`, `invoice-demo` (and
|
|
610
|
+
`invoice-mobile-demo` with `TUTORIAL_VARIANT=mobile`). The reporter matches
|
|
611
|
+
`TUTORIAL_PACE` when it is set. The gallery publishes one cut per tutorial
|
|
612
|
+
(`tutorials.pace`, `site.md` §2); slugs, config entries and embeds never carry
|
|
613
|
+
the pace suffix.
|
|
614
|
+
- An unknown pace throws, in both modes.
|
|
615
|
+
|
|
616
|
+
## 16. Checklist
|
|
568
617
|
|
|
569
618
|
Before submitting a tutorialized test:
|
|
570
619
|
|
|
@@ -583,6 +632,8 @@ Before submitting a tutorialized test:
|
|
|
583
632
|
- [ ] Zooms (if any) land on what the narration names, ≤ 3 per tutorial, each `zoomIn` paired with a `zoomOut` in the same step
|
|
584
633
|
- [ ] Secrets (passwords, API keys) typed with `typeBlurred`, never `fill`/`typeSlowly`
|
|
585
634
|
- [ ] Long waits / repetitive chores wrapped in `fastForward(speed, …)` inside their step, and the narration announces the skip
|
|
635
|
+
- [ ] Every step's and context's first sentence works alone — it is all `snippet` / `demo` narrate (§15)
|
|
636
|
+
- [ ] The goal context's title is a one-liner (≤ 12 words): it is the whole opening of the short cuts
|
|
586
637
|
|
|
587
638
|
Multi-scene tutorials, additionally:
|
|
588
639
|
|
|
@@ -48,6 +48,8 @@ export default {
|
|
|
48
48
|
| `primaryColor` / `font` | — | Pre-0.6 spellings of `tokens.primary` / `tokens.fontBody` |
|
|
49
49
|
| `tutorials.categories` | from `@feature:` tags | Sections in display order (§3) |
|
|
50
50
|
| `tutorials.roles` | — | Académie hero chips, one per reader profile: a click shows only its sections (§3) |
|
|
51
|
+
| `tutorials.exclude` / `include` | — | `{ categories, slugs }` — leave tutorials out of the build entirely (§7b) |
|
|
52
|
+
| `targets` | — | Named config overrides picked with `--target <name>` (§7b) |
|
|
51
53
|
| `tutorials.featured` | first video | Slug of the Académie "start here" video |
|
|
52
54
|
| `tutorials.premium` | `[]` | Slugs with a PRO badge |
|
|
53
55
|
| `tutorials.links` | test `links` | Per-slug `{ app, docs }`, over the test's |
|
|
@@ -55,6 +57,7 @@ export default {
|
|
|
55
57
|
| `tutorials.ui.heroSubtitle` | "Video tutorials" | String or per language |
|
|
56
58
|
| `tutorials.stepsLayout` | `'text'` | Video page step guide: `'text'` \| `'cards'` \| `'full'` \| `'none'` |
|
|
57
59
|
| `tutorials.showStrip` | `true` | Thumbnail strip above the step guide |
|
|
60
|
+
| `tutorials.pace` | `['walkthrough', 'snippet', 'demo']` | Which cut to publish when a tutorial was recorded at several paces (`TUTORIAL_PACE`, `api.md` §15): one pace or a preference order; a tutorial missing the preferred one falls back to what was recorded. The step guide always shows the full written text |
|
|
58
61
|
|
|
59
62
|
## 3. Sections and order
|
|
60
63
|
|
|
@@ -76,6 +79,8 @@ tutorials: {
|
|
|
76
79
|
- Sections show in key order; videos in `items` order, then unlisted ones in scan order.
|
|
77
80
|
- `items` wins over the timeline `@feature:` tag. A slug = the test name without `.<lang>` / `-<variant>`,
|
|
78
81
|
so one entry covers every language and variant (`items`, `premium`, `featured`, `links` alike).
|
|
82
|
+
Recordings named after a translated title still group: languages of one test (same `testFile` + `testTitle`
|
|
83
|
+
+ variant) share the site-language recording's slug (else the first language's), whatever their ids.
|
|
79
84
|
- Empty sections are dropped. Section stats ("3 videos · ~4 min") are computed.
|
|
80
85
|
- **Roles** (Académie hero chips) filter by reader profile, not by section — the side table of contents
|
|
81
86
|
already lists the sections. Keep labels short ("Je suis comptable"); a role lists section ids, an
|
|
@@ -141,6 +146,7 @@ npx playwright-director build-site --theme=classic # override config.theme
|
|
|
141
146
|
npx playwright-director build-site --base=/help/ # override baseUrl's path
|
|
142
147
|
npx playwright-director build-site --output=dist/help/ # override output
|
|
143
148
|
npx playwright-director build-site --only=onboarding # only these slugs (all languages/variants)
|
|
149
|
+
npx playwright-director build-site --target public # merge targets.public over the config (§7b)
|
|
144
150
|
npx playwright-director build-site -y # never prompt (CI; automatic without a TTY)
|
|
145
151
|
npx playwright-director build-site --dev # astro dev with live reload, no build
|
|
146
152
|
```
|
|
@@ -148,6 +154,40 @@ npx playwright-director build-site --dev # astro dev with live rel
|
|
|
148
154
|
Two themes from one config: build twice with `--theme` + `--base` + `--output`, and set
|
|
149
155
|
`themeSwitcher` so each build links to the other.
|
|
150
156
|
|
|
157
|
+
## 7b. Targets, include / exclude — a public and an internal site from one config
|
|
158
|
+
|
|
159
|
+
```js
|
|
160
|
+
export default {
|
|
161
|
+
title: 'Académie', input: 'tutorials/', output: 'tutorials/site/dist/', baseUrl: '/', lang: 'fr',
|
|
162
|
+
tutorials: { categories: { general: { label: 'Général' }, admin: { label: 'Administration' } } },
|
|
163
|
+
targets: {
|
|
164
|
+
public: { output: 'tutorials/site/public/', tutorials: { exclude: { categories: ['admin'] } } }
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
npx playwright-director build-site # everything → tutorials/site/dist/
|
|
171
|
+
npx playwright-director build-site --target public # no admin tutorials → tutorials/site/public/
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
- **`targets.<name>`** is deep-merged over the config: objects merge, arrays and plain values replace,
|
|
175
|
+
`null` deletes a key. No `--target` = the main config. An unknown name fails and lists the targets.
|
|
176
|
+
CLI flags (`--output`, `--base`, `--theme`) still win over the target.
|
|
177
|
+
- **`tutorials.exclude` / `include`**: `{ categories?: string[], slugs?: string[] }`. `categories` are
|
|
178
|
+
section ids (`tutorials.categories` keys — the section a tutorial is shown in: `items`, else its
|
|
179
|
+
`@feature:` tag); `slugs` are globs on the slug (`*` any, `?` one character), e.g. `['admin-*']`.
|
|
180
|
+
Published = matches `include` (or no `include`) and does not match `exclude`; matching = its
|
|
181
|
+
category is listed or its slug matches. `.<lang>` and `-<variant>` recordings follow their slug.
|
|
182
|
+
- An excluded tutorial leaves **no trace**: no page, no `embed/<slug>*.json`, no `embed/index.json`
|
|
183
|
+
entry, no `videos/<slug>*` file, nothing in search, sitemap, `links.json`, counts or durations.
|
|
184
|
+
Sections left empty are hidden; a role whose sections are all hidden is hidden.
|
|
185
|
+
- **Removing a section from `categories` (or setting it to `null` in a target) does not unpublish
|
|
186
|
+
it** — its tutorials ship under a detected section, with a warning. Use `exclude.categories`.
|
|
187
|
+
- Warnings, not failures: an excluded `featured` (falls back to the first published tutorial), an
|
|
188
|
+
excluded slug in `items` or `premium`. Nothing left to publish fails.
|
|
189
|
+
- Build into a fresh `output` folder: files from an earlier, larger build are not deleted.
|
|
190
|
+
|
|
151
191
|
## 8. Output
|
|
152
192
|
|
|
153
193
|
| Path | Content |
|
|
@@ -168,3 +208,4 @@ Two themes from one config: build twice with `--theme` + `--base` + `--output`,
|
|
|
168
208
|
- [ ] Tests that show an app screen set `links.app`; tests with a docs page set `links.docs`
|
|
169
209
|
- [ ] Customization uses tokens first, `css` second, `overrides` last
|
|
170
210
|
- [ ] `--only` builds are for checking a page — deploy a full build
|
|
211
|
+
- [ ] Internal tutorials stay out of a public build with `exclude` in a target, never by deleting their section
|
|
@@ -245,3 +245,49 @@ A real app makes the viewer wait: a report generates for 30 seconds, an import c
|
|
|
245
245
|
### Say it
|
|
246
246
|
|
|
247
247
|
Announce the skip in the step's narration — "this takes a minute — let's skip ahead" — so the speed-up reads as a directing choice, not a glitch.
|
|
248
|
+
|
|
249
|
+
## 11. Pick the Cut — Pace
|
|
250
|
+
|
|
251
|
+
Most videos are short clips inside documentation; some are a whole journey
|
|
252
|
+
shared on LinkedIn. You write the tutorial **once, in full**, and the pace
|
|
253
|
+
(`TUTORIAL_PACE`, `api.md` §15) chooses how much of it is spoken:
|
|
254
|
+
|
|
255
|
+
| Pace | Where it lives | Feels like | Typical length |
|
|
256
|
+
|---|---|---|---|
|
|
257
|
+
| `walkthrough` (default) | Onboarding, first-time setup, a full course | Someone sitting next to you, explaining every why | 1–3 min |
|
|
258
|
+
| `snippet` | A docs page, the in-app widget, "how do I…?" | A colleague showing you, fast | 20–45 s |
|
|
259
|
+
| `demo` | LinkedIn, a landing page, a sales email | A product trailer: it moves, it lands, it ends | 45–90 s |
|
|
260
|
+
|
|
261
|
+
The "why" is never wasted: a short cut doesn't speak it, but the gallery's step
|
|
262
|
+
guide still shows it — it is the page's text, and its SEO.
|
|
263
|
+
|
|
264
|
+
### Write so every cut works
|
|
265
|
+
|
|
266
|
+
- **The first sentence carries the step.** `snippet` and `demo` say only the
|
|
267
|
+
`do` half (or the title, or the text before the first `'. '`). If the `do`
|
|
268
|
+
needs the `explain` to make sense, rewrite the `do`.
|
|
269
|
+
- **The goal title is the hook.** In the short cuts it is the whole opening —
|
|
270
|
+
one line over the live screen, no card in the middle. ≤ 12 words, an outcome:
|
|
271
|
+
"Send your first invoice in a minute", not "Invoicing module overview".
|
|
272
|
+
- **Clarifications are bonus material.** They are dropped by both short cuts,
|
|
273
|
+
so the story must hold without them. An `attention` survives in `snippet` —
|
|
274
|
+
keep it for what really can't be skipped.
|
|
275
|
+
- **Never two seconds of stillness.** The viewer should see the app from the
|
|
276
|
+
first frame and something moving within two seconds — a still screen under a
|
|
277
|
+
long sentence is where people leave. This is why the short cuts shrink the
|
|
278
|
+
opening to its title.
|
|
279
|
+
|
|
280
|
+
### The demo cut is a trailer
|
|
281
|
+
|
|
282
|
+
- End on the payoff with a zoom (`§9`): the generated document, the "Paid"
|
|
283
|
+
status, the dashboard filling up. That's the frame people remember.
|
|
284
|
+
- Fast-forward generously (`§10`) — dead time is fatal on a feed.
|
|
285
|
+
- The completion message is the call to action: what the viewer gets, not "done".
|
|
286
|
+
- On a feed most people watch muted: the overlay title must tell the story on its own.
|
|
287
|
+
|
|
288
|
+
### Word budget
|
|
289
|
+
|
|
290
|
+
TTS speaks about 2.5 words per second. Before writing, check what each cut will
|
|
291
|
+
say: a 40 s `snippet` holds ~100 spoken words in all (goal title + every `do` +
|
|
292
|
+
completion). If the `do` halves alone overflow, the tutorial has too many steps
|
|
293
|
+
— group them (§6) or split the tutorial.
|