Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0ea24cc
My Jetpack: show the site itself while asking what it is for
Sep 27, 2026
7fe255e
My Jetpack: stop the screenshot poll adding its own wait to the render
Sep 27, 2026
7cd54b4
My Jetpack: ask for the screenshot while the user is away connecting
Sep 27, 2026
113ed22
My Jetpack: fix what three red teams found in the site portrait
Sep 27, 2026
3fb6ddd
My Jetpack: stop the onboarding layout coming apart on a tall window
Sep 27, 2026
89e0e8e
My Jetpack: let the artwork carry the onboarding panel
Sep 28, 2026
877532d
My Jetpack: fill the window with the onboarding wizard
Sep 29, 2026
6f10bfc
My Jetpack: stop the onboarding blanking and redrawing between steps
Sep 29, 2026
11be9be
My Jetpack: centre the onboarding start screen again
Sep 29, 2026
8c2bb42
My Jetpack: centre each onboarding step in the sheet
Sep 29, 2026
cb26a37
My Jetpack: clean up the onboarding wizard
Sep 29, 2026
c17937c
My Jetpack: animate the onboarding panel, and drop the site portrait
Sep 30, 2026
16b8f1b
My Jetpack: use the Jetpack plugin's own changelog type
Oct 2, 2026
9c3fb99
My Jetpack: keep the setup takeover off Jetpack's connection pages
Oct 5, 2026
1b703aa
My Jetpack: make every way out of the wizard record the same thing
Oct 5, 2026
9aca8c5
Merge branch 'add/my-jetpack-onboarding-steps' into add/my-jetpack-on…
Oct 5, 2026
8018d05
Merge branch 'add/my-jetpack-onboarding-steps' into add/my-jetpack-on…
Oct 7, 2026
0a43a26
Merge branch 'add/my-jetpack-onboarding-steps' into add/my-jetpack-on…
Oct 7, 2026
e4d11bd
Merge branch 'add/my-jetpack-onboarding-steps' into add/my-jetpack-on…
Oct 8, 2026
cff6efb
Merge branch 'add/my-jetpack-onboarding-steps' into add/my-jetpack-on…
Oct 8, 2026
9925e71
Merge branch 'add/my-jetpack-onboarding-steps' into add/my-jetpack-on…
Oct 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import { useReducedMotion } from '@wordpress/compose';
import { __ } from '@wordpress/i18n';
import { check } from '@wordpress/icons';
import { Icon, Text } from '@wordpress/ui';
import clsx from 'clsx';
import styles from './styles.module.scss';
import { useReducedMotion } from './use-reduced-motion';

/**
* The arrival moment, on the step the user lands on after connecting.
*
* Connecting is the hardest thing in the flow and the likeliest to fail, and
* the ones who get through it used to land back here with nothing to say it
* worked. The mark blooms once, in the finish screen's own language at a
* smaller scale, and the line stays rather than fading: a confirmation that
* disappears on a timer is not a confirmation.
* The mark blooms once, in the finish screen's own language at a smaller scale.
* The line stays rather than fading: a confirmation on a timer is not one.
*
* @return The rendered notice.
*/
Expand All @@ -23,9 +20,8 @@ export function ConnectedNotice() {
<div className={ styles.connected } role="status">
<span className={ styles.connected__mark }>
{ /*
* Not rendered at all under reduced motion, which is a different
* render rather than a shorter animation; same call as the finish
* screen's, and the same reason it has to ask in JavaScript.
* Not rendered at all under reduced motion; see `.finish-wash` in
* the stylesheet.
*/ }
{ ! reduced && (
<>
Expand All @@ -43,7 +39,7 @@ export function ConnectedNotice() {
</span>

<Text variant="body-md" render={ <p /> } className={ styles.connected__text }>
{ __( 'Connected to WordPress.com', 'jetpack-my-jetpack' ) }
{ __( 'Your site is connected', 'jetpack-my-jetpack' ) }
</Text>
</div>
);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { dataInArt } from './data-in-art';
import styles from './styles.module.scss';

/**
* The plugins feeding the screen, on the step that asks which of them to switch
* on. The flow keeps looping rather than settling.
*
* `dangerouslySetInnerHTML` because the markup is a build-time constant from this
* repository and nothing user-supplied reaches it. See `data-in-art.ts`.
*
* @return The rendered artwork.
*/
export function DataInArt() {
return (
<div
className={ styles[ 'data-in' ] }
aria-hidden="true"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={ { __html: dataInArt } }
/>
);
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import { useEffect, useRef } from 'react';
import { everywhereArt } from './everywhere-art';
import styles from './styles.module.scss';

// Scene units of travel at the panel's edge for a depth of 1. Small on purpose:
// the cards should feel like they sit at different distances, not slide.
const RANGE = 9;

/**
* A site being run, on the step that asks what the site is for: a restore
* finishing, one post going to eight networks, and somebody else in the room.
*
* `dangerouslySetInnerHTML` because the markup is a build-time constant from this
* repository and nothing user-supplied reaches it. See `everywhere-art.ts`.
*
* @return The rendered artwork.
*/
export function EverywhereArt() {
const hostRef = useRef< HTMLDivElement >( null );

/*
* The pointer parallax. It ships with the composition — five `.ev-par` layers
* carrying their own `--depth` — but it needs a listener, so it is wired here
* rather than inside the SVG.
*
* Smoothing is the CSS transition the composition puts on those layers, so
* every frame stays on the compositor rather than being driven from here.
*/
useEffect( () => {
const scene = hostRef.current?.querySelector< SVGSVGElement >( '#ev-scene' );
const layers = Array.from( scene?.querySelectorAll< SVGGElement >( '.ev-par' ) ?? [] );

if ( ! scene || ! layers.length ) {
return;
}

// Touch fires one hover on tap and then nothing, which would leave the
// cards stuck off centre for good. Reduced motion opts out entirely.
const fine = window.matchMedia( '(hover: hover) and (pointer: fine)' );
const still = window.matchMedia( '(prefers-reduced-motion: reduce)' );

let frame = 0;
let tx = 0;
let ty = 0;

const apply = () => {
frame = 0;
layers.forEach( layer => {
const depth = parseFloat( layer.style.getPropertyValue( '--depth' ) ) || 1;
layer.style.transform = `translate(${ ( tx * depth ).toFixed( 2 ) }px, ${ (
ty * depth
).toFixed( 2 ) }px)`;
} );
};

const schedule = () => {
if ( ! frame ) {
frame = requestAnimationFrame( apply );
}
};

const onMove = ( event: PointerEvent ) => {
const box = scene.getBoundingClientRect();

if ( ! box.width ) {
return;
}

// Scene units, not screen pixels: the SVG is scaled to fit and the
// transform lives inside it, so a pixel offset would shrink with the
// window. jsdom has no viewBox geometry, hence the fallback.
const scale = ( scene.viewBox?.baseVal?.width || box.width ) / box.width;

tx = ( ( event.clientX - box.left ) / box.width - 0.5 ) * 2 * RANGE * scale;
ty = ( ( event.clientY - box.top ) / box.height - 0.5 ) * 2 * RANGE * scale;
schedule();
};

const reset = () => {
tx = 0;
ty = 0;
schedule();
};

const enable = () => {
if ( ! fine.matches || still.matches ) {
reset();
return;
}

scene.addEventListener( 'pointermove', onMove );
scene.addEventListener( 'pointerleave', reset );
};

const disable = () => {
scene.removeEventListener( 'pointermove', onMove );
scene.removeEventListener( 'pointerleave', reset );
reset();
};

const requery = () => {
disable();
enable();
};

enable();

// Both can change while the page is open: a mouse pairing, or the setting
// being turned on in another window.
fine.addEventListener( 'change', requery );
still.addEventListener( 'change', requery );

return () => {
if ( frame ) {
cancelAnimationFrame( frame );
}

disable();
fine.removeEventListener( 'change', requery );
still.removeEventListener( 'change', requery );
};
}, [] );

return (
<div
ref={ hostRef }
className={ styles.everywhere }
aria-hidden="true"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={ { __html: everywhereArt } }
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
export interface WizardStepOption {
value: string;
label: string;
// Not rendered by the hairline row, which is label-only; kept for stage 3.
// The line under the label on a choice card.
description: string;
icon: typeof plus;
// Opens a text field for an answer the list does not cover.
Expand Down Expand Up @@ -52,7 +52,7 @@ export type WizardStepKind = 'start' | 'question' | 'features' | 'finish';
* A step, as the rail and the question column both read it.
*/
export interface WizardStepMeta {
// Stable across reorders: the React key, and the analytics name stage 2 reports.
// Stable across reorders: the React key, and how `siteTypeAnswer` finds its step.
id: string;
// Which component the shell renders for this step.
kind: WizardStepKind;
Expand Down Expand Up @@ -90,11 +90,9 @@ const UNKNOWN_CONNECTION_ERROR = 'unknown_error';
/**
* The bounded code for a failed registration, safe to send to Tracks.
*
* Either the server's own `WP_Error` code or, when the request never got as far
* as a parsed body, the name of the error class the API client threw
* (`JsonParseError`, `Api404Error`, `FetchNetworkError`, and so on). Both are
* fixed vocabularies. The error's `message` is deliberately not considered:
* it interpolates the server's prose and can carry the site's own URL.
* The server's own `WP_Error` code, or the name of the class the API client
* threw. The `message` is deliberately not considered: it interpolates the
* server's prose and can carry the site's own URL.
*
* @param error - The rejection from `handleRegisterSite`, or the stored error.
* @return A slug from a fixed set, never free text.
Expand Down Expand Up @@ -145,7 +143,7 @@ export interface WizardState {
}

/**
* The steps, in order. Placeholder content until stage 3 brings the real steps.
* The steps, in order.
*
* @return One entry per step, translated at call time.
*/
Expand Down Expand Up @@ -173,8 +171,14 @@ export function wizardSteps(): WizardStepMeta[] {
* This one is true either way, so it needs no second question about which.
*/
title: __( "What's this site for?", 'jetpack-my-jetpack' ),
/*
* Says what the answer does and no more. It only orders the features —
* all six are offered and all six start on whatever is picked — so
* anything about recommending a different set would be a promise the
* next step does not keep.
*/
description: __(
'Pick the closest fit. It shapes what we suggest next.',
'Pick the closest fit. We’ll put the most useful features first.',
'jetpack-my-jetpack'
),
/*
Expand Down Expand Up @@ -222,10 +226,10 @@ export function wizardSteps(): WizardStepMeta[] {
id: 'features',
kind: 'features',
label: __( 'What you need', 'jetpack-my-jetpack' ),
title: __( "Here's what we recommend for your site", 'jetpack-my-jetpack' ),
title: __( 'What we recommend', 'jetpack-my-jetpack' ),
// Replaced by featuresDescription() once the site type is known; this is
// what someone who skipped the question or typed their own answer reads.
description: __( 'Turn off anything you would rather not have.', 'jetpack-my-jetpack' ),
description: __( 'Turn off any you don’t need.', 'jetpack-my-jetpack' ),
// The rows are the modules Jetpack reports, not a fixed list written here.
options: [],
},
Expand Down Expand Up @@ -307,10 +311,8 @@ export function settleOnboarding( outcome: SettleOutcome ): Promise< unknown > {
* Whether a module is switched on, given what the user has moved.
*
* The wizard recommends all six, so an untouched row is on even where the site
* has the module off — which is the whole point of offering Downtime Monitor,
* the one of the six that does not ship on. One function so the switch and the
* request cannot disagree, which they did: the row read as on while the request
* asked for no change, and the finish screen then said five of six.
* has the module off. One function, so the switch and the request cannot
* disagree — they did, and the finish screen then said five of six.
*
* @param wanted - What the user has moved, by slug.
* @param slug - The module in question.
Expand Down Expand Up @@ -338,30 +340,24 @@ export function siteTypeAnswer( state: WizardState ): string | undefined {
/**
* The line under the feature heading, per site type. One whole sentence each
* rather than a name interpolated into a frame: a translator given "For %s" and
* a list of nouns cannot agree the article or the case.
*
* It claims only what the order does. All six are still offered and all six
* still start on, so "these matter most" is about what is at the top of the
* list, and nothing here says anything was left out.
* a list of nouns cannot agree the article or the case. Each is short enough to
* set on one line at the column's 470px, so a translation will wrap.
*
* @return The line for each site type that has one, translated at call time.
*/
function featuresDescriptions(): Record< string, string > {
return {
blog: __(
'For a blog, these matter most. Turn off anything you would rather not have.',
'jetpack-my-jetpack'
),
blog: __( 'For a blog, these matter most. Turn off any you don’t need.', 'jetpack-my-jetpack' ),
store: __(
'For a store, these matter most. Turn off anything you would rather not have.',
'For a store, these matter most. Turn off any you don’t need.',
'jetpack-my-jetpack'
),
portfolio: __(
'For a portfolio, these matter most. Turn off anything you would rather not have.',
'For a portfolio, these matter most. Turn off any you don’t need.',
'jetpack-my-jetpack'
),
business: __(
'For a business site, these matter most. Turn off anything you would rather not have.',
'For a business site, these matter most. Turn off any you don’t need.',
'jetpack-my-jetpack'
),
};
Expand Down Expand Up @@ -429,13 +425,3 @@ export function canContinue( step: WizardStep, state: WizardState ): boolean {
*/
return chosen.freeText ? Boolean( state.freeText?.trim() ) : true;
}

/**
* Whether the given step is the final one.
*
* @param step - The current step index.
* @return True on the last step.
*/
export function isLastStep( step: WizardStep ): boolean {
return step === TOTAL_STEPS - 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,9 @@ import styles from './styles.module.scss';

/**
* The brand artwork's own geometry: 14 hairline strokes making the isometric
* Jetpack bolt inside two organic circles.
*
* Copied verbatim from the prototype's `components/onboarding/panel-art.tsx`,
* which inlined it from Layer_1.svg. It is hand-drawn brand art: the path data
* and the two stroke widths are not to be redrawn, rounded or simplified.
*
* The stroke colour is not here. The prototype writes `#48FF50` on every path;
* that value is `$brand-gradient-green-bright` in styles.module.scss, so the
* paths take `currentColor` and the stylesheet is the one place it lives.
* Jetpack bolt inside two organic circles. Hand-drawn brand art, copied
* verbatim — not to be redrawn, rounded or simplified. The colour is not here:
* the paths take `currentColor` so the stylesheet is the one place it lives.
*/
const ART_PATHS: { d: string; width: number }[] = [
{
Expand Down Expand Up @@ -90,11 +84,10 @@ type PanelArtProps = {
/**
* The brand panel's artwork.
*
* Each path's own length is measured and published as `--draw-length`, which the
* dash rules read. `pathLength` would be tidier, but Chrome only normalises
* against it for presentation attributes: a `stroke-dasharray` coming from a
* stylesheet stays in user units, so the whole bolt draws as a 1px dotted line
* at a third of a pixel wide and nothing appears on screen.
* Each path's length is measured and published as `--draw-length`, which the
* dash rules read. `pathLength` would be tidier, but Chrome normalises against
* it only for presentation attributes, so a stylesheet's dasharray stays in user
* units and the whole bolt draws as a 1px dotted line.
*
* @param props - The component props.
* @param props.animate - Whether the paths draw themselves in.
Expand Down
Loading
Loading