Add before after case

From rejifald/movar · View interactive version

Add before after case is an AI agent skill from the GitHub repository rejifald/movar. Wire a new before/after use case into BOTH the marketplace screenshot carousel and the marketing site diptych — they share backdrops and must stay in sync. Use when the user asks to add a new comparison / demo / before-after example to the extension screenshots, the marketing site's "See it in actio

How to use this skill

Skill file

Add a before/after use case (marketplace + marketing)

Both surfaces narrate the same "what Movar fixes" stories — they just

deliver them in different shapes:

come from real captures in tooling/store-listing.

light and -dark, at natural content height — and the Astro

layer at apps/marketing/src/components/ExampleDrum.astro composes

them at runtime inside the homepage hero's tabbed drum, one pair

visible at a time, swapping light↔dark with <picture> +

prefers-color-scheme.

Both share backdrop components and the same Playwright capture script

at apps/extension/scripts/capture-storybook-assets.mts. Story title

prefix routes the output:

| Prefix | Output root | Story dir |

| ------------------------- | ------------------------------------ | ------------------------ |

| Marketing/Screenshots/* | apps/marketing/public/screenshots/ | storyboards/marketing/ |

Procedure

Rule of thumb: every new use case ships in BOTH surfaces unless the

demo's premise excludes one (e.g. scene #5 / Knowledge Panel is UK-only

because Google falls back to English without an hl hint — there's no

observable EN before/after). When you must skip a locale, document why

in the story file header.

1. Shared backdrops

Build the React backdrop(s) under

apps/extension/store-assets/storyboards/backdrops/. Make them accept

hideChrome?: boolean (default false) and forward it to the inner

frame component. The marketplace diptych supplies its own browser

chrome at the half level; the marketing single-half does not.

Existing backdrop frames to reuse / mirror:

If you build a new fictitious brand, follow §5 of

apps/extension/store-assets/REQUIREMENTS.md: invented name, .example

TLD, no real third-party logos, no real personal context.

2. Marketing single-half stories

Add two stories under

apps/extension/store-assets/storyboards/marketing/:

Marketing/Screenshots/<Name>Without, output

<name>-without-movar.png.

Marketing/Screenshots/<Name>With, output

<name>-with-movar.png.

Each story sets parameters: { layout: 'fullscreen', viewport: { width: <content-width>, height: 800 }, captureOutput: { path: '<file>.png' }, naturalHeight: true, darkVariant: true }

and renders the backdrop with its built-in chrome (no hideChrome). Set

viewport.width to the scene's natural content width (the width at

which the page content fills the frame edge-to-edge without being

stretched — e.g. a Google SERP's ~680px column + padding) so the

marketing layout can scale it to fit; naturalHeight then captures the

full height (not an 800px crop); darkVariant emits the -dark sibling

under prefers-color-scheme: dark (give the backdrop a dark @media

block over its scoped CSS vars).

3. Marketplace screenshots (retired from Storybook)

The Marketplace/Screenshots/* stories are retired. Store screenshots

now come from real browser captures in tooling/store-listing; there is

no marketplace story to add for a new case.

4. Marketing site integration

The marketing pairs render in

apps/marketing/src/components/ExampleDrum.astro — the homepage hero's

tabbed drum — keyed by the index of the matching entry in

strings.examples.entries (apps/marketing/src/i18n.ts):

en and uk — each has site, scenario, without, withMovar,

and alt ({ without, withMovar }). alt is required: the drum

drops a slide's images without it, so a pair whose PNGs are on disk

but whose alt is missing silently renders as caption-only.

shows it under the card and falls back to scenario when absent.

without/with light src. The -dark siblings and the existsSync

gate are handled automatically: a slide shows images only when both

light PNGs are on disk, and the dark <picture> source is added when

the -dark PNG exists. A slide with missing PNGs still renders its tab

and its caption.

A fifth scene needs that list widened too — adding a pair alone will

not surface it.

5. Docs

Update three docs in lockstep:

"Required shots" table (file, locales, backdrop, layout).

screenshot-set table; mention any locale skips with the reason.

for each per-locale PNG ("Screenshot #N <slug> (UK)", etc.).

filename table.

6. Capture and commit

pnpm capture:storybook-assets

Or from a sub-package directory:

pnpm --filter @movar/extension capture:storybook-assets

Commit the resulting PNGs in the same change as the source so PR

review surfaces the visual diff.

Concrete example

Scene #5 (Knowledge Panel) is the canonical example of this convention

applied:

When in doubt, mirror the structure of scene #3 (search-rewrite —

fully bilingual) or scene #5 (knowledge-panel — UK-only with a

documented skip).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.