1# Page transitions
2
3Use this guide when moving an existing page onto the shared brand system.
4The goal is not to redraw a page from memory. Preserve its product
5meaning while replacing page-local presentation with shared modules.
6
7## Start with an inventory
8
9Read the source page before choosing components. Record its section order,
10authored headlines and body copy, calls to action, assets, interactions,
11responsive behavior, and data dependencies. Reuse existing copy exactly:
12capitalization, punctuation, acronyms, technical terms, and link targets
13are part of the product decision.
14
15When a page has a recent code-owned rebuild, use that implementation as the
16transition baseline. Keep its proven structure, assets, interactions, and
17responsive behavior, then replace page-local presentation incrementally
18with the shared system source. Do not restart from a Workshop mock and
19silently discard behavior the rebuild already solved.
20
21New copy is allowed only where the system needs a label or transition that
22the source does not provide. Do not paraphrase existing copy to make a
23component easier to fill.
24
25## Choose modules by the job
26
27Use an existing system module before creating a new one.
28
29- **Hero**: one display-scale opening per page. Choose left, justified, or
30 center based on the source composition. Centered Heroes also center a
31 system command's platform picker.
32- **Command CTA**: use for a copyable command and platform selection.
33 Supply a download destination for a platform without a canonical
34 one-line command instead of inventing one.
35- **Media Feature**: use when copy and one video, image, or figure need
36 to sit together. Use `VideoFigure` for the source's playable media.
37- **Feature List Stacked**: use for a small related set that needs room
38 for explanation, such as model-routing options.
39- **Feature List Grid**: use for a larger, scannable set with icons, such
40 as security capabilities.
41- **Feature Slider**: use when each item has meaningful accompanying
42 media and one item should be active at a time.
43- **Editorial Illustrations**: use Code, Conversation, Connections, or
44 Evaluation when an explanatory illustration is better than product UI.
45- **Product Demos**: use the curated Lite adapter for a real scripted Warp
46 or Factory product experience. Do not import a raw Lite engine or stage
47 into a page.
48- **Visual Grid**: opt in for the Workshop page ground, rails, and section
49 markers. It is page chrome, not an inherited component background.
50
51Compose modules into a page before proposing a new one. A new module is
52warranted only when a recurring semantic job cannot be expressed by the
53existing APIs. Do not create a component solely to preserve one page's
54legacy CSS or one-off spacing.
55
56## Keep style ownership clear
57
58Every system page must render under `data-ds="warp-next"` and import the
59shared brand-system style entrypoint. Page-level decoration is explicit:
60use `VisualGrid` when it helps the composition.
61
62Some reused material has a deliberate local visual language. Editorial
63illustrations keep their own art direction. Do not import a legacy page
64stylesheet to style an otherwise system-composed section.
65
66Keep data modules server-safe. A render map cannot read an exported value
67from a `'use client'` module: client modules become references on the
68server. Put shared option data in a separate plain module and keep only
69interactive rendering in the client component.
70
71## Know what a change reaches
72
73Shared system changes are intentionally scoped to
74`[data-ds="warp-next"]`. They propagate to every migrated production and
75workshop consumer of the same module/styles. They do not restyle
76unmigrated pages. Review all consumers before changing a shared contract.
77
78Before changing a component, identify its consumers and ownership:
79
80- A shared component source propagates to every page that imports it.
81 Keep one source for behavior such as command selection, video playback,
82 navigation data, and footer data.
83- A shared brand token propagates to scoped descendants, including
84 migrated production pages. Legacy global tokens remain separate.
85- A page-local fork or legacy stylesheet reaches only that page. Do not
86 assume two visually similar sections share an implementation.
87
88To make a system decision apply across the site, move or recreate the
89approved component in the production shared-component layer, migrate each
90consumer to that source, and remove or explicitly retain any fork. For
91Sanity-backed content, keep the structured schema, published data, and
92mirrored fallback source aligned. Add a test that renders every intended
93consumer or asserts the shared import path, so a later page-local fork
94cannot quietly bypass the change.
95
96## One system moving forward
97
98The Workshop is the proving ground, not a second permanent library. The
99approved result must become one production token source and one shared
100component source for each semantic job. Do not start a new page with a
101second Tailwind implementation, a page-local stylesheet, or a copied
102Workshop component once that shared source exists.
103
104During a pilot, legacy wrappers are allowed only as an explicit temporary
105boundary. Record whether each wrapper will be migrated into the shared
106system or deleted, then remove it after visual and interaction parity is
107verified. A component should gain a reusable prop when several consumers
108need the same variation; it should not gain a page-name-specific mode.
109
110## Preserve interaction and access
111
112Keep the behavior a source page already earned: copy feedback, OS
113selection, download fallbacks, video playback, reduced-motion handling,
114keyboard access, and external-link treatment. If a system primitive is
115almost right, add a general-purpose prop or state before adding a
116page-specific fork.
117
118Check desktop and mobile widths, keyboard focus, reduced motion, empty
119data, long labels, and media loading. Visual parity is not complete if the
120source interaction has been replaced by an inert approximation.
121
122## Move from Workshop to production
123
124The Workshop is a reference and composition proving ground; it does not
125automatically change a production route. For a production transition:
126
1271. Read `AGENTS.md`, `docs/creating-new-pages.md` at the repository root,
128 and the `create-marketing-page` skill. Inventory the existing page.
1292. Compose existing modules from `src/components/brand-system/`; ask
130 before an approved new module and use the catalog contribution recipe.
131 A code-only composition does not need legacy Sanity block wiring.
1323. Use shared styles/scope and code-owned `SiteNav` / `Footer` defaults.
133 Register the dedicated slug/catch-all exclusion and exact chrome paths.
1344. Preserve existing metadata, telemetry, forms, OS behavior, copy and any
135 explicit CMS-owned ancillary data. Retained page documents do not own
136 a migrated route's body.
1375. Verify the actual Vercel preview and release code through approved
138 deployment. Only explicit CMS content changes use draft patches and
139 human Studio Publish; do not seed a page just to release code.
140
141## Validation
142
143Run typecheck, lint, `pnpm test:brand`, focused behavior tests and
144`git diff --check`; run `pnpm build` before release. Add a smoke test for
145shared chrome, source-authored copy and chosen modules. Review the page
146at the target breakpoint before calling the transition complete.