@uicopilot/storybook-addon 0.18.2 → 0.19.0
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 +26 -14
- package/dist/manager.mjs +95 -91
- package/dist/preset.js +3 -3
- package/dist/preset.mjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,13 +124,13 @@ React is optional as a peer dependency — the addon's own UI is bundled and doe
|
|
|
124
124
|
|
|
125
125
|
Both are useful, and they answer different questions.
|
|
126
126
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
| Compares against | **The last approved screenshot** of your own component
|
|
130
|
-
| Catches
|
|
131
|
-
| Output
|
|
132
|
-
| Needs
|
|
133
|
-
| Blind spot
|
|
127
|
+
| | Visual regression (snapshots) | UI Parity |
|
|
128
|
+
| ---------------- | -------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
129
|
+
| Compares against | **The last approved screenshot** of your own component | **The Figma frame** — the design source of truth |
|
|
130
|
+
| Catches | Any change from the previous build | Divergence from what the design says, even if it's been wrong for months |
|
|
131
|
+
| Output | A pixel diff image to eyeball | Named properties with Expected vs. Actual values |
|
|
132
|
+
| Needs | Baselines to approve and re-approve | A one-time story → frame mapping |
|
|
133
|
+
| Blind spot | A component that never matched the design still passes forever | Anything not expressed as a comparable style property |
|
|
134
134
|
|
|
135
135
|
Snapshot tools tell you **something changed**. UI Parity tells you **it doesn't match the design** — which is the question that comes up in design review, not code review. Teams run both.
|
|
136
136
|
|
|
@@ -159,11 +159,12 @@ export default {
|
|
|
159
159
|
};
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
| Variable
|
|
163
|
-
|
|
|
164
|
-
| `STORYBOOK_UICOPILOT_URL`
|
|
165
|
-
| `STORYBOOK_UICOPILOT_FIGMA_KIT`
|
|
166
|
-
| `STORYBOOK_UICOPILOT_NO_PUPPETEER` | Set to `true` to disable server-side screenshot capture and fall back to in-browser capture. Debug/troubleshooting flag.
|
|
162
|
+
| Variable | Purpose |
|
|
163
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
164
|
+
| `STORYBOOK_UICOPILOT_URL` | Point the addon at your own dashboard deployment instead of `https://app.uiparity.com`. |
|
|
165
|
+
| `STORYBOOK_UICOPILOT_FIGMA_KIT` | A reference Figma community-file URL to surface in the project setup screen as a copyable starting kit. Set automatically by `npx uiparity demo` templates that ship one. |
|
|
166
|
+
| `STORYBOOK_UICOPILOT_NO_PUPPETEER` | Set to `true` to disable server-side screenshot capture and fall back to in-browser capture. Debug/troubleshooting flag. |
|
|
167
|
+
| `STORYBOOK_UICOPILOT_CHROME_PATH` | Absolute path to a Chrome/Chromium executable. Only needed when your browser is somewhere the addon does not look — a CI image, or a non-standard install. Takes precedence over auto-discovery. |
|
|
167
168
|
|
|
168
169
|
### Self-hosting the dashboard
|
|
169
170
|
|
|
@@ -195,8 +196,19 @@ This is almost always a mapping problem — the story is pointed at the wrong Fi
|
|
|
195
196
|
**The sidebar markers look like Storybook's own test statuses.**
|
|
196
197
|
They share the same status glyph. UI Parity only recolors markers for stories it actually has a status for, so anything untouched is your test runner's, not ours.
|
|
197
198
|
|
|
198
|
-
**Screenshots fail or time out.**
|
|
199
|
-
Server-side capture
|
|
199
|
+
**Screenshots fail or time out, or stories come back with no code DOM.**
|
|
200
|
+
Server-side capture runs a headless browser inside your own Storybook dev server, and it needs one of:
|
|
201
|
+
|
|
202
|
+
- **`puppeteer`** — bundles its own Chromium (~200MB download), works with no browser installed; or
|
|
203
|
+
- **`puppeteer-core`** — ~1MB, and uses a Chrome/Chromium you already have. The addon looks in the standard locations for macOS, Linux and Windows (including per-user Windows installs); point it elsewhere with `STORYBOOK_UICOPILOT_CHROME_PATH`.
|
|
204
|
+
|
|
205
|
+
Both are optional peer dependencies, so neither is installed for you. `puppeteer-core` is the lighter choice if you already have Chrome — which you probably do.
|
|
206
|
+
|
|
207
|
+
If the addon reports **"No Chrome or Chromium found"**, that is the missing-browser case: install Chrome or set `STORYBOOK_UICOPILOT_CHROME_PATH`. If it reports **"found a browser … but could not drive it"**, the browser and `puppeteer-core` versions disagree — update one of them. The two are reported separately on purpose, because the fixes are different.
|
|
208
|
+
|
|
209
|
+
In CI, use an image that ships Chrome (or install it in a setup step) and set `STORYBOOK_UICOPILOT_CHROME_PATH` if it lands somewhere unusual.
|
|
210
|
+
|
|
211
|
+
Failing all of that, set `STORYBOOK_UICOPILOT_NO_PUPPETEER=true` to use the in-browser fallback.
|
|
200
212
|
|
|
201
213
|
## Links
|
|
202
214
|
|