chore: implement storybook#932
Conversation
b650dcc to
b0ec3f2
Compare
… loading Move per-package CSS injection from a runtime decorator inside src/ to a storybook.preview.ts entry point at the package root. Stories no longer need to import or apply the decorator manually.
…orybook # Conflicts: # pnpm-lock.yaml # pnpm-workspace.yaml
Not going to fix just yet, will wait for this branch to merge to tightly scope and follow up 🙂
Not going to fix just yet, will wait for this branch to merge to tightly scope and follow up 🙂
Hmm, fair enough. I've imported both those components to the story 🙂
Looks like the
Good idea!
Oops, I think I nuked this by accident. |
EhabY
left a comment
There was a problem hiding this comment.
There are a few follow ups in the chromatic one but this one is good!
Wire eslint-plugin-storybook into the eslint config using the flat/recommended preset. Disable storybook/no-renderer-packages since @storybook/react-vite at v8 doesn't re-export Meta/StoryObj.
- Use declare global Window augmentation for acquireVsCodeApi mock instead of manual type casts - Remove getDefaultFontStack() — themes already provide --vscode-font-family via CSS custom properties - Add .storybook typecheck as 4th concurrent run in typecheck script
- Update all @storybook packages from ^8.6.18 to ^10.3.6 - Consolidate @storybook/test into storybook/test (v10 subpath) - Remove @storybook/addon-essentials (built into core in v10) - Remove direct @storybook/react dep (use @storybook/react-vite) - Add @storybook/addon-docs as explicit addon - Restore catalog: references in package.json (automigration hardcoded) - Update storybook-utils to import Decorator from @storybook/react-vite - Remove stale storybook/no-renderer-packages eslint disable
- Remove dead args: {} from NotSupportedState story
- Lift shared task data to module scope in TasksPanel stories
- Lift shared log entries to meta.args in AgentChatHistory stories
ActionMenu Opened relied on vscode-icon custom element registration which fails in Chromatic's headless browser. TaskSelection depended on IPC-driven navigation that cannot resolve in isolation. Both stories remain as visual-only snapshots.
f98c65a to
62bb158
Compare
The upstream vscode-elements theme data does not include --vscode-font-family because VS Code injects it at runtime. Without it, global.css falls back to the browser default serif font, causing every Chromatic snapshot to diff.
f76e3b5 to
32dd1bf
Compare
EhabY
left a comment
There was a problem hiding this comment.
All good again, looks great!
Adds Storybook support for developing and previewing webview components in isolation outside of VS Code. Includes stories for all
taskspackage components with a dark/light theme switcher that mirrors VS Code CSS custom properties..storybook/config with Vite integration, workspace alias resolution, codicon injection, andacquireVsCodeApimockvscode-elements/webview-playground) with a toolbar switcher inglobalTypespackages/tasks/src/components/covering all major UI statestest/webview/decorators.tsxwith a sharedwithQueryClientdecorator for stories using React Querystorybookandbuild-storybookscripts to rootpackage.json