diff --git a/.agents/guidelines/chromatic-projects.md b/.agents/guidelines/chromatic-projects.md new file mode 100644 index 000000000000..1bfe00054db5 --- /dev/null +++ b/.agents/guidelines/chromatic-projects.md @@ -0,0 +1,40 @@ +# Chromatic Projects + +Pass the project ID as `projectId` to the Chromatic tools. Sandbox projects are listed by template key. CI job names use the template's display name instead, and `code/lib/cli-storybook/src/sandbox-templates.ts` maps each display name to its key. + +| Project | Project ID | +| ---------------------------------------- | ---------------------------------- | +| internal Storybook UI (`code/`) | `Project:635781f3500dd2c49e189caf` | +| `react-vite/default-ts` | `Project:630511d655df72125520f051` | +| `react-vite/default-js` | `Project:6305104a03ce824473a88c65` | +| `react-vite/prerelease-ts` | `Project:6637a367fa5b4eaa26d92d25` | +| `react-webpack/18-ts` | `Project:633c394125f29c2cbb5a4cac` | +| `react-webpack/prerelease-ts` | `Project:6637a3aad047d2bb1b3cbfe9` | +| `react-native-web-vite/expo-ts` | `Project:6739a507de968e78c90c81af` | +| `nextjs/default-ts` | `Project:634ff0d0ec053b270775979d` | +| `nextjs/15-ts` | `Project:68fa3e766deb52421c1acf27` | +| `nextjs/prerelease` | `Project:6527cbbdfc5de6c10b0bbe2b` | +| `nextjs-vite/default-ts` | `Project:66b1e47012f95c6f90c8882e` | +| `nextjs-vite/15-ts` | `Project:68fa3c0353a6ab43d601462f` | +| `tanstack-react-router/default-ts` | `Project:69f08674491608f953c605b2` | +| `tanstack-react-start/default-ts` | `Project:69f0872a77e679e347550cfe` | +| `angular-cli/default-ts` | `Project:6322ce6af69825592bbb28fc` | +| `angular-vite/default-ts` | `Project:6a021028c2f37c1d2f640723` | +| `angular-vite/21-ts` | `Project:6a39460ac63cf417c1a079ff` | +| `vue3-vite/default-ts` | `Project:630513346a8e284ae244d415` | +| `vue3-vite/default-js` | `Project:630513046a8e284ae244cab4` | +| `vue3-vite/prerelease-ts` | `Project:6acf97c724e2b86a56912992` | +| `svelte-vite/default-ts` | `Project:630873996e4e3557791c069c` | +| `svelte-vite/default-js` | `Project:6308736456ad2046275c0ae7` | +| `svelte-kit/skeleton-ts` | `Project:634ff6954afef8aae1c1b29b` | +| `lit-vite/default-ts` | `Project:638db5bf49adfdfe8cf545e0` | +| `lit-vite/default-js` | `Project:638db567ed97c3fb3e21cc22` | +| `preact-vite/default-ts` | `Project:63b588a512565bfaace15e7c` | +| `preact-vite/default-js` | `Project:63b5884a12565bfaace14c83` | +| `html-vite/default-ts` | `Project:63dd39a158cf6fc05199b4bb` | +| `html-vite/default-js` | `Project:63dd397461b9918f7bdd988e` | +| `internal/react18-webpack-babel` | `Project:659810cb7e778e400627527a` | +| `bench/react-vite-default-ts-test-build` | `Project:6544b941802d9ff884a3f74d` | +| `bench/react-webpack-18-ts-test-build` | `Project:6544b98f47ff41fd955b43cb` | + +When you add or remove a template that runs the `chromatic` task, update this table in the same PR. diff --git a/.agents/skills/rebuild-restart-storybook/SKILL.md b/.agents/skills/rebuild-restart-storybook/SKILL.md index d308913f84be..974c0c9bd8c7 100644 --- a/.agents/skills/rebuild-restart-storybook/SKILL.md +++ b/.agents/skills/rebuild-restart-storybook/SKILL.md @@ -33,7 +33,7 @@ yarn build storybook Then, run in the background: ```bash -NODE_OPTIONS="--preserve-symlinks" yarn storybook:ui --no-open +NODE_OPTIONS="--preserve-symlinks" yarn storybook:ui ``` ### Handle an occupied port diff --git a/.agents/skills/storybook-startup-benchmark/SKILL.md b/.agents/skills/storybook-startup-benchmark/SKILL.md index 0b3158de1ed7..f17142594526 100644 --- a/.agents/skills/storybook-startup-benchmark/SKILL.md +++ b/.agents/skills/storybook-startup-benchmark/SKILL.md @@ -26,7 +26,7 @@ When asked to benchmark Storybook startup: - Stop timing on first story mount plus one `requestAnimationFrame()` 2. Check whether the repo already has a benchmark script. Reuse it if possible. 3. If not, create a Node script that: - - starts Storybook with `--no-open` + - starts Storybook without opening a browser - waits for the server to respond - launches a browser it controls - waits for a preview-side render signal @@ -41,7 +41,7 @@ Use these defaults unless the user asks otherwise: - Browser path: normal manager page, let Storybook load the preview iframe itself - Render signal: first preview story mount + one `requestAnimationFrame()` - Browser launch: external harness launches the browser, not Storybook -- Auto-open: disable Storybook browser auto-open with `storybook dev --no-open` +- Auto-open: keep Storybook from opening a browser. Storybook 11 opens one only with `--open`; Storybook 10 and older need `--no-open` Do not measure only CLI output. Server listening is not the same as first story rendered. @@ -70,7 +70,7 @@ Preferred payload: The benchmark script should: 1. Fail fast if the target Storybook port is already in use -2. Spawn Storybook with `--no-open` +2. Spawn Storybook without opening a browser 3. Start timing immediately before spawn 4. Wait for HTTP readiness on the Storybook URL 5. Launch a controlled browser to `/` diff --git a/AGENTS.md b/AGENTS.md index 2a49742edf5d..2222c425ccd7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,6 +31,7 @@ Both start long-running dev servers. | open or update a PR | [Pull requests](.agents/guidelines/pull-requests.md) | | touch `code/core` internals, presets, open services, or the tools CLI | [Architecture](.agents/guidelines/architecture.md) | | do sandbox, E2E, or CI-parity work | [NX and `yarn task`](.agents/guidelines/nx-and-yarn-task.md) and [Sandboxes](.agents/guidelines/sandboxes.md) | +| call a Chromatic tool or debug a Chromatic build | [Chromatic projects](.agents/guidelines/chromatic-projects.md) | | add or change an automigration | [`code/lib/cli-storybook/src/automigrate/README.md`](code/lib/cli-storybook/src/automigrate/README.md) | Contributor skills live in `.agents/skills/`; `.claude/skills/` references them. diff --git a/CHANGELOG.md b/CHANGELOG.md index 158e7c1b6bff..5cd0b049b2aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 10.6.3 + +- Addon Vitest: Support Vitest 5 - [#36671](https://github.com/storybookjs/storybook/pull/36671), thanks @PaulMest! +- Next.js: Fix app-router mock crash on Next.js 16.4 - [#36588](https://github.com/storybookjs/storybook/pull/36588), thanks @obvious-autobuild! +- Nextjs-Vite: Provide parentRenderTree.bfcacheId in app router mock - [#36732](https://github.com/storybookjs/storybook/pull/36732), thanks @bhushan4work! +- TypeScript: Explicitly type returntype of ArgsStore#get - [#36583](https://github.com/storybookjs/storybook/pull/36583), thanks @mrginglymus! + ## 10.6.2 - Angular-Vite: Require @analogjs/vite-plugin-angular 2.7.3 or later - [#36525](https://github.com/storybookjs/storybook/pull/36525), thanks @valentinpalkovic! diff --git a/CHANGELOG.prerelease.md b/CHANGELOG.prerelease.md index b6f064e50c71..77badc5bab3e 100644 --- a/CHANGELOG.prerelease.md +++ b/CHANGELOG.prerelease.md @@ -1,3 +1,26 @@ +## 11.0.0-alpha.8 + +- Addon-Docs: Prevent source transform from being applied twice on docs pages - [#36061](https://github.com/storybookjs/storybook/pull/36061), thanks @webdevsamran! +- Angular: Read Component Metadata From Ivy Declarations - [#36780](https://github.com/storybookjs/storybook/pull/36780), thanks @dvmhmdsd! +- Builder Vite: Report silent vite config discovery misses with a named warning - [#36788](https://github.com/storybookjs/storybook/pull/36788), thanks @obvious-autobuild! +- CSF: Run csf-tools on OXC instead of Babel - [#36613](https://github.com/storybookjs/storybook/pull/36613), thanks @EastonShin! +- Core: Exempt chromatic from release-age gates alongside the Chromatic addon - [#36910](https://github.com/storybookjs/storybook/pull/36910), thanks @valentinpalkovic! +- Core: Skip TypeScript loader hook registration under Jest - [#36790](https://github.com/storybookjs/storybook/pull/36790), thanks @obvious-autobuild! +- Manager: Improve UI stability on onboarding checklist - [#36341](https://github.com/storybookjs/storybook/pull/36341), thanks @Sidnioulz! +- Manager: Type index titles by their contents - [#36659](https://github.com/storybookjs/storybook/pull/36659), thanks @valentinpalkovic! +- PNPM: Preapprove esbuild postinstall when possible - [#36758](https://github.com/storybookjs/storybook/pull/36758), thanks @Sidnioulz! +- React renderer: Prebundle react so Vitest browser mode can link React's default export - [#36824](https://github.com/storybookjs/storybook/pull/36824), thanks @obvious-autobuild! +- React: Alias preview React from the renderer preset - [#36841](https://github.com/storybookjs/storybook/pull/36841), thanks @ndelangen! +- Svelte: Accept preview.meta() in Svelte CSF files - [#36691](https://github.com/storybookjs/storybook/pull/36691), thanks @JReinhold! +- Svelte: Add CSF factories with definePreview - [#36669](https://github.com/storybookjs/storybook/pull/36669), thanks @JReinhold! +- Svelte: Migrate Svelte CSF files to CSF factories and run the Svelte sandboxes with them - [#36702](https://github.com/storybookjs/storybook/pull/36702), thanks @JReinhold! +- Svelte: Remove deprecated parameters.component path - [#36813](https://github.com/storybookjs/storybook/pull/36813), thanks @ndelangen! +- TanstackReact: Fix accross typo in path-utils comment - [#36634](https://github.com/storybookjs/storybook/pull/36634), thanks @obvious-autobuild! +- WC: Keep properties named like an unrelated attribute - [#36862](https://github.com/storybookjs/storybook/pull/36862), thanks @huang-julien! +- WC: Normalize multiline type text in WC arg type parsing - [#36805](https://github.com/storybookjs/storybook/pull/36805), thanks @huang-julien! +- WC: Read WC meta.component through a spread of a local meta object - [#36812](https://github.com/storybookjs/storybook/pull/36812), thanks @huang-julien! +- WC: Skip undefined and null args in the web components default render - [#36806](https://github.com/storybookjs/storybook/pull/36806), thanks @huang-julien! + ## 11.0.0-alpha.7 - Addon Themes: Declare the package as an ES module - [#36721](https://github.com/storybookjs/storybook/pull/36721), thanks @ump45nose! diff --git a/MIGRATION.md b/MIGRATION.md index 08676d51127a..42bd07275ad6 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -29,6 +29,7 @@ - [Sidebar rewrite: manager API changes](#sidebar-rewrite-manager-api-changes) - [Escape is no longer a configurable shortcut](#escape-is-no-longer-a-configurable-shortcut) - ['Create new story' UI feature removed](#create-new-story-ui-feature-removed) + - [Sidebar: standalone docs pages are no longer wrapped in a component](#sidebar-standalone-docs-pages-are-no-longer-wrapped-in-a-component) - [Test runner support ended](#test-runner-support-ended) - [Vitest Addon: requires Vitest 4.0 or higher](#vitest-addon-requires-vitest-40-or-higher) - [Vitest Addon: `setProjectAnnotations` must not be called in setup files](#vitest-addon-setprojectannotations-must-not-be-called-in-setup-files) @@ -40,6 +41,7 @@ - [Angular: requires Angular 21 or higher](#angular-requires-angular-21-or-higher) - [Next.js: `@storybook/nextjs` is deprecated](#nextjs-storybooknextjs-is-deprecated) - [Create React App support removed](#create-react-app-support-removed) + - [`storybook/internal/babel` removed; `csf-tools` uses ESTree](#storybookinternalbabel-removed-csf-tools-uses-estree) - [`@storybook/angular-vite`: legacy animation modules are no longer auto-converted](#storybookangular-vite-legacy-animation-modules-are-no-longer-auto-converted) - [Internal CSF tools use the unified mutation API](#internal-csf-tools-use-the-unified-mutation-api) - [Internal WebSocket heartbeat controls removed](#internal-websocket-heartbeat-controls-removed) @@ -60,6 +62,7 @@ - [Automigrations for Storybook 10 and earlier removed](#automigrations-for-storybook-10-and-earlier-removed) - [Web Components: server-side docgen suffixes event, slot and part argType keys](#web-components-server-side-docgen-suffixes-event-slot-and-part-argtype-keys) - [Web Components: the default render binds args by key](#web-components-the-default-render-binds-args-by-key) + - [Web Components: the runtime Custom Elements Manifest API is deprecated](#web-components-the-runtime-custom-elements-manifest-api-is-deprecated) - [SvelteKit: Require v3 and up](#sveltekit-require-v3-and-up) - [Svelte CSF is built into the Svelte frameworks](#svelte-csf-is-built-into-the-svelte-frameworks) - [Svelte CSF: legacy story syntax removed](#svelte-csf-legacy-story-syntax-removed) @@ -69,6 +72,7 @@ - [`